Go to the documentation of this file.
22 #ifndef NET_GNRC_TCP_H
23 #define NET_GNRC_TCP_H
29 #ifdef MODULE_GNRC_IPV6
44 #ifdef MODULE_GNRC_IPV6
68 uint16_t port, uint16_t netif);
130 uint16_t local_port);
180 const uint32_t user_timeout_duration_ms);
211 const uint32_t user_timeout_duration_ms);
gnrc_pktsnip_t * gnrc_tcp_hdr_build(gnrc_pktsnip_t *payload, uint16_t src, uint16_t dst)
Adds a TCP header to a given payload.
void gnrc_tcp_close(gnrc_tcp_tcb_t *tcb)
Close a TCP connection.
Data type to represent an IPv6 address.
int gnrc_tcp_calc_csum(const gnrc_pktsnip_t *hdr, const gnrc_pktsnip_t *pseudo_hdr)
Calculate and set checksum in TCP header.
uint16_t port
Port number (in host byte order)
int gnrc_tcp_open_active(gnrc_tcp_tcb_t *tcb, const gnrc_tcp_ep_t *remote, uint16_t local_port)
Opens a connection actively.
Transmission control block of GNRC TCP.
uint8_t dummy
Enable build without network module.
uint16_t netif
Network interface ID.
ssize_t gnrc_tcp_recv(gnrc_tcp_tcb_t *tcb, void *data, const size_t max_len, const uint32_t user_timeout_duration_ms)
Receive Data from the peer.
ssize_t gnrc_tcp_send(gnrc_tcp_tcb_t *tcb, const void *data, const size_t len, const uint32_t user_timeout_duration_ms)
Transmit data to connected peer.
int gnrc_tcp_ep_from_str(gnrc_tcp_ep_t *ep, const char *str)
Construct TCP connection endpoint from string.
void gnrc_tcp_abort(gnrc_tcp_tcb_t *tcb)
Abort a TCP connection.
General definitions for network packets and their helper functions.
Address information for a single TCP connection endpoint.
int gnrc_tcp_ep_init(gnrc_tcp_ep_t *ep, int family, const uint8_t *addr, size_t addr_size, uint16_t port, uint16_t netif)
Initialize TCP connection endpoint.
Definitions for GNRC's IPv6 implementation.
void gnrc_tcp_tcb_init(gnrc_tcp_tcb_t *tcb)
Initialize Transmission Control Block (TCB)
int gnrc_tcp_init(void)
Initialize TCP.
GNRC TCP transmission control block (TCB)
int family
IP address family.
int gnrc_tcp_open_passive(gnrc_tcp_tcb_t *tcb, const gnrc_tcp_ep_t *local)
Opens a connection passively, by waiting for an incoming request.
Type to represent parts (either headers or payload) of a packet, called snips.