Classes | |
struct | dtlsClient |
struct | States |
The state of the DTLS client. More... | |
Functions | |
SSL_CTX * | createCTX () |
Use this to create the SSL context for creaeteStateData() More... | |
void | configStateMachine (StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf > &sm) |
Configure the state machine. More... | |
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. More... | |
void | initHandshake (StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State &state, mbuf *, StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface &funIface) |
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) |
void | runTeardown (StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State &state, mbuf *, StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface &funIface) |
void | configStateMachine (SM &sm) |
void | initHandshake (SM::State &state, mbuf *pkt, SM::FunIface &funIface) |
void | runHandshake (SM::State &state, mbuf *pkt, SM::FunIface &funIface) |
void | sendData (SM::State &state, mbuf *pkt, SM::FunIface &funIface) |
void | runTeardown (SM::State &state, mbuf *pkt, SM::FunIface &funIface) |
Function Documentation
◆ configStateMachine() [1/2]
void DTLS_Client::configStateMachine | ( | SM & | sm | ) |
◆ configStateMachine() [2/2]
void DTLS_Client::configStateMachine | ( | StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf > & | sm | ) |
Configure the state machine.
This functon takes the state machine and configures it according to this implementation of a DTLS client. In pratice, this means, that it will set the functions to be executed within each state.
- Parameters
-
sm The state machine to be configured
◆ createCTX()
SSL_CTX * DTLS_Client::createCTX | ( | ) |
Use this to create the SSL context for creaeteStateData()
- Returns
- SSL context suitable to create a DTLS client
Definition at line 11 of file dtlsClient.cpp.
◆ createStateData()
SM::State DTLS_Client::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.
- Parameters
-
ctx SSL context, get this from createCTX() localIP IP of this host (client) remoteIP IP of the peer (server) localPort Source port of this client remotePort Destination port of the server localMac MAC address of the client NIC remoteMac MAC address of the next hop
- Returns
- The complete state to kick of a client connection
Definition at line 55 of file dtlsClient.cpp.
◆ initHandshake() [1/2]
void DTLS_Client::initHandshake | ( | StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State & | state, |
mbuf * | , | ||
StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface & | funIface | ||
) |
◆ initHandshake() [2/2]
void DTLS_Client::initHandshake | ( | SM::State & | state, |
mbuf * | pkt, | ||
SM::FunIface & | funIface | ||
) |
Definition at line 173 of file dtlsClient.cpp.
◆ runHandshake() [1/2]
void DTLS_Client::runHandshake | ( | StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State & | state, |
mbuf * | , | ||
StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface & | funIface | ||
) |
◆ runHandshake() [2/2]
void DTLS_Client::runHandshake | ( | SM::State & | state, |
mbuf * | pkt, | ||
SM::FunIface & | funIface | ||
) |
◆ runTeardown() [1/2]
void DTLS_Client::runTeardown | ( | StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State & | state, |
mbuf * | , | ||
StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface & | funIface | ||
) |
◆ runTeardown() [2/2]
void DTLS_Client::runTeardown | ( | SM::State & | state, |
mbuf * | pkt, | ||
SM::FunIface & | funIface | ||
) |
◆ sendData() [1/2]
void DTLS_Client::sendData | ( | StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::State & | state, |
mbuf * | , | ||
StateMachine< IPv4_5TupleL2Ident< mbuf >, mbuf >::FunIface & | funIface | ||
) |
◆ sendData() [2/2]
void DTLS_Client::sendData | ( | SM::State & | state, |
mbuf * | pkt, | ||
SM::FunIface & | funIface | ||
) |