|
Protocol++® (Protocolpp®) v5.7.2
|


Public Types | |
| enum | audit_t { AUDIT_INVALIDSA , AUDIT_FRAGMENT , AUDIT_ROLLOVER , AUDIT_REPLAY , AUDIT_ICV , AUDIT_FORMAT , AUDIT_DUMMY } |
Additional Inherited Members | |
Static Public Member Functions inherited from ProtocolPP::jprotocol | |
| const static std::string | currentDateTime () |
| static std::string | str_status (uint32_t status) |
| static jarray< uint8_t > | to_array (uint8_t input) |
| static jarray< uint8_t > | to_array (uint16_t input) |
| static jarray< uint8_t > | to_array (uint32_t input) |
| static jarray< uint8_t > | to_array (uint64_t input) |
| static uint8_t | to_u8 (jarray< uint8_t > src_array) |
| static uint16_t | to_u16 (jarray< uint8_t > src_array) |
| static uint32_t | to_u32 (jarray< uint8_t > src_array) |
| static uint64_t | to_u64 (jarray< uint8_t > src_array) |
| static uint32_t | fnv_hash (std::shared_ptr< jarray< uint8_t > > &header, jarray< uint8_t > &mask, uint32_t hdrlen) |
Protected Member Functions inherited from ProtocolPP::jprotocol | |
| template<typename T , typename TE > | |
| std::shared_ptr< jreplay< T, TE > > | update_replay (protocol_t prot, T &seqnum, TE &extseq, bool usext, uint32_t size) |
| template<typename T , typename TE > | |
| std::shared_ptr< jreplay< T, TE > > | update_replay (protocol_t prot, T &seqnum, TE &extseq, bool usext, uint32_t size, jarray< uint8_t > &window) |
| void | update_status (uint32_t stat) |
| void | get_data (std::shared_ptr< jarray< uint8_t > > &data) |
| void | put_data (std::shared_ptr< jarray< uint8_t > > &wdata) |
| void | encryptdat (std::shared_ptr< jarray< uint8_t > > &red, std::shared_ptr< jarray< uint8_t > > &black) |
| void | decryptdat (std::shared_ptr< jarray< uint8_t > > &black, std::shared_ptr< jarray< uint8_t > > &red) |
| uint32_t | roundup (uint32_t value, uint32_t mult) |
Protected Attributes inherited from ProtocolPP::jprotocol | |
| direction_t | m_dir |
| direction of processing | |
| uint32_t | m_status |
| std::shared_ptr< jrand > | m_rand |
| random data generator passed into constructor | |
| std::string | m_filename |
| file input string for this protocol | |
| std::fstream | m_file |
| input file stream object for this protocol | |
| endian_t | m_endian |
| endianess string for this protocol | |
Audit types for IPsec
AUDIT_INVALIDSA - Invalid Security Association AUDIT_FRAGMENT - Fragment received when not allowed AUDIT_ROLLOVER - Sequence number rolled over AUDIT_REPLAY - Anti-Replay error AUDIT_ICV - Received ICV was incorrect AUDIT_FORMAT - IPv6 JUMBOGRAM formatting errors AUDIT_DUMMY - Dummy packet received
| ProtocolPP::jipsec::jipsec | ( | std::shared_ptr< jrand > & | rand, |
| std::shared_ptr< jipsecsa > & | security, | ||
| std::string & | replay | ||
| ) |
Constructor for IPsec
| rand | - Random data generation for IVs and padding |
| security | - Security association (SA) for this IPsec flow |
| replay | - Type of replay packets to generate if requested |
| ProtocolPP::jipsec::~jipsec | ( | ) |
Standard deconstructor flush and close the auditlog if present
Audit function
| type | - Type of Audit |
| header | - IPsec header to extract audit information |
|
virtual |
Decap will produce a payload from the packet passed
| input | - packet to decapsulate with IPsec |
| output | - packet encapsulated with IPsec |
Implements ProtocolPP::jprotocol.
|
virtual |
Encap will produce a packet from the payload passed
| input | - payload to protect with IPsec |
| output | - packet encapsulated with IPsec |
Implements ProtocolPP::jprotocol.
| jarray< uint8_t > ProtocolPP::jipsec::get_exthdr | ( | iana_t | extension, |
| iana_t | nh, | ||
| jarray< uint8_t > & | data, | ||
| uint16_t | type_offset = 0, |
||
| uint8_t | segments = 0 |
||
| ) |
Add the extension header
| extension | - extension to add to the IPsec header |
| nh | - Next header after the current one |
| data | - Data necessary for the extension header (32-bit length for JUMBOGRAM, Route header, Identifcation for Fragment, etc.) |
| type_offset | - Type (8-bits) for Routing header, offset (13-bits) for Fragment header |
| segments | - Number of segments left for Routing header (8-bits), "More" bit for Fragment header (1-bit) |
Retrieve the field from the IP header
| field | - field to return from the header |
Reimplemented from ProtocolPP::jprotocol.
Retrieve the field from the IP header
| field | - field to return from the header |
| header | - header to retrieve the field from |
Implements ProtocolPP::jprotocol.
get_security
| sec | - Shared pointer to hold the security association |
Update IP field with the new value
| field | - field to update |
| value | - new value for the field |
Implements ProtocolPP::jprotocol.
Update the current IP header with a new header
| hdr | - new IP header for this flow |
Implements ProtocolPP::jprotocol.
|
virtual |
Return the protocol and security fields as JSON
| myjson | - JSON object |
| direction | - randomization |
| indent | - indentation for JSON output |
Implements ProtocolPP::jprotocol.
|
virtual |
Return the protocol and security fields as XML
| myxml | - XMLPrinter object |
| direction | - randomization |
Implements ProtocolPP::jprotocol.