Class: Pio::Icmp::Request::Options

Inherits:
Options show all
Defined in:
lib/pio/icmp/request.rb

Overview

User options for creating an ICMP Request.

Constant Summary collapse

DEFAULT_IDENTIFIER =
0x0100
DEFAULT_SEQUENCE_NUMBER =
0

Constants inherited from Options

Options::DEFAULT_ECHO_DATA

Instance Method Summary collapse

Methods inherited from Options

#to_hash

Methods inherited from Options

mandatory_option, option

Constructor Details

#initialize(user_options) ⇒ Options

Returns a new instance of Options.



27
28
29
30
31
32
33
34
35
36
# File 'lib/pio/icmp/request.rb', line 27

def initialize(user_options)
  @type = TYPE

  @options = user_options.dup
  validate @options
  set_mac_and_ip_address_options
  set_identifier_option
  set_sequence_number_option
  set_echo_data_option
end