Class: PacketGen::Header::TCP::ECHOREPLY
- Inherits:
-
Option
- Object
- Types::Fields
- Base
- Option
- PacketGen::Header::TCP::ECHOREPLY
- Defined in:
- lib/packetgen/header/tcp/option.rb
Overview
Echo Reply TCP option
Constant Summary
Constants inherited from Option
Option::ECHOREPLY_KIND, Option::ECHO_KIND, Option::EOL_KIND, Option::MSS_KIND, Option::NOP_KIND, Option::SACKOK_KIND, Option::SACK_KIND, Option::TS_KIND, Option::WS_KIND
Instance Attribute Summary
Attributes inherited from Option
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ECHOREPLY
constructor
A new instance of ECHOREPLY.
- #to_human ⇒ String
Methods inherited from Option
#has_length?, #inspect, #read, #to_s
Methods inherited from Base
bind_header, #header_id, inherited, #ip_header, known_headers, #parse?, #protocol_name
Methods inherited from Types::Fields
#[], #[]=, #body=, define_bit_fields_on, define_field, define_field_after, define_field_before, #fields, #force_binary, inherited, #inspect, #read, #sz, #to_h, #to_s
Constructor Details
#initialize(options = {}) ⇒ ECHOREPLY
Returns a new instance of ECHOREPLY.
209 210 211 212 |
# File 'lib/packetgen/header/tcp/option.rb', line 209 def initialize(={}) super .merge!(kind: ECHOREPLY_KIND, length: 6) self[:value] = Types::Int32.new([:value]) end |
Instance Method Details
#to_human ⇒ String
215 216 217 |
# File 'lib/packetgen/header/tcp/option.rb', line 215 def to_human "WS:#{value}" end |