Changeset 032bbe7 in mainline for uspace/srv/net/tl/tcp/segment.c
- Timestamp:
- 2011-09-22T19:53:07Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 32105348
- Parents:
- 0093ab6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/segment.c
r0093ab6 r032bbe7 32 32 33 33 /** 34 * @file 34 * @file Segment processing 35 35 */ 36 36 … … 41 41 #include "tcp_type.h" 42 42 43 /** Alocate new segment structure. */ 43 44 tcp_segment_t *tcp_segment_new(void) 44 45 { … … 46 47 } 47 48 49 /** Delete segment. */ 48 50 void tcp_segment_delete(tcp_segment_t *seg) 49 51 { … … 51 53 } 52 54 53 /** Create a control segment. */ 55 /** Create a control segment. 56 * 57 * @return Control segment 58 */ 54 59 tcp_segment_t *tcp_segment_make_ctrl(tcp_control_t ctrl) 55 60 { … … 66 71 } 67 72 73 /** Create an RST segment. 74 * 75 * @param seg Segment we are replying to 76 * @return RST segment 77 */ 68 78 tcp_segment_t *tcp_segment_make_rst(tcp_segment_t *seg) 69 79 { … … 80 90 } 81 91 82 /** Trim segment to the specified interval.92 /** Trim segment from left and right by the specified amount. 83 93 * 84 * Trim any text or control whose sequence number is outside of [lo, hi) 85 * interval. 94 * Trim any text or control to remove the specified amount of sequence 95 * numbers from the left (lower sequence numbers) and right side 96 * (higher sequence numbers) of the segment. 97 * 98 * @param seg Segment, will be modified in place 99 * @param left Amount of sequence numbers to trim from the left 100 * @param right Amount of sequence numbers to trim from the right 86 101 */ 87 102 void tcp_segment_trim(tcp_segment_t *seg, uint32_t left, uint32_t right) … … 134 149 /** Copy out text data from segment. 135 150 * 151 * Data is copied from the beginning of the segment text up to @a size bytes. 152 * @a size must not be greater than the size of the segment text, but 153 * it can be less. 154 * 155 * @param seg Segment 156 * @param buf Destination buffer 157 * @param size Size of destination buffer 136 158 */ 137 159 void tcp_segment_text_copy(tcp_segment_t *seg, void *buf, size_t size) … … 141 163 } 142 164 143 /** Return number of bytes in segment text. */ 165 /** Return number of bytes in segment text. 166 * 167 * @param seg Segment 168 * @return Number of bytes in segment text 169 */ 144 170 size_t tcp_segment_text_size(tcp_segment_t *seg) 145 171 {
Note:
See TracChangeset
for help on using the changeset viewer.