gnrc_tcp_option.h File Reference

TCP option handling declarations. More...

Detailed Description

TCP option handling declarations.

Author
Simon Brummer simon.nosp@m..bru.nosp@m.mmer@.nosp@m.post.nosp@m.eo.de

Definition in file gnrc_tcp_option.h.

#include <stdint.h>
#include "assert.h"
#include "net/tcp.h"
#include "net/gnrc/tcp/tcb.h"
+ Include dependency graph for gnrc_tcp_option.h:

Go to the source code of this file.

static uint32_t _gnrc_tcp_option_build_mss (uint16_t mss)
 Helper function to build the MSS option. More...
 
static uint16_t _gnrc_tcp_option_build_offset_control (uint16_t nopts, uint16_t ctl)
 Helper function to build the combined option and control flag field. More...
 
int _gnrc_tcp_option_parse (gnrc_tcp_tcb_t *tcb, tcp_hdr_t *hdr)
 Parses options of a given TCP header. More...
 

Function Documentation

◆ _gnrc_tcp_option_build_mss()

static uint32_t _gnrc_tcp_option_build_mss ( uint16_t  mss)
inlinestatic

Helper function to build the MSS option.

Parameters
[in]mssMSS value that should be set.
Returns
MSS option value.

Definition at line 39 of file gnrc_tcp_option.h.

◆ _gnrc_tcp_option_build_offset_control()

static uint16_t _gnrc_tcp_option_build_offset_control ( uint16_t  nopts,
uint16_t  ctl 
)
inlinestatic

Helper function to build the combined option and control flag field.

Parameters
[in]noptsNumber of options.
[in]ctlControl flag field.
Returns
Bitfield with encoded control bits and number of options.

Definition at line 53 of file gnrc_tcp_option.h.

◆ _gnrc_tcp_option_parse()

int _gnrc_tcp_option_parse ( gnrc_tcp_tcb_t tcb,
tcp_hdr_t hdr 
)

Parses options of a given TCP header.

Parameters
[in,out]tcbTCB holding the connection information.
[in]hdrTCP header to be parsed.
Returns
Zero on success. Negative value on error.