Class: PcapTools::Parser::IP_PDU
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- PcapTools::Parser::IP_PDU
- Includes:
- HasParent
- Defined in:
- lib/pcap_parser.rb
Overview
IP Protocol Data Unit
Instance Attribute Summary
Attributes included from HasParent
Instance Method Summary collapse
- #header_length_in_bytes ⇒ Object
- #options_length_in_bytes ⇒ Object
- #payload_length_in_bytes ⇒ Object
- #type ⇒ Object
Instance Method Details
#header_length_in_bytes ⇒ Object
129 130 131 |
# File 'lib/pcap_parser.rb', line 129 def header_length_in_bytes header_length * 4 end |
#options_length_in_bytes ⇒ Object
133 134 135 |
# File 'lib/pcap_parser.rb', line 133 def header_length_in_bytes - .rel_offset end |
#payload_length_in_bytes ⇒ Object
137 138 139 |
# File 'lib/pcap_parser.rb', line 137 def payload_length_in_bytes total_length - header_length_in_bytes end |
#type ⇒ Object
141 142 143 |
# File 'lib/pcap_parser.rb', line 141 def type "IP" end |