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 #endif
57  uint16_t local_port;
58  uint16_t peer_port;
59  uint8_t state;
60  uint8_t status;
61  uint32_t snd_una;
62  uint32_t snd_nxt;
63  uint16_t snd_wnd;
64  uint32_t snd_wl1;
65  uint32_t snd_wl2;
66  uint32_t rcv_nxt;
67  uint16_t rcv_wnd;
68  uint32_t iss;
69  uint32_t irs;
70  uint16_t mss;
71  uint32_t rtt_start;
72  int32_t rtt_var;
73  int32_t srtt;
74  int32_t rto;
75  uint8_t retries;
81  uint8_t *rcv_buf_raw;
88 #ifdef __cplusplus
89 }
90 #endif
91 #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:63
int32_t rto
Retransmission timeout duration.
Definition: tcb.h:74
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:58
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:85
GNRC TCP configuration.
uint32_t snd_wl1
Definition: tcb.h:64
uint32_t rtt_start
Timer value for rtt estimation.
Definition: tcb.h:71
int32_t srtt
Smoothed round trip time.
Definition: tcb.h:73
uint16_t local_port
Local connections port number.
Definition: tcb.h:57
ringbuffer_t rcv_buf
Receive buffer data structure.
Definition: tcb.h:82
mutex_t function_lock
Mutex for function call synchronization.
Definition: tcb.h:84
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:80
uint16_t rcv_wnd
Receive window.
Definition: tcb.h:67
uint32_t irs
Initial received sequence number.
Definition: tcb.h:69
uint16_t mss
The peers MSS.
Definition: tcb.h:70
Messaging API for inter process communication.
Definitions for GNRC&#39;s IPv6 implementation.
msg_t msg_tout
Message, sent on timeouts.
Definition: tcb.h:77
msg_t mbox_raw[GNRC_TCP_TCB_MBOX_SIZE]
Msg queue for mbox.
Definition: tcb.h:79
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:66
RIOT synchronization API.
uint32_t snd_wl2
Definition: tcb.h:65
gnrc_pktsnip_t * pkt_retransmit
Pointer to packet in "retransmit queue".
Definition: tcb.h:78
uint32_t snd_nxt
Send next.
Definition: tcb.h:62
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:61
mutex_t fsm_lock
Mutex for FSM access synchronization.
Definition: tcb.h:83
xtimer_t tim_tout
Timer struct for timeouts.
Definition: tcb.h:76
uint32_t iss
Initial sequence sumber.
Definition: tcb.h:68
int32_t rtt_var
Round trip time variance.
Definition: tcb.h:72
Size of the TCB mbox.
Definition: tcb.h:46
uint8_t state
Connections state.
Definition: tcb.h:59
uint8_t * rcv_buf_raw
Pointer to the receive buffer.
Definition: tcb.h:81
uint8_t status
A connections status flags.
Definition: tcb.h:60
uint8_t retries
Number of retransmissions.
Definition: tcb.h:75