The friendly Operating System for the Internet of Things
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 
22 #ifndef GNRC_TCP_TCB_H
23 #define GNRC_TCP_TCB_H
24 
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 "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 
45 #define GNRC_TCP_TCB_MSG_QUEUE_SIZE (8U)
46 
51  uint8_t address_family;
52 #ifdef MODULE_GNRC_IPV6
53  uint8_t local_addr[sizeof(ipv6_addr_t)];
54  uint8_t peer_addr[sizeof(ipv6_addr_t)];
55 #endif
56  uint16_t local_port;
57  uint16_t peer_port;
58  uint8_t state;
59  uint8_t status;
60  uint32_t snd_una;
61  uint32_t snd_nxt;
62  uint16_t snd_wnd;
63  uint32_t snd_wl1;
64  uint32_t snd_wl2;
65  uint32_t rcv_nxt;
66  uint16_t rcv_wnd;
67  uint32_t iss;
68  uint32_t irs;
69  uint16_t mss;
70  uint32_t rtt_start;
71  int32_t rtt_var;
72  int32_t srtt;
73  int32_t rto;
74  uint8_t retries;
80  uint8_t *rcv_buf_raw;
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 #endif /* GNRC_TCP_TCB_H */
91 
Types used by the kernel.
Ringbuffer header.
uint16_t snd_wnd
Send Window.
Definition: tcb.h:62
int32_t rto
Retransmission Timeout Duration.
Definition: tcb.h:73
int16_t kernel_pid_t
Unique process identifier.
Definition: kernel_types.h:83
General definitions for network packets and their helper functions.
uint16_t peer_port
port connections port number
Definition: tcb.h:57
uint8_t peer_addr[sizeof(ipv6_addr_t)]
peer IP address
Definition: tcb.h:54
struct _transmission_control_block * next
Pointer next TCP connection.
Definition: tcb.h:84
GNRC TCP configuration.
uint32_t snd_wl1
SeqNo.
Definition: tcb.h:63
uint32_t rtt_start
Timer value for rtt estimation.
Definition: tcb.h:70
int32_t srtt
Smoothed Round Trip Time.
Definition: tcb.h:72
uint16_t local_port
local connections port number
Definition: tcb.h:56
ringbuffer_t rcv_buf
Receive Buffer data structure.
Definition: tcb.h:81
mutex_t function_lock
Mutex for Function call synchronization.
Definition: tcb.h:83
transmission control block of gnrc_tcp
Definition: tcb.h:50
uint8_t address_family
Address Family of local_addr and peer_addr.
Definition: tcb.h:51
Ringbuffer.
Definition: ringbuffer.h:30
uint16_t rcv_wnd
Receive Window.
Definition: tcb.h:66
uint32_t irs
Initial Received Sequence Number.
Definition: tcb.h:68
kernel_pid_t owner
PID of this connection handling thread.
Definition: tcb.h:78
uint16_t mss
The peers MSS.
Definition: tcb.h:69
#define GNRC_TCP_TCB_MSG_QUEUE_SIZE
Size of the tcbs internal message queue.
Definition: tcb.h:45
Messaging API for inter process communication.
Definitions for GNRC's IPv6 implementation.
msg_t msg_tout
Message, sent on timeouts.
Definition: tcb.h:76
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:65
RIOT synchronization API.
uint32_t snd_wl2
AckNo.
Definition: tcb.h:64
gnrc_pktsnip_t * pkt_retransmit
Pointer to Packet in "retransmit queue".
Definition: tcb.h:77
uint32_t snd_nxt
Send Next.
Definition: tcb.h:61
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:53
uint32_t snd_una
Send Unacknowledged.
Definition: tcb.h:60
mutex_t fsm_lock
Mutex for FSM access synchronization.
Definition: tcb.h:82
xtimer_t tim_tout
Timer struct for timeouts.
Definition: tcb.h:75
msg_t msg_queue[GNRC_TCP_TCB_MSG_QUEUE_SIZE]
Tcb's message queue.
Definition: tcb.h:79
uint32_t iss
Initial Sequence Number.
Definition: tcb.h:67
int32_t rtt_var
Round Trip Time variance.
Definition: tcb.h:71
uint8_t state
Connections state.
Definition: tcb.h:58
uint8_t * rcv_buf_raw
Pointer to the receive buffer.
Definition: tcb.h:80
uint8_t status
A connections status flags.
Definition: tcb.h:59
uint8_t retries
Number of Retransmissions.
Definition: tcb.h:74