#include <mutex>
#include <sstream>
#include "common.hpp"
#include "exceptions.hpp"
#include "headers.hpp"
#include "mbuf.hpp"
#include "stateMachine.hpp"
#include "../src/helloBye3MemPool.cpp"
Go to the source code of this file.
Namespaces | |
HelloBye3MemPool | |
HelloBye3MemPool::Server | |
HelloBye3MemPool::Client | |
Functions | |
void * | HelloBye3MemPool::Server::factory (Identifier< mbuf >::ConnectionID id) |
void | HelloBye3MemPool::Server::runHello (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface) |
void | HelloBye3MemPool::Server::runBye (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface) |
StateMachine< Identifier< mbuf >, mbuf >::State | HelloBye3MemPool::Client::createHello (uint32_t srcIp, uint32_t dstIp, uint16_t srcPort, uint16_t dstPort, uint64_t ident) |
void | HelloBye3MemPool::Client::runHello (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface) |
void | HelloBye3MemPool::Client::runBye (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface) |
void | HelloBye3MemPool::Client::runRecvBye (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface) |
void * | HelloBye3MemPool_Server_init () |
Init a HelloBye server. More... | |
void * | HelloBye3MemPool_Server_process (void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount) |
Process a batch of packets. More... | |
void | HelloBye3MemPool_Server_getPkts (void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts) |
Get the packets to send and free. More... | |
void | HelloBye3MemPool_Server_free (void *obj) |
Free recources used by the state machine. More... | |
void * | HelloBye3MemPool_Client_init () |
Init a HelloBye client. More... | |
void * | HelloBye3MemPool_Client_connect (void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount, uint32_t srcIP, uint32_t dstIP, uint16_t srcPort, uint16_t dstPort, uint64_t ident) |
Open a connection to a server. More... | |
void | HelloBye3MemPool_Client_getPkts (void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts) |
Get the packets to send and free. More... | |
void * | HelloBye3MemPool_Client_process (void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount) |
Process a batch of packets. More... | |
void | HelloBye3MemPool_Client_free (void *obj) |
Free recources used by the state machine. More... | |
Function Documentation
◆ HelloBye3MemPool_Client_connect()
void* HelloBye3MemPool_Client_connect | ( | void * | obj, |
struct rte_mbuf ** | inPkts, | ||
unsigned int | inCount, | ||
unsigned int * | sendCount, | ||
unsigned int * | freeCount, | ||
uint32_t | srcIP, | ||
uint32_t | dstIP, | ||
uint16_t | srcPort, | ||
uint16_t | dstPort, | ||
uint64_t | ident | ||
) |
Open a connection to a server.
- Parameters
-
obj object returned by HelloBye3MemPool_Client_init() inPkts incoming packets to process inCount number of incoming packets sendCount Number of packets in sendPkts freeCount Number of packets in freePkts srcIP IP of the sender dstIP IP of the listening server srcPort Port the client should use dstPort Port of the server ident Identiry of the connection
- Returns
- void* to BufArray object (give to _getPkts() )
Definition at line 419 of file helloBye3MemPool.cpp.
◆ HelloBye3MemPool_Client_free()
void HelloBye3MemPool_Client_free | ( | void * | obj | ) |
Free recources used by the state machine.
- Parameters
-
obj object returned by HelloBye3MemPool_Client_init()
Definition at line 466 of file helloBye3MemPool.cpp.
◆ HelloBye3MemPool_Client_getPkts()
void HelloBye3MemPool_Client_getPkts | ( | void * | obj, |
struct rte_mbuf ** | sendPkts, | ||
struct rte_mbuf ** | freePkts | ||
) |
Get the packets to send and free.
- Parameters
-
obj object returned by HelloBye3MemPool_Client_process sendPkts Packets to send out (size if given in sendCount) freePkts Packets to free (size if given in freeCount)
Definition at line 442 of file helloBye3MemPool.cpp.
◆ HelloBye3MemPool_Client_init()
void* HelloBye3MemPool_Client_init | ( | ) |
Init a HelloBye client.
- Returns
- void* to the object (opaque)
Definition at line 387 of file helloBye3MemPool.cpp.
◆ HelloBye3MemPool_Client_process()
void* HelloBye3MemPool_Client_process | ( | void * | obj, |
struct rte_mbuf ** | inPkts, | ||
unsigned int | inCount, | ||
unsigned int * | sendCount, | ||
unsigned int * | freeCount | ||
) |
Process a batch of packets.
- Parameters
-
obj object returned by HelloBye3MemPool_Client_init() inPkts incoming packets to process inCount number of incoming packets sendCount Number of packets in sendPkts freeCount Number of packets in freePkts
- Returns
- void* to BufArray object (give to _getPkts() )
Definition at line 452 of file helloBye3MemPool.cpp.
◆ HelloBye3MemPool_Server_free()
void HelloBye3MemPool_Server_free | ( | void * | obj | ) |
Free recources used by the state machine.
- Parameters
-
obj object returned by HelloByeServer_init()
Definition at line 378 of file helloBye3MemPool.cpp.
◆ HelloBye3MemPool_Server_getPkts()
void HelloBye3MemPool_Server_getPkts | ( | void * | obj, |
struct rte_mbuf ** | sendPkts, | ||
struct rte_mbuf ** | freePkts | ||
) |
Get the packets to send and free.
- Parameters
-
obj object returned by HelloByeServer_process sendPkts Packets to send out (size if given in sendCount) freePkts Packets to free (size if given in freeCount)
Definition at line 368 of file helloBye3MemPool.cpp.
◆ HelloBye3MemPool_Server_init()
void* HelloBye3MemPool_Server_init | ( | ) |
Init a HelloBye server.
- Returns
- void* to the object (opaque)
Definition at line 321 of file helloBye3MemPool.cpp.
◆ HelloBye3MemPool_Server_process()
void* HelloBye3MemPool_Server_process | ( | void * | obj, |
struct rte_mbuf ** | inPkts, | ||
unsigned int | inCount, | ||
unsigned int * | sendCount, | ||
unsigned int * | freeCount | ||
) |
Process a batch of packets.
- Parameters
-
obj object returned by HelloByeServer_init() inPkts incoming packets to process inCount number of incoming packets sendCount Number of packets in sendPkts freeCount Number of packets in freePkts
Definition at line 353 of file helloBye3MemPool.cpp.