Class: PacketGen::Header::DHCPv6::Relay

Inherits:
Base show all
Defined in:
lib/packetgen/header/dhcpv6/relay.rb

Overview

DHCPv6 Relay agent / server header

Author:

  • Sylvain Daubert

Since:

  • 2.5.0

Constant Summary collapse

MESSAGE_TYPES =

DHCPv6 Relay message types

Since:

  • 2.5.0

{
  'RELAY-FORW' => 12,
  'RELAY-REPL' => 13
}.freeze

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

bind, calculate_and_set_length, #header_id, inherited, #initialize, #ip_header, #ll_header

Methods included from PacketGen::Headerable

#added_to_packet, included, #method_name, #packet, #packet=, #parse?, #protocol_name, #read

Methods inherited from Types::Fields

#[], #[]=, #bits_on, define_bit_fields_on, define_field, define_field_after, define_field_before, #fields, fields, inherited, #initialize, #inspect, #offset_of, #optional?, #optional_fields, #present?, #read, remove_bit_fields_on, remove_field, #sz, #to_h, #to_s, update_field

Constructor Details

This class inherits a constructor from PacketGen::Header::Base

Instance Attribute Details

#hop_countInteger

8-bit hop count (number of relay agents that have relayed this message)

Returns:

  • (Integer)


29
# File 'lib/packetgen/header/dhcpv6/relay.rb', line 29

define_field :hop_count, Types::Int8

Link address: address that will be used by the server to identify the link on which the client is located

Returns:



34
# File 'lib/packetgen/header/dhcpv6/relay.rb', line 34

define_field :link, IPv6::Addr

#msg_typeInteger

8-bit message type

Returns:

  • (Integer)


24
# File 'lib/packetgen/header/dhcpv6/relay.rb', line 24

define_field :msg_type, Types::Int8Enum, enum: MESSAGE_TYPES

#optionsDHCPv6::Options

Returns:



42
# File 'lib/packetgen/header/dhcpv6/relay.rb', line 42

define_field :options, DHCPv6::Options

#peerIPv6::Addr

Peer address: the address of the client or relay agent from which the message to be relayed was received

Returns:



39
# File 'lib/packetgen/header/dhcpv6/relay.rb', line 39

define_field :peer, IPv6::Addr