Class: Pio::Icmp::Options

Inherits:
Options
  • Object
show all
Defined in:
lib/pio/icmp/options.rb

Overview

User options for creating an ICMP messages.

Direct Known Subclasses

Reply::Options, Request::Options

Constant Summary collapse

DEFAULT_ECHO_DATA =
''.freeze

Instance Method Summary collapse

Methods inherited from Options

mandatory_option, option

Instance Method Details

#to_hashObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/pio/icmp/options.rb', line 11

def to_hash
  {
    icmp_type: @type,
    source_mac: @source_mac,
    destination_mac: @destination_mac,
    ip_source_address: @ip_source_address,
    ip_destination_address: @ip_destination_address,
    icmp_identifier: @identifier,
    icmp_sequence_number: @sequence_number,
    echo_data: @echo_data
  }.freeze
end