|
| jpacket (std::string stream, std::string name, std::string prev, std::shared_ptr< jarray< uint8_t >> &input, uint32_t status=0) |
|
| jpacket (std::string stream, std::string name, std::string prev, std::shared_ptr< jarray< uint8_t >> &input, std::shared_ptr< jarray< uint8_t >> &expect, uint32_t outlen=0, uint32_t status=0) |
|
| jpacket (std::string stream, std::string name, std::string prev, std::shared_ptr< jarray< uint8_t >> &input, std::shared_ptr< jarray< uint8_t >> &expect, uint64_t outaddr, uint32_t outlen=0, uint32_t status=0) |
|
| jpacket (jpacket &rhs) |
|
| jpacket (const jpacket &rhs) |
|
virtual | ~jpacket ()=default |
| Standard deconstructor.
|
|
template<typename T > |
void | set_field (field_t field, T fieldval) |
|
void | set_data (field_t field, std::shared_ptr< jarray< uint8_t >> &data) |
|
template<typename T > |
T | get_field (field_t field) |
|
void | get_data (field_t field, std::shared_ptr< jarray< uint8_t >> &data) |
|
◆ jpacket() [1/5]
ProtocolPP::jpacket::jpacket |
( |
std::string |
stream, |
|
|
std::string |
name, |
|
|
std::string |
prev, |
|
|
std::shared_ptr< jarray< uint8_t >> & |
input, |
|
|
uint32_t |
status = 0 |
|
) |
| |
Constructor for jpacket
- Parameters
-
stream | - name of the stream this packet belongs to |
name | - unique name of the packet |
prev | - name of the previous packet (may be 'start') |
input | - shared pointer to input data |
status | - expected status of the packet |
◆ jpacket() [2/5]
ProtocolPP::jpacket::jpacket |
( |
std::string |
stream, |
|
|
std::string |
name, |
|
|
std::string |
prev, |
|
|
std::shared_ptr< jarray< uint8_t >> & |
input, |
|
|
std::shared_ptr< jarray< uint8_t >> & |
expect, |
|
|
uint32_t |
outlen = 0 , |
|
|
uint32_t |
status = 0 |
|
) |
| |
Constructor for jpacket
- Parameters
-
stream | - name of the stream this packet belongs to |
name | - unique name of the packet |
prev | - name of the previous packet (may be 'start') |
input | - shared pointer to input data |
expect | - shared pointer to expected data |
outlen | - length of the output data |
status | - expected status of the packet |
◆ jpacket() [3/5]
ProtocolPP::jpacket::jpacket |
( |
std::string |
stream, |
|
|
std::string |
name, |
|
|
std::string |
prev, |
|
|
std::shared_ptr< jarray< uint8_t >> & |
input, |
|
|
std::shared_ptr< jarray< uint8_t >> & |
expect, |
|
|
uint64_t |
outaddr, |
|
|
uint32_t |
outlen = 0 , |
|
|
uint32_t |
status = 0 |
|
) |
| |
Constructor for jpacket
- Parameters
-
stream | - name of the stream this packet belongs to |
name | - unique name of the packet |
prev | - name of the previous packet (may be 'start') |
input | - shared pointer to input data |
expect | - shared pointer to expected data |
outaddr | - Address of the output memory location |
outlen | - length of the output data |
status | - expected status of the packet |
◆ jpacket() [4/5]
ProtocolPP::jpacket::jpacket |
( |
jpacket & |
rhs | ) |
|
Copy constructor for jpacket
- Parameters
-
◆ jpacket() [5/5]
ProtocolPP::jpacket::jpacket |
( |
const jpacket & |
rhs | ) |
|
Copy constructor for jpacket
- Parameters
-
◆ get_data()
void ProtocolPP::jpacket::get_data |
( |
field_t |
field, |
|
|
std::shared_ptr< jarray< uint8_t >> & |
data |
|
) |
| |
Get the data for this packet
std::shared_ptr<jarray<uint8_t>> mydata = std::shared_ptr<jarray<uint8_t>>(50,0);
void get_data(field_t field, std::shared_ptr< jarray< uint8_t >> &data)
- Parameters
-
field | - Data field to set |
data | - Array to place the data in |
◆ get_field()
template<typename T >
T ProtocolPP::jpacket::get_field |
( |
field_t |
field | ) |
|
Returns the field in JPACKET
JPACKET Get Fields
field type | field name | Example |
std::string | STREAM | std::string myname = get_field<std::string>(field_t::STREAM) |
std::string | NAME | std::string myname = get_field<std::string>(field_t::NAME) |
std::string | PREVIOUS | std::string myname = get_field<std::string>(field_t::PREVIOUS) |
uint64_t | OUTADDR | uint64_t myoutaddr = get_field<uint64_t>(field_t::OUTADDR) |
uint32_t | OUTLEN | uint32_t myinlen = get_field<uint32_t>(field_t::OUTLEN) |
uint32_t | INLEN | uint32_t myinlen = get_field<uint32_t>(field_t::INLEN) |
uint32_t | OUTPUTLEN | uint32_t myinlen = get_field<uint32_t>(field_t::OUTPUTLEN) |
uint32_t | EXPLEN | uint32_t myinlen = get_field<uint32_t>(field_t::EXPLEN) |
uint32_t | STATUS | uint32_t mystatus = get_field<uint32_t>(field_t::STATUS) |
- Parameters
-
field | - field to retrieve from the IP header |
- Returns
- value of the field in the security association
◆ set_data()
void ProtocolPP::jpacket::set_data |
( |
field_t |
field, |
|
|
std::shared_ptr< jarray< uint8_t >> & |
data |
|
) |
| |
Set the input data for this packet
std::shared_ptr<jarray<uint8_t>> mydata = std::make_shared<jarray<uint8_t>>(50, 0xAA);
void set_data(field_t field, std::shared_ptr< jarray< uint8_t >> &data)
- Parameters
-
field | - Data field to set |
data | - Array to place the data in |
◆ set_field()
template<typename T >
void ProtocolPP::jpacket::set_field |
( |
field_t |
field, |
|
|
T |
fieldval |
|
) |
| |
Allows the user to update the field in JPACKET
JPACKET Set Fields
field type | field name | Example |
std::string | STREAM | set_field<std::string>(field_t::STREAM, std::string("ALIBABA")) |
std::string | NAME | set_field<std::string>(field_t::NAME, std::string("ALIBABA")) |
std::string | PREVIOUS | set_field<std::string>(field_t::PREVIOUS, std::string("ALIBABA")) |
uint64_t | OUTADDR | set_field<uint64_t>(field_t::OUTADDR, 0xAAFFDDEEFF112233) |
uint32_t | OUTLEN | set_field<uint32_t>(field_t::OUTLEN, 1500) |
uint32_t | STATUS | set_field<uint32_t>(field_t::STATUS, 0x03100123) |
- Parameters
-
field | - field to update |
fieldval | - value to update the field with |
The documentation for this class was generated from the following file: