Class: PacketGen::Header::DHCPv6::DUID_LLT
- Defined in:
- lib/packetgen/header/dhcpv6/duid.rb
Overview
DUID Based on Link-layer Address Plus Time
Constant Summary collapse
- BASE_TIME =
Base time for time computation
Time.utc(2000, 1, 1)
Constants inherited from DUID
PacketGen::Header::DHCPv6::DUID::TYPES
Instance Attribute Summary collapse
-
#htype ⇒ Integer
16-bit hardware protocol type.
- #link_addr ⇒ Eth::MacAddr
- #time ⇒ Time
Attributes inherited from DUID
Instance Method Summary collapse
-
#to_human ⇒ String
Get human-readable DUID description.
Methods inherited from DUID
Instance Attribute Details
#htype ⇒ Integer
16-bit hardware protocol type
83 |
# File 'lib/packetgen/header/dhcpv6/duid.rb', line 83 define_attr :htype, BinStruct::Int16, default: 1 |
#link_addr ⇒ Eth::MacAddr
90 |
# File 'lib/packetgen/header/dhcpv6/duid.rb', line 90 define_attr :link_addr, Eth::MacAddr |
#time ⇒ Time
87 |
# File 'lib/packetgen/header/dhcpv6/duid.rb', line 87 define_attr :time, BinStruct::Int32, default: (Time.now - BASE_TIME).to_i |
Instance Method Details
#to_human ⇒ String
Get human-readable DUID description
107 108 109 |
# File 'lib/packetgen/header/dhcpv6/duid.rb', line 107 def to_human "DUID_LLT<#{time},#{link_addr}>" end |