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

Instance Method Summary collapse

Methods inherited from Options

mandatory_option, option

Instance Method Details

#to_hashObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/pio/icmp/options.rb', line 7

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