Class: PacketGen::Header::IP::Options
- Inherits:
-
BinStruct::Array
- Object
- BinStruct::Array
- PacketGen::Header::IP::Options
- Defined in:
- lib/packetgen/header/ip/options.rb
Overview
Class to handle IP options
Constant Summary collapse
- HUMAN_SEPARATOR =
';'
Instance Method Summary collapse
-
#to_s ⇒ String
Get binary string.
Instance Method Details
#to_s ⇒ String
Get binary string
21 22 23 24 25 |
# File 'lib/packetgen/header/ip/options.rb', line 21 def to_s str = super str += ([0] * (4 - (str.length % 4))).pack('C*') if str.length % 4 != 0 str end |