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  */
22 #ifndef NET_GNRC_TCP_TCB_H
23 #define NET_GNRC_TCP_TCB_H
25 #include <stdint.h>
26 #include "kernel_types.h"
27 #include "ringbuffer.h"
28 #include "xtimer.h"
29 #include "mutex.h"
30 #include "msg.h"
31 #include "mbox.h"
32 #include "net/gnrc/pkt.h"
33 #include "config.h"
35 #ifdef MODULE_GNRC_IPV6
36 #include "net/gnrc/ipv6.h"
37 #endif
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
46 #define GNRC_TCP_TCB_MBOX_SIZE (8U)
52  uint8_t address_family;
53 #ifdef MODULE_GNRC_IPV6
54  uint8_t local_addr[sizeof(ipv6_addr_t)];
55  uint8_t peer_addr[sizeof(ipv6_addr_t)];
56  int8_t ll_iface;
57 #endif
58  uint16_t local_port;
59  uint16_t peer_port;
60  uint8_t state;
61  uint8_t status;
62  uint32_t snd_una;
63  uint32_t snd_nxt;
64  uint16_t snd_wnd;
65  uint32_t snd_wl1;
66  uint32_t snd_wl2;
67  uint32_t rcv_nxt;
68  uint16_t rcv_wnd;
69  uint32_t iss;
70  uint32_t irs;
71  uint16_t mss;
72  uint32_t rtt_start;
73  int32_t rtt_var;
74  int32_t srtt;
75  int32_t rto;
76  uint8_t retries;
82  uint8_t *rcv_buf_raw;
89 #ifdef __cplusplus
90 }
91 #endif
92 #endif /* NET_GNRC_TCP_TCB_H */
Types used by the kernel.
A utility for storing and retrieving byte data using a ring buffer.
uint16_t snd_wnd
Send window.
Definition: tcb.h:64
int32_t rto
Retransmission timeout duration.
Definition: tcb.h:75
Mailbox struct definition.
Definition: mbox.h:39
Mailbox API.
General definitions for network packets and their helper functions.
uint16_t peer_port
Peer connections port number.
Definition: tcb.h:59
uint8_t peer_addr[sizeof(ipv6_addr_t)]
Peer IP address.
Definition: tcb.h:55
struct _transmission_control_block * next
Pointer next TCB.
Definition: tcb.h:86
uint32_t snd_wl1
Definition: tcb.h:65
uint32_t rtt_start
Timer value for rtt estimation.
Definition: tcb.h:72
int32_t srtt
Smoothed round trip time.
Definition: tcb.h:74
uint16_t local_port
Local connections port number.
Definition: tcb.h:58
ringbuffer_t rcv_buf
Receive buffer data structure.
Definition: tcb.h:83
int8_t ll_iface
Link layer interface id to use.
Definition: tcb.h:56
mutex_t function_lock
Mutex for function call synchronization.
Definition: tcb.h:85
Transmission control block of GNRC TCP.
Definition: tcb.h:51
uint8_t address_family
Address Family of local_addr / peer_addr.
Definition: tcb.h:52
Definition: ringbuffer.h:36
mbox_t mbox
TCB mbox for synchronization.
Definition: tcb.h:81
uint16_t rcv_wnd
Receive window.
Definition: tcb.h:68
GNRC TCP configuration.
uint32_t irs
Initial received sequence number.
Definition: tcb.h:70
uint16_t mss
The peers MSS.
Definition: tcb.h:71
Messaging API for inter process communication.
Definitions for GNRC&#39;s IPv6 implementation.
msg_t msg_tout
Message, sent on timeouts.
Definition: tcb.h:78
msg_t mbox_raw[GNRC_TCP_TCB_MBOX_SIZE]
Msg queue for mbox.
Definition: tcb.h:80
xtimer interface definitions
Describes a message object which can be sent between threads.
Definition: msg.h:184
uint32_t rcv_nxt
Receive next.
Definition: tcb.h:67
RIOT synchronization API.
uint32_t snd_wl2
Definition: tcb.h:66
gnrc_pktsnip_t * pkt_retransmit
Pointer to packet in "retransmit queue".
Definition: tcb.h:79
uint32_t snd_nxt
Send next.
Definition: tcb.h:63
struct _transmission_control_block gnrc_tcp_tcb_t
Transmission control block of GNRC TCP.
Type to represent parts (either headers or payload) of a packet, called snips.
Data type to represent an IPv6 address.
Definition: ipv6/addr.h:74
xtimer timer structure
Definition: xtimer.h:70
Mutex structure.
Definition: mutex.h:36
uint8_t local_addr[sizeof(ipv6_addr_t)]
Local IP address.
Definition: tcb.h:54
uint32_t snd_una
Send unacknowledged.
Definition: tcb.h:62
mutex_t fsm_lock
Mutex for FSM access synchronization.
Definition: tcb.h:84
xtimer_t tim_tout
Timer struct for timeouts.
Definition: tcb.h:77
uint32_t iss
Initial sequence sumber.
Definition: tcb.h:69
int32_t rtt_var
Round trip time variance.
Definition: tcb.h:73
Size of the TCB mbox.
Definition: tcb.h:46
uint8_t state
Connections state.
Definition: tcb.h:60
uint8_t * rcv_buf_raw
Pointer to the receive buffer.
Definition: tcb.h:82
uint8_t status
A connections status flags.
Definition: tcb.h:61
uint8_t retries
Number of retransmissions.
Definition: tcb.h:76