Changeset 032bbe7 in mainline for uspace/srv/net/tl/tcp/segment.c


Ignore:
Timestamp:
2011-09-22T19:53:07Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
32105348
Parents:
0093ab6
Message:

Document functions and files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/tcp/segment.c

    r0093ab6 r032bbe7  
    3232
    3333/**
    34  * @file
     34 * @file Segment processing
    3535 */
    3636
     
    4141#include "tcp_type.h"
    4242
     43/** Alocate new segment structure. */
    4344tcp_segment_t *tcp_segment_new(void)
    4445{
     
    4647}
    4748
     49/** Delete segment. */
    4850void tcp_segment_delete(tcp_segment_t *seg)
    4951{
     
    5153}
    5254
    53 /** Create a control segment. */
     55/** Create a control segment.
     56 *
     57  * @return     Control segment
     58 */
    5459tcp_segment_t *tcp_segment_make_ctrl(tcp_control_t ctrl)
    5560{
     
    6671}
    6772
     73/** Create an RST segment.
     74 *
     75 * @param seg   Segment we are replying to
     76 * @return      RST segment
     77 */
    6878tcp_segment_t *tcp_segment_make_rst(tcp_segment_t *seg)
    6979{
     
    8090}
    8191
    82 /** Trim segment to the specified interval.
     92/** Trim segment from left and right by the specified amount.
    8393 *
    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
    86101 */
    87102void tcp_segment_trim(tcp_segment_t *seg, uint32_t left, uint32_t right)
     
    134149/** Copy out text data from segment.
    135150 *
     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
    136158 */
    137159void tcp_segment_text_copy(tcp_segment_t *seg, void *buf, size_t size)
     
    141163}
    142164
    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 */
    144170size_t tcp_segment_text_size(tcp_segment_t *seg)
    145171{
Note: See TracChangeset for help on using the changeset viewer.