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

Go to the source code of this file.

Classes

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

Namespaces

 HelloBye3
 
 HelloBye3::Server
 
 HelloBye3::Client
 

Functions

void * HelloBye3::Server::factory (Identifier< mbuf >::ConnectionID id)
 
void HelloBye3::Server::runHello (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface)
 
void HelloBye3::Server::runBye (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface)
 
StateMachine< Identifier< mbuf >, mbuf >::State HelloBye3::Client::createHello (uint32_t srcIp, uint32_t dstIp, uint16_t srcPort, uint16_t dstPort, uint64_t ident)
 
void HelloBye3::Client::runHello (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface)
 
void HelloBye3::Client::runBye (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface)
 
void HelloBye3::Client::runRecvBye (StateMachine< Identifier< mbuf >, mbuf >::State &state, mbuf *pkt, StateMachine< Identifier< mbuf >, mbuf >::FunIface &funIface)
 
void * HelloBye3_Server_init ()
 Init a HelloBye server. More...
 
void * HelloBye3_Server_process (void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount)
 Process a batch of packets. More...
 
void HelloBye3_Server_getPkts (void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts)
 Get the packets to send and free. More...
 
void HelloBye3_Server_free (void *obj)
 Free recources used by the state machine. More...
 
void * HelloBye3_Client_init ()
 Init a HelloBye client. More...
 
void * HelloBye3_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 HelloBye3_Client_getPkts (void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts)
 Get the packets to send and free. More...
 
void * HelloBye3_Client_process (void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount)
 Process a batch of packets. More...
 
void HelloBye3_Client_free (void *obj)
 Free recources used by the state machine. More...
 

Function Documentation

◆ HelloBye3_Client_connect()

void* HelloBye3_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 HelloBye3_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 363 of file helloBye3.cpp.

Here is the call graph for this function:

◆ HelloBye3_Client_free()

void HelloBye3_Client_free ( void *  obj)

Free recources used by the state machine.

Parameters
objobject returned by HelloBye3_Client_init()

Definition at line 408 of file helloBye3.cpp.

◆ HelloBye3_Client_getPkts()

void HelloBye3_Client_getPkts ( void *  obj,
struct rte_mbuf **  sendPkts,
struct rte_mbuf **  freePkts 
)

Get the packets to send and free.

Parameters
objobject returned by HelloBye3_Client_process
sendPktsPackets to send out (size if given in sendCount)
freePktsPackets to free (size if given in freeCount)

Definition at line 385 of file helloBye3.cpp.

Here is the call graph for this function:

◆ HelloBye3_Client_init()

void* HelloBye3_Client_init ( )

Init a HelloBye client.

Returns
void* to the object (opaque)

Definition at line 348 of file helloBye3.cpp.

Here is the call graph for this function:

◆ HelloBye3_Client_process()

void* HelloBye3_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 HelloBye3_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 395 of file helloBye3.cpp.

Here is the call graph for this function:

◆ HelloBye3_Server_free()

void HelloBye3_Server_free ( void *  obj)

Free recources used by the state machine.

Parameters
objobject returned by HelloByeServer_init()

Definition at line 340 of file helloBye3.cpp.

◆ HelloBye3_Server_getPkts()

void HelloBye3_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 330 of file helloBye3.cpp.

Here is the call graph for this function:

◆ HelloBye3_Server_init()

void* HelloBye3_Server_init ( )

Init a HelloBye server.

Returns
void* to the object (opaque)

Definition at line 301 of file helloBye3.cpp.

Here is the call graph for this function:

◆ HelloBye3_Server_process()

void* HelloBye3_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 316 of file helloBye3.cpp.

Here is the call graph for this function: