tcb.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2017 Simon Brummer
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef NET_GNRC_TCP_TCB_H
21 #define NET_GNRC_TCP_TCB_H
22 
23 #include <stdint.h>
24 #include "kernel_types.h"
25 #include "ringbuffer.h"
26 #include "mutex.h"
27 #include "evtimer_msg.h"
28 #include "evtimer_mbox.h"
29 #include "msg.h"
30 #include "mbox.h"
31 #include "net/gnrc/pkt.h"
32 #include "config.h"
33 
34 #ifdef MODULE_GNRC_IPV6
35 #include "net/gnrc/ipv6.h"
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
46  uint8_t address_family;
47 #ifdef MODULE_GNRC_IPV6
48  uint8_t local_addr[sizeof(ipv6_addr_t)];
49  uint8_t peer_addr[sizeof(ipv6_addr_t)];
50  int8_t ll_iface;
51 #endif
52  uint16_t local_port;
53  uint16_t peer_port;
54  uint8_t state;
55  uint8_t status;
56  uint32_t snd_una;
57  uint32_t snd_nxt;
58  uint16_t snd_wnd;
59  uint32_t snd_wl1;
60  uint32_t snd_wl2;
61  uint32_t rcv_nxt;
62  uint16_t rcv_wnd;
63  uint32_t iss;
64  uint32_t irs;
65  uint16_t mss;
66  uint32_t rtt_start;
67  int32_t rtt_var;
68  int32_t srtt;
69  int32_t rto;
70  uint8_t retries;
75  uint8_t *rcv_buf_raw;
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 #endif /* NET_GNRC_TCP_TCB_H */
86 
_transmission_control_block::local_addr
uint8_t local_addr[sizeof(ipv6_addr_t)]
Local IP address.
Definition: tcb.h:48
ringbuffer.h
A utility for storing and retrieving byte data using a ring buffer.
_transmission_control_block::address_family
uint8_t address_family
Address Family of local_addr / peer_addr.
Definition: tcb.h:46
ipv6_addr_t
Data type to represent an IPv6 address.
Definition: addr.h:74
_transmission_control_block::peer_port
uint16_t peer_port
Peer connections port number.
Definition: tcb.h:53
evtimer_mbox_event_t
Message box event definition.
Definition: evtimer_mbox.h:33
_transmission_control_block::snd_wl1
uint32_t snd_wl1
SeqNo.
Definition: tcb.h:59
_transmission_control_block::rcv_buf_raw
uint8_t * rcv_buf_raw
Pointer to the receive buffer.
Definition: tcb.h:75
_transmission_control_block::status
uint8_t status
A connections status flags.
Definition: tcb.h:55
_transmission_control_block::rcv_nxt
uint32_t rcv_nxt
Receive next.
Definition: tcb.h:61
_transmission_control_block::rcv_wnd
uint16_t rcv_wnd
Receive window.
Definition: tcb.h:62
_transmission_control_block::fsm_lock
mutex_t fsm_lock
Mutex for FSM access synchronization.
Definition: tcb.h:77
_transmission_control_block::irs
uint32_t irs
Initial received sequence number.
Definition: tcb.h:64
_transmission_control_block::mss
uint16_t mss
The peers MSS.
Definition: tcb.h:65
msg.h
Messaging API for inter process communication.
_transmission_control_block
Transmission control block of GNRC TCP.
Definition: tcb.h:45
_transmission_control_block::ll_iface
int8_t ll_iface
Link layer interface id to use.
Definition: tcb.h:50
config.h
GNRC TCP configuration.
evtimer_mbox.h
Message box based evtimer event.
evtimer_msg.h
IPC-based evtimer definitions.
_transmission_control_block::peer_addr
uint8_t peer_addr[sizeof(ipv6_addr_t)]
Peer IP address.
Definition: tcb.h:49
mbox_t
Mailbox struct definition.
Definition: mbox.h:41
_transmission_control_block::event_misc
evtimer_mbox_event_t event_misc
General purpose event.
Definition: tcb.h:72
_transmission_control_block::snd_wl2
uint32_t snd_wl2
AckNo.
Definition: tcb.h:60
mbox.h
Mailbox API.
_transmission_control_block::iss
uint32_t iss
Initial sequence sumber.
Definition: tcb.h:63
ringbuffer_t
Ringbuffer.
Definition: ringbuffer.h:36
pkt.h
General definitions for network packets and their helper functions.
_transmission_control_block::rcv_buf
ringbuffer_t rcv_buf
Receive buffer data structure.
Definition: tcb.h:76
_transmission_control_block::retries
uint8_t retries
Number of retransmissions.
Definition: tcb.h:70
_transmission_control_block::snd_wnd
uint16_t snd_wnd
Send window.
Definition: tcb.h:58
ipv6.h
Definitions for GNRC's IPv6 implementation.
_transmission_control_block::pkt_retransmit
gnrc_pktsnip_t * pkt_retransmit
Pointer to packet in "retransmit queue".
Definition: tcb.h:73
_transmission_control_block::rtt_var
int32_t rtt_var
Round trip time variance.
Definition: tcb.h:67
_transmission_control_block::srtt
int32_t srtt
Smoothed round trip time.
Definition: tcb.h:68
_transmission_control_block::mbox
mbox_t * mbox
TCB mbox for synchronization.
Definition: tcb.h:74
mutex.h
Mutex for thread synchronization.
_transmission_control_block::state
uint8_t state
Connections state.
Definition: tcb.h:54
_transmission_control_block::rto
int32_t rto
Retransmission timeout duration.
Definition: tcb.h:69
_transmission_control_block::rtt_start
uint32_t rtt_start
Timer value for rtt estimation.
Definition: tcb.h:66
_transmission_control_block::snd_una
uint32_t snd_una
Send unacknowledged.
Definition: tcb.h:56
_transmission_control_block::local_port
uint16_t local_port
Local connections port number.
Definition: tcb.h:52
evtimer_msg_event_t
IPC-message event.
Definition: evtimer_msg.h:40
_transmission_control_block::event_retransmit
evtimer_msg_event_t event_retransmit
Retransmission event.
Definition: tcb.h:71
_transmission_control_block::function_lock
mutex_t function_lock
Mutex for function call synchronization.
Definition: tcb.h:78
gnrc_pktsnip
Type to represent parts (either headers or payload) of a packet, called snips.
Definition: pkt.h:108
_transmission_control_block::snd_nxt
uint32_t snd_nxt
Send next.
Definition: tcb.h:57
kernel_types.h
Types used by the kernel.
mutex_t
Mutex structure.
Definition: mutex.h:120
_transmission_control_block::next
struct _transmission_control_block * next
Pointer next TCB.
Definition: tcb.h:79
gnrc_tcp_tcb_t
struct _transmission_control_block gnrc_tcp_tcb_t
Transmission control block of GNRC TCP.