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
-
obj object returned by HelloBye3_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 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
-
obj object 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
-
obj object returned by HelloBye3_Client_process sendPkts Packets to send out (size if given in sendCount) freePkts Packets 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
-
obj object returned by HelloBye3_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 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
-
obj object 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
-
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 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
-
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 316 of file helloBye3.cpp.
Here is the call graph for this function: