Changeset eea65f4 in mainline for uspace/srv/net/tl/tcp/rqueue.c
- Timestamp:
- 2011-11-21T21:16:23Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6896409c
- Parents:
- 004a5fe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/rqueue.c
r004a5fe reea65f4 41 41 #include <thread.h> 42 42 #include "conn.h" 43 #include "header.h" 43 44 #include "rqueue.h" 45 #include "segment.h" 44 46 #include "state.h" 45 47 #include "tcp_type.h" 48 49 /** Transcode bounced segments. 50 * 51 * If defined, segments bounced via the internal debugging loopback will 52 * be encoded to a PDU and the decoded. Otherwise they will be bounced back 53 * directly without passing the encoder-decoder. 54 */ 55 #define BOUNCE_TRANSCODE 46 56 47 57 static prodcons_t rqueue; … … 66 76 log_msg(LVL_DEBUG, "tcp_rqueue_bounce_seg()"); 67 77 78 #ifdef BOUNCE_TRANSCODE 79 tcp_pdu_t *pdu; 80 tcp_segment_t *dseg; 81 82 if (tcp_pdu_encode(sp, seg, &pdu) != EOK) { 83 log_msg(LVL_WARN, "Not enough memory. Segment dropped."); 84 return; 85 } 86 87 if (tcp_pdu_decode(pdu, &rident, &dseg) != EOK) { 88 log_msg(LVL_WARN, "Not enough memory. Segment dropped."); 89 return; 90 } 91 92 tcp_pdu_delete(pdu); 93 94 /** Insert decoded segment into rqueue */ 95 tcp_rqueue_insert_seg(&rident, dseg); 96 tcp_segment_delete(seg); 97 #else 68 98 /* Reverse the identification */ 69 99 tcp_sockpair_flipped(sp, &rident); 70 100 101 /* Insert segment back into rqueue */ 71 102 tcp_rqueue_insert_seg(&rident, seg); 103 #endif 72 104 } 73 105
Note:
See TracChangeset
for help on using the changeset viewer.