dtlsClient.cpp
Go to the documentation of this file.
StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf > * sm
Definition: dtlsClient.cpp:300
void runPktBatch(BufArray< Packet > &pktsIn)
Run a batch of packets.
Definition: stateMachine.hpp:692
void configStateMachine(StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf > &sm)
Configure the state machine.
void * DtlsClient_connect(void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount, uint32_t srcIP, uint16_t srcPort)
Add one connection to the State Machine.
Definition: dtlsClient.cpp:320
void setDstAddr(std::array< uint8_t, 6 > addr)
Definition: headers.hpp:58
void DtlsClient_getPkts(void *obj, struct rte_mbuf **sendPkts, struct rte_mbuf **freePkts)
Get the packets from an opaque structure.
Definition: dtlsClient.cpp:346
void * DtlsClient_init(uint32_t dstIP, uint16_t dstPort, uint8_t srcMac[6], uint8_t dstMac[6])
Initialize a DTLS client.
Definition: dtlsClient.cpp:303
uint32_t getFreeCount() const
Get the number of packets currently marked as free.
Definition: bufArray.hpp:166
Definition: dtlsClient.cpp:294
SSL_CTX * createCTX()
Use this to create the SSL context for creaeteStateData()
Definition: dtlsClient.cpp:11
void setSrcAddr(const std::array< uint8_t, 6 > addr)
Definition: headers.hpp:54
StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State createStateData(SSL_CTX *ctx, uint32_t localIP, uint32_t remoteIP, uint16_t localPort, uint16_t remotePort, std::array< uint8_t, 6 > localMac, std::array< uint8_t, 6 > remoteMac)
Create the state of the client.
Definition: dtlsClient.cpp:55
void * DtlsClient_process(void *obj, struct rte_mbuf **inPkts, unsigned int inCount, unsigned int *sendCount, unsigned int *freeCount)
Process incoming packets.
Definition: dtlsClient.cpp:355
void runHandshake(StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State &state, mbuf *, StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface &funIface)
void sendData(StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State &state, mbuf *, StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface &funIface)
uint32_t getSendCount() const
Get the number of packets currently marked as send.
Definition: bufArray.hpp:151
void setPayloadLength(uint16_t length)
Set the length of the L4-SDU (UDP payload)
Definition: headers.hpp:243
Definition: IPv4_5TupleL2Ident.hpp:17
Definition: dtlsClient.hpp:16
void DtlsClient_free(void *obj)
Free recources used by the state machine.
Definition: dtlsClient.cpp:369
void getSendBufs(Packet **sendBufs) const
Get all the packets which are to be sent.
Definition: bufArray.hpp:175
void runTeardown(StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State &state, mbuf *, StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface &funIface)
Definition: dtlsClient.hpp:18
void registerFunction(StateID id, stateFun function)
Register a function for a given state.
Definition: stateMachine.hpp:597
void getFreeBufs(Packet **freeBufs) const
Get all the packets which are to be freed.
Definition: bufArray.hpp:193
uint16_t getPayloadLength() const
Get the length of the L4-SDU (UDP payload)
Definition: headers.hpp:238
void initHandshake(StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State &state, mbuf *, StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface &funIface)
void registerEndStateID(StateID endStateID)
This registers an end state If a connections reaches this id, it will be destroyed.
Definition: stateMachine.hpp:610