mikroSDK Reference Manual
tcp_fsm.h
Go to the documentation of this file.
1
31#ifndef _TCP_FSM_H
32#define _TCP_FSM_H
33
34//Dependencies
35#include "core/tcp.h"
36
37//C++ guard
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42//TCP FSM related functions
43void tcpProcessSegment(NetInterface *interface,
44 const IpPseudoHeader *pseudoHeader, const NetBuffer *buffer, size_t offset,
45 const NetRxAncillary *ancillary);
46
47void tcpStateClosed(NetInterface *interface, const IpPseudoHeader *pseudoHeader,
48 const TcpHeader *segment, size_t length);
49
50void tcpStateListen(Socket *socket, NetInterface *interface,
51 const IpPseudoHeader *pseudoHeader, const TcpHeader *segment, size_t length);
52
53void tcpStateSynSent(Socket *socket, const TcpHeader *segment, size_t length);
54
55void tcpStateSynReceived(Socket *socket, const TcpHeader *segment,
56 const NetBuffer *buffer, size_t offset, size_t length);
57
58void tcpStateEstablished(Socket *socket, const TcpHeader *segment,
59 const NetBuffer *buffer, size_t offset, size_t length);
60
61void tcpStateCloseWait(Socket *socket, const TcpHeader *segment, size_t length);
62
63void tcpStateLastAck(Socket *socket, const TcpHeader *segment, size_t length);
64
65void tcpStateFinWait1(Socket *socket, const TcpHeader *segment,
66 const NetBuffer *buffer, size_t offset, size_t length);
67
68void tcpStateFinWait2(Socket *socket, const TcpHeader *segment,
69 const NetBuffer *buffer, size_t offset, size_t length);
70
71void tcpStateClosing(Socket *socket, const TcpHeader *segment, size_t length);
72
73void tcpStateTimeWait(Socket *socket, const TcpHeader *segment, size_t length);
74
75//C++ guard
76#ifdef __cplusplus
77}
78#endif
79
80#endif
IP pseudo header.
Definition ip.h:91
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89
TCP (Transmission Control Protocol)