Class: PacketGen::Header::NonESPMarker
- Inherits:
-
Base
- Object
- Types::Fields
- Base
- PacketGen::Header::NonESPMarker
- Defined in:
- lib/packetgen/header/ike.rb
Overview
This class handles a pseudo-header used to differentiate ESP from IKE headers in a UDP datagram with port 4500.
Instance Attribute Summary collapse
- #body ⇒ Types::String, Header::Base
-
#non_esp_marker ⇒ Integer
32-bit zero marker to differentiate IKE packet over UDP port 4500 from ESP ones.
Attributes inherited from Base
Instance Method Summary collapse
-
#parse? ⇒ Boolean
Check non_esp_marker field.
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, #protocol_name, protocol_name
Methods inherited from Types::Fields
#[], #[]=, #bits_on, 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::Base
Instance Attribute Details
#body ⇒ Types::String, Header::Base
21 |
# File 'lib/packetgen/header/ike.rb', line 21 define_field :body, Types::String |
#non_esp_marker ⇒ Integer
32-bit zero marker to differentiate IKE packet over UDP port 4500 from ESP ones
18 |
# File 'lib/packetgen/header/ike.rb', line 18 define_field :non_esp_marker, Types::Int32, default: 0 |
Instance Method Details
#parse? ⇒ Boolean
Check non_esp_marker field
25 26 27 |
# File 'lib/packetgen/header/ike.rb', line 25 def parse? non_esp_marker.zero? end |