|
| jdrive (bool listen, int port, ProtocolPP::protocol_t prot, ProtocolPP::iana_t lvl3, ProtocolPP::protocol_t lvl2, bool lvl3_sec, std::string &host, unsigned long iquesize, unsigned long oquesize, uint64_t seed, ProtocolPP::endian_t endianess, std::shared_ptr< InterfacePP::jmmu > &mmu, std::shared_ptr< InterfacePP::jlogger > &logger) |
|
virtual | ~jdrive ()=default |
| standard deconstructor
|
|
uint64_t | write_mem (uint8_t *data, uint32_t length) |
|
uint32_t | send (uint8_t *packet, uint32_t size) |
|
uint32_t | send (std::shared_ptr< ProtocolPP::jarray< uint8_t >> &input) |
|
bool | rcv () |
|
uint32_t | pop (uint8_t *output) |
|
uint32_t | pop (std::shared_ptr< ProtocolPP::jarray< uint8_t >> &output) |
|
uint32_t | get_size () |
|
void | teardown () |
| terminate the driver
|
|
| jdrive (jdrive &rhs)=delete |
|
| jdrive (const jdrive &rhs)=delete |
|
◆ jdrive()
DriverPP::jdrive::jdrive |
( |
bool |
listen, |
|
|
int |
port, |
|
|
ProtocolPP::protocol_t |
prot, |
|
|
ProtocolPP::iana_t |
lvl3, |
|
|
ProtocolPP::protocol_t |
lvl2, |
|
|
bool |
lvl3_sec, |
|
|
std::string & |
host, |
|
|
unsigned long |
iquesize, |
|
|
unsigned long |
oquesize, |
|
|
uint64_t |
seed, |
|
|
ProtocolPP::endian_t |
endianess, |
|
|
std::shared_ptr< InterfacePP::jmmu > & |
mmu, |
|
|
std::shared_ptr< InterfacePP::jlogger > & |
logger |
|
) |
| |
jdrive uses protocol++ to drive packets into a socket which can then be read by any device. Application layer protocols supported are TLS, SRTP, TCP, and UDP
- Parameters
-
listen | - if set to true, configures to listen on the port specified |
port | - port number |
prot | - transport or application level protocol (TCP, UDP, TLS, SRTP) |
lvl3 | - network layer protocol (IPV4, IPV6) |
lvl2 | - data-link layer protocol (MACSEC, WIFI, WIMAX, LTE) |
lvl3_sec | - Enable ESP for network level |
host | - string of the host name (or IP Address in standard byte format XX.XX.XX...) |
iquesize | - Size of the send queue |
oquesize | - Size of the receive queue |
seed | - seed for the randomizer |
endianess | - Endianess of the platform to support |
mmu | - tracks dynamic memory |
logger | - object for writing |
◆ get_size()
uint32_t DriverPP::jdrive::get_size |
( |
| ) |
|
- Returns
- - size of the next output packet
◆ pop() [1/2]
uint32_t DriverPP::jdrive::pop |
( |
std::shared_ptr< ProtocolPP::jarray< uint8_t >> & |
output | ) |
|
Returns the next packet in the receive queue
- Parameters
-
output | - payload from decapsulated packet |
◆ pop() [2/2]
uint32_t DriverPP::jdrive::pop |
( |
uint8_t * |
output | ) |
|
Returns the next packet in the receive queue
- Parameters
-
output | - payload from decapsulated packet |
◆ rcv()
bool DriverPP::jdrive::rcv |
( |
| ) |
|
- Returns
- True if packet received. Poll this in your program
◆ send() [1/2]
uint32_t DriverPP::jdrive::send |
( |
std::shared_ptr< ProtocolPP::jarray< uint8_t >> & |
input | ) |
|
Issues the packet into the socket
- Parameters
-
input | - byte array for the input payload |
- Returns
- - status of push command
◆ send() [2/2]
uint32_t DriverPP::jdrive::send |
( |
uint8_t * |
packet, |
|
|
uint32_t |
size |
|
) |
| |
Issues the packet into the socket
- Parameters
-
packet | - byte array for the input payload |
size | - length of the input data |
- Returns
- - status of push command
◆ write_mem()
uint64_t DriverPP::jdrive::write_mem |
( |
uint8_t * |
data, |
|
|
uint32_t |
length |
|
) |
| |
Write data to memory
- Parameters
-
data | - Data to write to memory |
length | - length of data to write |
- Returns
- address - Address data written to
The documentation for this class was generated from the following file: