Class: PacketGen::Header::IKE::VendorID
- Inherits:
-
Payload
- Object
- Types::Fields
- Base
- Payload
- PacketGen::Header::IKE::VendorID
- Defined in:
- lib/packetgen/header/ike/vendor_id.rb
Overview
This class handles Vendor ID payloads, as defined in RFC 7296 §3.12.
A Vendor ID payload contains a generic payload header (see Payload) and data field (type Types::String):
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ VendorID Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Create a Vendor ID payload
# Create a IKE packet with a Vendor ID payload
pkt = PacketGen.gen('IP').add('UDP').add('IKE')
pkt.add('IKE::VendorID', data: "abcdefgh")
Constant Summary collapse
- PAYLOAD_TYPE =
Payload type number
43
Instance Attribute Summary
Attributes inherited from Payload
#content, #critical, #flags, #hreserved, #length, #next
Attributes inherited from Base
Method Summary
Methods inherited from Payload
#base_read, #calc_length, #initialize, #read
Methods inherited from Base
#added_to_packet, bind, bind_header, calculate_and_set_length, #header_id, inherited, #initialize, #ip_header, known_headers, #ll_header, #method_name, #parse?, #protocol_name, protocol_name
Methods inherited from Types::Fields
#[], #[]=, #bits_on, #body=, define_bit_fields_on, define_field, define_field_after, define_field_before, delete_field, fields, #fields, #force_binary, inherited, #initialize, #inspect, #is_optional?, #is_present?, #offset_of, #optional?, #optional_fields, #present?, #read, remove_bit_fields_on, remove_field, #sz, #to_h, #to_s, update_field
Constructor Details
This class inherits a constructor from PacketGen::Header::IKE::Payload