helloBye2_C.hpp
Go to the documentation of this file.
1 #ifndef HELLOBYE_C
2 #define HELLOBYE_C
3 
4 #include "helloBye2Proto.hpp"
5 
6 #include <rte_mbuf.h>
7 
8 extern "C" {
9 
10 /*
11  * XXX -------------------------------------------- XXX
12  * Server
13  * XXX -------------------------------------------- XXX
14  */
15 
20 void *HelloBye2_Server_init();
21 
30 void *HelloBye2_Server_process(void *obj, struct rte_mbuf **inPkts, unsigned int inCount,
31  unsigned int *sendCount, unsigned int *freeCount);
32 
40  void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts);
41 
46 void HelloBye2_Server_free(void *obj);
47 
48 /*
49  * XXX -------------------------------------------- XXX
50  * Client
51  * XXX -------------------------------------------- XXX
52  */
53 
58 void *HelloBye2_Client_init();
59 
65 void HelloBye2_Client_config(uint32_t srcIP, uint16_t dstPort);
66 
79 void *HelloBye2_Client_connect(void *obj, struct rte_mbuf **inPkts, unsigned int inCount,
80  unsigned int *sendCount, unsigned int *freeCount, uint32_t dstIP, uint16_t srcPort,
81  uint64_t ident);
82 
90  void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts);
91 
101 void *HelloBye2_Client_process(void *obj, struct rte_mbuf **inPkts, unsigned int inCount,
102  unsigned int *sendCount, unsigned int *freeCount);
103 
108 void HelloBye2_Client_free(void *obj);
109 };
110 
111 #endif /* HELLOBYE_C */
void * HelloBye2_Client_process(void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount)
Process a batch of packets.
void HelloBye2_Server_getPkts(void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts)
Get the packets to send and free.
Definition: helloBye2_C.cpp:47
void HelloBye2_Client_getPkts(void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts)
Get the packets to send and free.
void * HelloBye2_Client_init()
Init a HelloBye client.
Definition: helloBye2_C.cpp:65
void HelloBye2_Server_free(void *obj)
Free recources used by the state machine.
Definition: helloBye2_C.cpp:57
void HelloBye2_Client_free(void *obj)
Free recources used by the state machine.
void * HelloBye2_Client_connect(void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount, uint32_t dstIP, uint16_t srcPort, uint64_t ident)
Open a connection to a server.
Definition: helloBye2_C.cpp:91
void * HelloBye2_Server_process(void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount)
Process a batch of packets.
Definition: helloBye2_C.cpp:33
void * HelloBye2_Server_init()
Init a HelloBye server.
Definition: helloBye2_C.cpp:15
void HelloBye2_Client_config(uint32_t srcIP, uint16_t dstPort)
Configure the client.
Definition: helloBye2_C.cpp:83