Go to the documentation of this file.
20 #ifndef GNRC_TCP_PKT_H
21 #define GNRC_TCP_PKT_H
62 uint16_t *seq_con,
const uint16_t ctl,
63 const uint32_t seq_num,
const uint32_t ack_num,
64 void *payload,
const size_t payload_len);
78 const uint16_t seq_con,
const bool retransmit);
91 const uint32_t seg_len);
123 const bool retransmit);
Includes all essential GNRC network stack base modules.
int _gnrc_tcp_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 TCB packet, TCB stores pointer to new packet.
uint16_t _gnrc_tcp_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.
uint32_t _gnrc_tcp_pkt_get_seg_len(gnrc_pktsnip_t *pkt)
Extracts the length of a segment.
Transmission control block of GNRC TCP.
uint32_t _gnrc_tcp_pkt_get_pay_len(gnrc_pktsnip_t *pkt)
Calculates a packets payload length.
int _gnrc_tcp_pkt_acknowledge(gnrc_tcp_tcb_t *tcb, const uint32_t ack)
Acknowledges and removes packet from the retransmission mechanism.
int _gnrc_tcp_pkt_send(gnrc_tcp_tcb_t *tcb, gnrc_pktsnip_t *out_pkt, const uint16_t seq_con, const bool retransmit)
Sends packet to peer.
int _gnrc_tcp_pkt_setup_retransmit(gnrc_tcp_tcb_t *tcb, gnrc_pktsnip_t *pkt, const bool retransmit)
Adds a packet to the retransmission mechanism.
int _gnrc_tcp_pkt_chk_seq_num(const gnrc_tcp_tcb_t *tcb, const uint32_t seq_num, const uint32_t seg_len)
Verify sequence number.
GNRC TCP transmission control block (TCB)
int _gnrc_tcp_pkt_build_reset_from_pkt(gnrc_pktsnip_t **out_pkt, gnrc_pktsnip_t *in_pkt)
Build a reset packet from an incoming packet.
Type to represent parts (either headers or payload) of a packet, called snips.