helloBye3MemPool.hpp File Reference
#include <mutex>
#include <sstream>
#include "common.hpp"
#include "exceptions.hpp"
#include "headers.hpp"
#include "mbuf.hpp"
#include "stateMachine.hpp"
#include "../src/helloBye3MemPool.cpp"
Include dependency graph for helloBye3MemPool.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  HelloBye3MemPool::msg
 
class  HelloBye3MemPool::Identifier< Packet >
 
class  HelloBye3MemPool::Identifier< Packet >::ConnectionID
 
struct  HelloBye3MemPool::Identifier< Packet >::Hasher
 
struct  HelloBye3MemPool::Server::server
 
struct  HelloBye3MemPool::Server::States
 
struct  HelloBye3MemPool::Client::client
 
struct  HelloBye3MemPool::Client::States
 

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
objobject returned by HelloBye3MemPool_Client_init()
inPktsincoming packets to process
inCountnumber of incoming packets
sendCountNumber of packets in sendPkts
freeCountNumber of packets in freePkts
srcIPIP of the sender
dstIPIP of the listening server
srcPortPort the client should use
dstPortPort of the server
identIdentiry of the connection
Returns
void* to BufArray object (give to _getPkts() )

Definition at line 419 of file helloBye3MemPool.cpp.

Here is the call graph for this function:

◆ HelloBye3MemPool_Client_free()

void HelloBye3MemPool_Client_free ( void *  obj)

Free recources used by the state machine.

Parameters
objobject 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
objobject returned by HelloBye3MemPool_Client_process
sendPktsPackets to send out (size if given in sendCount)
freePktsPackets to free (size if given in freeCount)

Definition at line 442 of file helloBye3MemPool.cpp.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ 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
objobject returned by HelloBye3MemPool_Client_init()
inPktsincoming packets to process
inCountnumber of incoming packets
sendCountNumber of packets in sendPkts
freeCountNumber of packets in freePkts
Returns
void* to BufArray object (give to _getPkts() )

Definition at line 452 of file helloBye3MemPool.cpp.

Here is the call graph for this function:

◆ HelloBye3MemPool_Server_free()

void HelloBye3MemPool_Server_free ( void *  obj)

Free recources used by the state machine.

Parameters
objobject 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
objobject returned by HelloByeServer_process
sendPktsPackets to send out (size if given in sendCount)
freePktsPackets to free (size if given in freeCount)

Definition at line 368 of file helloBye3MemPool.cpp.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ 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
objobject returned by HelloByeServer_init()
inPktsincoming packets to process
inCountnumber of incoming packets
sendCountNumber of packets in sendPkts
freeCountNumber of packets in freePkts

Definition at line 353 of file helloBye3MemPool.cpp.

Here is the call graph for this function: