All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sir_tcp.h
Go to the documentation of this file.
1 /*
2  * sir_tcp.h
3  *
4  * Created on: Mar 10, 2014
5  * Author: root
6  */
7 
8 #ifndef SIR_TCP_H_
9 #define SIR_TCP_H_
10 
12 #include "ip/sir_ip_includes.h"
13 #include "socket/sir_isocket.h"
14 #include "tcp/sir_tcp_syncache.h"
15 
16 class CSirius; // Forward declaration of Sirius class
17 
19 {
20 public:
21  static CSiriusTCP *Instance(void);
22  void Init(int iInstance, void *pCSiriusI, void *pCSirius);
23  bool TCP_Timing();
24  uint16_t GetEphemeralPort(void);
25  bool FreeEphemeralPort(uint16_t ui16EphemeralPort);
26  bool Handle_TCP_Packet(sir_tcp_tcb *pTCB, sir_tcp_parse *tTcpParse, CSiriusMemList *ptMemList);
28  void Notification(sir_tcp_tcb *pTCB);
29  static int TCPParseIncoming(sir_tcp_parse *ptTcpParse, CSiriusMemList *ptMemList);
30 
31 private:
32  void Update_Window(sir_tcp_tcb *ptTCB);
33  bool RemoveSocket(int fd);
34 
35  ISirius *m_pISirius; // Pointer to interface class
36  CSirius *m_pSirius; // Pointer to socket class
37  CFreeIndexStorage<uint16_t> m_cEphemeralPort;
38 };
39 
40 #endif /* SIR_TCP_H_ */
Sirius interface class.
Definition: sir_isocket.h:20
ETcp_User_Calls
sir_tcp_tcb * Handle_TCP_UserCalls(ETcp_User_Calls eTcp_User_Calls, sir_tcp_tcb *ptTCB)
void Init(int iInstance, void *pCSiriusI, void *pCSirius)
void Notification(sir_tcp_tcb *pTCB)
static CSiriusTCP * Instance(void)
Sirius main class.
Definition: sir_socket.h:40
static int TCPParseIncoming(sir_tcp_parse *ptTcpParse, CSiriusMemList *ptMemList)
uint16_t GetEphemeralPort(void)
Most important class of Sirius. Used to maintain and process all kinds of queues. ...
Definition: sir_memlist.h:51
bool TCP_Timing()
bool FreeEphemeralPort(uint16_t ui16EphemeralPort)
bool Handle_TCP_Packet(sir_tcp_tcb *pTCB, sir_tcp_parse *tTcpParse, CSiriusMemList *ptMemList)