Loading...
Searching...
No Matches
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 "ringbuffer.h"
25#include "mutex.h"
26#include "evtimer_msg.h"
27#include "evtimer_mbox.h"
28#include "msg.h"
29#include "mbox.h"
30#include "net/gnrc/pkt.h"
31#include "config.h"
32
33#ifdef MODULE_GNRC_IPV6
34#include "net/gnrc/ipv6.h"
35#endif
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
44typedef struct sock_tcp {
46#ifdef MODULE_GNRC_IPV6
47 uint8_t local_addr[sizeof(ipv6_addr_t)];
48 uint8_t peer_addr[sizeof(ipv6_addr_t)];
49 int8_t ll_iface;
50#endif
51 uint16_t local_port;
52 uint16_t peer_port;
53 uint8_t state;
54 uint8_t status;
55 uint32_t snd_una;
56 uint32_t snd_nxt;
57 uint16_t snd_wnd;
58 uint32_t snd_wl1;
59 uint32_t snd_wl2;
60 uint32_t rcv_nxt;
61 uint16_t rcv_wnd;
62 uint32_t iss;
63 uint32_t irs;
64 uint16_t mss;
65 uint32_t rtt_start;
66 int32_t rtt_var;
67 int32_t srtt;
68 int32_t rto;
69 uint8_t retries;
75 uint8_t *rcv_buf_raw;
79 struct sock_tcp *next;
81
85typedef struct sock_tcp_queue {
88 size_t tcbs_len;
90
94#define GNRC_TCP_TCB_QUEUE_INIT { MUTEX_INIT, NULL, 0 }
95
96#ifdef __cplusplus
97}
98#endif
99#endif /* NET_GNRC_TCP_TCB_H */
Message box based evtimer event.
IPC-based evtimer definitions.
Definitions for GNRC's IPv6 implementation.
Mailbox API.
Mutex for thread synchronization.
General definitions for network packets and their helper functions.
A utility for storing and retrieving byte data using a ring buffer.
Message box event definition.
IPC-message event.
Definition evtimer_msg.h:40
Type to represent parts (either headers or payload) of a packet, called snips.
Definition pkt.h:108
Mailbox struct definition.
Definition mbox.h:41
Mutex structure.
Definition mutex.h:146
Ringbuffer.
Definition ringbuffer.h:36
TCP queue type.
Definition sock_types.h:114
mutex_t lock
Mutex for access synchronization.
Definition tcb.h:86
gnrc_tcp_tcb_t * tcbs
Pointer to TCB sequence.
Definition tcb.h:87
size_t tcbs_len
Number of TCBs behind member tcbs.
Definition tcb.h:88
TCP sock type.
Definition sock_types.h:101
mutex_t fsm_lock
Mutex for FSM access synchronization.
Definition tcb.h:77
uint8_t address_family
Address Family of local_addr / peer_addr.
Definition tcb.h:45
uint16_t local_port
Local connections port number.
Definition tcb.h:51
uint16_t snd_wnd
Send window.
Definition tcb.h:57
uint8_t state
Connections state.
Definition tcb.h:53
ringbuffer_t rcv_buf
Receive buffer data structure.
Definition tcb.h:76
uint8_t peer_addr[sizeof(ipv6_addr_t)]
Peer IP address.
Definition tcb.h:48
evtimer_mbox_event_t event_misc
General purpose event.
Definition tcb.h:72
evtimer_msg_event_t event_timeout
Timeout event.
Definition tcb.h:71
int32_t rto
Retransmission timeout duration.
Definition tcb.h:68
evtimer_msg_event_t event_retransmit
Retransmission event.
Definition tcb.h:70
uint32_t snd_una
Send unacknowledged.
Definition tcb.h:55
uint32_t iss
Initial sequence sumber.
Definition tcb.h:62
uint8_t status
A connections status flags.
Definition tcb.h:54
uint16_t mss
The peers MSS.
Definition tcb.h:64
uint16_t rcv_wnd
Receive window.
Definition tcb.h:61
gnrc_pktsnip_t * pkt_retransmit
Pointer to packet in "retransmit queue".
Definition tcb.h:73
mbox_t * mbox
TCB mbox for synchronization.
Definition tcb.h:74
int32_t rtt_var
Round trip time variance.
Definition tcb.h:66
uint32_t snd_wl2
AckNo.
Definition tcb.h:59
uint32_t snd_nxt
Send next.
Definition tcb.h:56
uint32_t rtt_start
Timer value for rtt estimation.
Definition tcb.h:65
uint32_t snd_wl1
SeqNo.
Definition tcb.h:58
int8_t ll_iface
Link layer interface id to use.
Definition tcb.h:49
uint32_t irs
Initial received sequence number.
Definition tcb.h:63
mutex_t function_lock
Mutex for function call synchronization.
Definition tcb.h:78
struct sock_tcp * next
Pointer next TCB.
Definition tcb.h:79
uint8_t local_addr[sizeof(ipv6_addr_t)]
Local IP address.
Definition tcb.h:47
uint16_t peer_port
Peer connections port number.
Definition tcb.h:52
int32_t srtt
Smoothed round trip time.
Definition tcb.h:67
uint32_t rcv_nxt
Receive next.
Definition tcb.h:60
uint8_t * rcv_buf_raw
Pointer to the receive buffer.
Definition tcb.h:75
uint8_t retries
Number of retransmissions.
Definition tcb.h:69
ztimer default configuration
struct sock_tcp_queue gnrc_tcp_tcb_queue_t
Transmission control block queue.
struct sock_tcp gnrc_tcp_tcb_t
Transmission control block of GNRC TCP.
Data type to represent an IPv6 address.
Definition addr.h:72