◆ judpsa() [1/2]
ProtocolPP::judpsa::judpsa |
( |
| ) |
|
Standard constructor using default values
UDP Defaults
field | Default Value |
dir | direction_t::ENCAP |
dir | protocol_t::NOPROTO |
src | 0xFEED |
dst | 0xBEEF |
vni | 0 |
mtu | 0 |
◆ judpsa() [2/2]
ProtocolPP::judpsa::judpsa |
( |
direction_t |
dir, |
|
|
protocol_t |
ver, |
|
|
uint16_t |
src, |
|
|
uint16_t |
dst, |
|
|
uint32_t |
vni, |
|
|
uint32_t |
mtu |
|
) |
| |
Parameters necessary to setup a UDP flow
- Parameters
-
dir | - Direction of UDP data flow (ENCAP or DECAP) |
ver | - Version of UDP to use (NOPROT, VXLAN) |
src | - Source port for data |
dst | - Destination port for data |
vni | - VXLAN Network Identifier |
mtu | - Maximum transmission size |
◆ get_field()
template<typename T >
T ProtocolPP::judpsa::get_field |
( |
field_t |
field | ) |
|
Retrieves a boolean value from the field requested. If the function is called with a field that is not a boolean, this function prints an error to the screen
UDP Get Fields
field type | field name | Example |
direction_t | DIRECTION | direction_t mydir = get_field<direction_t>(field_t::DIRECTION) |
uint16_t | SOURCE | uint16_t mysrc = get_field<uint16_t>(field_t::SOURCE) |
| DESTINATION | uint16_t mydst = get_field<uint16_t>(field_t::DESTINATION) |
uint32_t | MTU | uint32_t mymtu = get_field<uint32_t>(field_t::MTU) |
Due to their dynamic nature, some fields are only available in judp which include the following fields
- Parameters
-
- Returns
- - boolean value from the field
◆ set_field()
template<typename T >
void ProtocolPP::judpsa::set_field |
( |
field_t |
field, |
|
|
T |
fieldval |
|
) |
| |
Sets a boolean field in the security association. If the function is called with a field that is not boolean, this function prints an error to the screen
UDP Set Fields
field type | field name | Example |
direction_t | DIRECTION | set_field<direction_t>(field_t::DIRECTION, direction_t::ENCAP) |
uint16_t | SOURCE | set_field<uint16_t>(field_t::SOURCE, 0xFEED) |
| DESTINATION | set_field<uint16_t>(field_t::DESTINATION, 0xBEEF) |
uint32_t | MTU | set_field<uint32_t>(field_t::MTU, 1500) |
Due to their dynamic nature, some fields are only available in judp which include the following fields
- Parameters
-
field | - field to set |
fieldval | - boolean value for the field |
◆ to_json()
void ProtocolPP::judpsa::to_json |
( |
std::ofstream & |
myjson, |
|
|
direction_t |
direction, |
|
|
std::string & |
indent |
|
) |
| |
|
virtual |
print the protocol and security objects as JSON
- Parameters
-
myjson | - object to print to |
direction | - randomization |
indent | - indentation for JSON output |
Implements ProtocolPP::jsecass.
◆ to_xml()
print the protocol and security objects as XML
- Parameters
-
myxml | - object to print to |
direction | - randomization |
Implements ProtocolPP::jsecass.
The documentation for this class was generated from the following file: