The friendly Operating System for the Internet of Things
rcvbuf.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_INTERNAL_RCVBUF_H
23 #define GNRC_TCP_INTERNAL_RCVBUF_H
24 
25 #include <stdint.h>
26 #include "mutex.h"
27 #include "net/gnrc/tcp/config.h"
28 #include "net/gnrc/tcp/tcb.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
38 typedef struct rcvbuf_entry {
39  uint8_t used;
42 
47 typedef struct rcvbuf {
50 } rcvbuf_t;
51 
56 void _rcvbuf_init(void);
57 
67 
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* GNRC_TCP_INTERNAL_RCVBUF_H */
80 
#define GNRC_TCP_RCV_BUF_SIZE
Default Receive Buffer Size.
Definition: config.h:81
GNRC TCP transmission control block.
int _rcvbuf_get_buffer(gnrc_tcp_tcb_t *tcb)
Initializes and assigns receive Buffer to tcb.
void _rcvbuf_release_buffer(gnrc_tcp_tcb_t *tcb)
Free allocated receive buffer.
GNRC TCP configuration.
Struct for a single connections receive buffer.
Definition: rcvbuf.h:38
transmission control block of gnrc_tcp
Definition: tcb.h:50
void _rcvbuf_init(void)
Initializes global receive Buffer.
struct rcvbuf rcvbuf_t
Stuct holding receive buffers.
mutex_t lock
Lock for synchronization.
Definition: rcvbuf.h:48
struct rcvbuf_entry rcvbuf_entry_t
Struct for a single connections receive buffer.
RIOT synchronization API.
rcvbuf_entry_t entries[GNRC_TCP_RCV_BUFFERS]
Number of receive buffers.
Definition: rcvbuf.h:49
uint8_t buffer[GNRC_TCP_RCV_BUF_SIZE]
Raw Buffer Data.
Definition: rcvbuf.h:40
uint8_t used
Is entry currently in use.
Definition: rcvbuf.h:39
Mutex structure.
Definition: mutex.h:36
Stuct holding receive buffers.
Definition: rcvbuf.h:47
#define GNRC_TCP_RCV_BUFFERS
Number of preallocated receive buffers.
Definition: config.h:74