The friendly Operating System for the Internet of Things
net/gnrc/transport_layer/tcp/internal/pkt.h File Reference

TCP paket handling declarations. More...

Detailed Description

#include <stdint.h>
#include "net/gnrc/pkt.h"
#include "net/gnrc/tcp/tcb.h"
+ Include dependency graph for net/gnrc/transport_layer/tcp/internal/pkt.h:

Go to the source code of this file.

Functions

int _pkt_build_reset_from_pkt (gnrc_pktsnip_t **out_pkt, gnrc_pktsnip_t *in_pkt)
 Build a reset packet from an incomming packet. More...
 
int _pkt_build (gnrc_tcp_tcb_t *tcb, gnrc_pktsnip_t **out_pkt, uint16_t *seq_con, const uint16_t ctl, const uint32_t seq_num, const uint32_t ack_num, void *payload, const size_t payload_len)
 Build and allocate a tcp paket, tcb stores pointer to new paket. More...
 
int _pkt_send (gnrc_tcp_tcb_t *tcb, gnrc_pktsnip_t *out_pkt, const uint16_t seq_con, const bool retransmit)
 Sends a packet to the peer. More...
 
int _pkt_chk_seq_num (const gnrc_tcp_tcb_t *tcb, const uint32_t seq_num, const uint32_t seg_len)
 Checks sequence number. More...
 
uint32_t _pkt_get_seg_len (gnrc_pktsnip_t *pkt)
 Extracts the length of a segment. More...
 
uint32_t _pkt_get_pay_len (gnrc_pktsnip_t *pkt)
 Calculates a segments payload length. More...
 
int _pkt_setup_retransmit (gnrc_tcp_tcb_t *tcb, gnrc_pktsnip_t *pkt, const bool retransmit)
 Adds a paket to the retransmission mechanism. More...
 
int _pkt_acknowledge (gnrc_tcp_tcb_t *tcb, const uint32_t ack)
 Acknowledges and removes packet from the retransmission mechanism. More...
 
uint16_t _pkt_calc_csum (const gnrc_pktsnip_t *hdr, const gnrc_pktsnip_t *pseudo_hdr, const gnrc_pktsnip_t *payload)
 Calculates checksum over payload, tcp-header and network layer header. More...