|
| | jipsa () |
| |
| | jipsa (direction_t dir, iana_t version, iana_t nh, jarray< uint8_t > src, jarray< uint8_t > dst, jarray< uint8_t > exthdr, uint8_t dsecn, uint8_t ttl, uint8_t flags, uint16_t fragoff, uint16_t id, uint32_t label, bool jumbogram, uint32_t mtu) |
| |
|
| jipsa (jipsa &rhs) |
| | standard copy constructor
|
| |
|
| jipsa (std::shared_ptr< jipsa > &rhs) |
| | standard copy constructor from shared pointer
|
| |
|
virtual | ~jipsa ()=default |
| | Standard deconstructor.
|
| |
| template<typename T > |
| void | set_field (field_t field, T value) |
| |
| template<typename T > |
| T | get_field (field_t field) |
| |
| void | to_xml (tinyxml2::XMLPrinter &myxml, direction_t direction) |
| |
| void | to_json (std::ofstream &myjson, direction_t direction, std::string &indent) |
| |
|
| jipsa (const jipsa &jip)=delete |
| |
| | jsecass () |
| |
|
virtual | ~jsecass ()=default |
| | Standard deconstructor.
|
| |
|
| jsecass (jsecass &jsecass)=delete |
| |
|
| jsecass (const jsecass &jsecass)=delete |
| |
◆ jipsa() [1/2]
| ProtocolPP::jipsa::jipsa |
( |
| ) |
|
Standard constructor with defaults
IP Defaults
| field | Default Value |
| dir | direction_t::ENCAP |
| ver | iana_t::IPV4 |
| nh | iana_t::TCP |
| src | 0xAAAAAAAA |
| dst | 0xDDDDDDDD |
| exthdr | 0 |
| dsecn | 0 |
| ttl | 0xFF |
| flags | 0 |
| fragoff | 0 |
| id | 0 |
| label | 0 |
| jumbogram | true |
| mtu | 1500 |
snd.set_field<
iana_t>(field_t::NH, iana_t::UDP);
snd.set_field<uint32_t>(field_t::MTU, 390);
snd.set_field<bool>(field_t::JUMBOGRAM, false);
iana_t
Definition: jenum.h:2016
◆ jipsa() [2/2]
| ProtocolPP::jipsa::jipsa |
( |
direction_t |
dir, |
|
|
iana_t |
version, |
|
|
iana_t |
nh, |
|
|
jarray< uint8_t > |
src, |
|
|
jarray< uint8_t > |
dst, |
|
|
jarray< uint8_t > |
exthdr, |
|
|
uint8_t |
dsecn, |
|
|
uint8_t |
ttl, |
|
|
uint8_t |
flags, |
|
|
uint16_t |
fragoff, |
|
|
uint16_t |
id, |
|
|
uint32_t |
label, |
|
|
bool |
jumbogram, |
|
|
uint32_t |
mtu |
|
) |
| |
Security Association for IP
Required fields for IP
- Parameters
-
| dir | - Direction of data flow |
| version | - Version of IP to use (IPv4, IPv6) |
| nh | - Next header of the extension header or payload |
| src | - Source address (4 bytes for IPv4, 16 bytes for IPv6) |
| dst | - Destination address (4 bytes for IPv4, 16 bytes for IPv6) |
| exthdr | - Extension header to add to standard header |
| dsecn | - Differentiated services and Congestion bits |
| ttl | - Time-To-Live / Hop Limit |
| jumbogram | - Nodal support for IPv6 JUMBOGRAMs |
| mtu | - if using a file for input data, size of the payload |
Required IPv4 fields
- Parameters
-
| flags | - Flags for the IPv4 header |
| fragoff | - Fragment offset |
| id | - ID field for IPv4 header |
Required IPv6 fields
- Parameters
-
◆ get_field()
template<typename T >
| T ProtocolPP::jipsa::get_field |
( |
field_t |
field | ) |
|
Returns the version field of the IP security association
IP Get Fields
| field type | field name | Example |
| direction_t | DIRECTION | direction_t mydir = get_field<direction_t>(field_t::DIRECTION) |
| iana_t | VERSION | iana_t myver = get_field<iana_t>(field_t::VERSION) |
| NH | iana_t mynh = get_field<iana_t>(field_t::NH) |
| jarray<uint8_t> | SOURCE | jarray<uint8_t> mysrc = get_field<jarray<uint8_t>>(field_t::SOURCE) |
| DESTINATION | jarray<uint8_t> mydst = get_field<jarray<uint8_t>>(field_t::DESTINATION) |
| EXTHDR | jarray<uint8_t> myexthdr = get_field<jarray<uint8_t>>(field_t::EXTHDR) |
| uint8_t | DSECN | uint8_t mydsecn = get_field<uint8_t>(field_t::DSECN) |
| TTLHOP | uint8_t myttl = get_field<uint8_t>(field_t::TTLHOP) |
| FLAGS | uint8_t myflags = get_field<uint8_t>(field_t::FLAGS) |
| uint16_t | FRAGOFFSET | uint16_t myoffset = get_field<uint16_t>(field_t::FRAGOFFSET) |
| ID | uint16_t myid = get_field<uint16_t>(field_t::ID) |
| uint32_t | LABEL | uint32_t mylabel = get_field<uint32_t>(field_t::LABEL) |
| MTU | uint32_t mymtu = get_field<uint32_t>(field_t::MTU) |
| bool | MODEJUMBO | bool myjumbo = get_field<uint32_t>(field_t::MODEJUMBO) |
Due to their dynamic nature, some fields are only available in jip which include the following fields
- Parameters
-
| field | - field to retrieve from the IP security association |
- Returns
- field of the IP security association
◆ set_field()
template<typename T >
| void ProtocolPP::jipsa::set_field |
( |
field_t |
field, |
|
|
T |
value |
|
) |
| |
Allows the user to update the field of the IP security association
IP Set Fields
| field type | field name | Example |
| direction_t | DIRECTION | set_field<direction_t>(field_t::DIRECTION, direction_t::DECAP) |
| iana_t | VERSION | set_field<iana_t>(field_t::VERSION, iana_t::IPV4) |
| NH | set_field<iana_t>(field_t::NH, iana_t::UDP) |
| jarray<uint8_t> | SOURCE | set_field<jarray<uint8_t>>(field_t::SOURCE, jarray<uint8_t>("CCEE1144")) |
| DESTINATION | set_field<jarray<uint8_t>>(field_t::DESTINATION, jarray<uint8_t>("4433AABB")) |
| EXTHDR | set_field<jarray<uint8_t>>(field_t::EXTHDR, jarray<uint8_t>("50000104")) |
| uint8_t | DSECN | set_field<uint8_t>(field_t::DSECN, 0x11) |
| TTLHOP | set_field<uint8_t>(field_t::TTLHOP, 0xFF) |
| FLAGS | set_field<uint8_t>(field_t::FLAGS, 0x01) |
| uint16_t | FRAGOFFSET | set_field<uint16_t>(field_t::FRAGOFFSET, 0x0010) |
| ID | set_field<uint16_t>(field_t::ID, 0xFFEE) |
| uint32_t | LABEL | set_field<uint32_t>(field_t::LABEL, 0xAABB1155) |
| MTU | set_field<uint32_t>(field_t::MTU, 0x00000040) |
| bool | MODEJUMBO | set_field<uint32_t>(field_t::MODEJUMBO, true) |
Due to their dynamic nature, some fields are only available in jip which include the following fields
- Parameters
-
| field | - field to update the IP security association |
| value | - value to update the IP security association |
◆ to_json()
| void ProtocolPP::jipsa::to_json |
( |
std::ofstream & |
myjson, |
|
|
direction_t |
direction, |
|
|
std::string & |
indent |
|
) |
| |
|
virtual |
Prints the protocol object in JSON
- Parameters
-
| myjson | - JSON object to print to |
| direction | - randomzation |
| indent | - indentation for JSON output |
Implements ProtocolPP::jsecass.
◆ to_xml()
Prints the protocol object in XML
- Parameters
-
| myxml | - XMLPrinter object to print to |
| direction | - randomzation |
Implements ProtocolPP::jsecass.
The documentation for this class was generated from the following file: