helloBye2_C.hpp File Reference
#include "helloBye2Proto.hpp"
#include <rte_mbuf.h>
Include dependency graph for helloBye2_C.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * HelloBye2_Server_init ()
 Init a HelloBye server. More...
 
void * HelloBye2_Server_process (void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount)
 Process a batch of packets. More...
 
void HelloBye2_Server_getPkts (void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts)
 Get the packets to send and free. More...
 
void HelloBye2_Server_free (void *obj)
 Free recources used by the state machine. More...
 
void * HelloBye2_Client_init ()
 Init a HelloBye client. More...
 
void HelloBye2_Client_config (uint32_t srcIP, uint16_t dstPort)
 Configure the client. More...
 
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. More...
 
void HelloBye2_Client_getPkts (void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts)
 Get the packets to send and free. More...
 
void * HelloBye2_Client_process (void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount)
 Process a batch of packets. More...
 
void HelloBye2_Client_free (void *obj)
 Free recources used by the state machine. More...
 

Function Documentation

◆ HelloBye2_Client_config()

void HelloBye2_Client_config ( uint32_t  srcIP,
uint16_t  dstPort 
)

Configure the client.

Parameters
srcIPSource IP, will be the same for all connections, host byte order
dstPortDestination port, will be the same for all connections, host byte order

Definition at line 83 of file helloBye2_C.cpp.

Here is the call graph for this function:

◆ HelloBye2_Client_connect()

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.

Parameters
objobject returned by HelloByeClient_init()
inPktsincoming packets to process
inCountnumber of incoming packets
sendCountNumber of packets in sendPkts
freeCountNumber of packets in freePkts
dstIPIP of the listening server
srcPortPort the client should use
identIdentiry of the connection
Returns
void* to BufArray object (give to _getPkts() )

Definition at line 91 of file helloBye2_C.cpp.

Here is the call graph for this function:

◆ HelloBye2_Client_free()

void HelloBye2_Client_free ( void *  obj)

Free recources used by the state machine.

Parameters
objobject returned by HelloByeClient_init()

Definition at line 144 of file helloBye2_C.cpp.

◆ HelloBye2_Client_getPkts()

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

Get the packets to send and free.

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

Definition at line 117 of file helloBye2_C.cpp.

Here is the call graph for this function:

◆ HelloBye2_Client_init()

void* HelloBye2_Client_init ( )

Init a HelloBye client.

Returns
void* to the object (opaque)

Definition at line 65 of file helloBye2_C.cpp.

◆ HelloBye2_Client_process()

void* HelloBye2_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 HelloByeClient_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 127 of file helloBye2_C.cpp.

Here is the call graph for this function:

◆ HelloBye2_Server_free()

void HelloBye2_Server_free ( void *  obj)

Free recources used by the state machine.

Parameters
objobject returned by HelloByeServer_init()

Definition at line 57 of file helloBye2_C.cpp.

◆ HelloBye2_Server_getPkts()

void HelloBye2_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 47 of file helloBye2_C.cpp.

Here is the call graph for this function:

◆ HelloBye2_Server_init()

void* HelloBye2_Server_init ( )

Init a HelloBye server.

Returns
void* to the object (opaque)

Definition at line 15 of file helloBye2_C.cpp.

Here is the call graph for this function:

◆ HelloBye2_Server_process()

void* HelloBye2_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 33 of file helloBye2_C.cpp.

Here is the call graph for this function: