class PacketGen::Header::DHCPv6::DUID
@abstract Base
class for DUID
(DHCP
Unique ID) @author Sylvain Daubert
Constants
- TYPES
Public Instance Methods
read(str)
click to toggle source
Populate object from binary string @param [String] str @return [DUID]
Calls superclass method
PacketGen::Types::Fieldable#read
# File lib/packetgen/header/dhcpv6/duid.rb, line 38 def read(str) if self.instance_of?(DUID) super case type when 1 DUID_LLT.new.read(str) when 2 DUID_EN.new.read(str) when 3 DUID_LL.new.read(str) else self end else private_read str end end
Also aliased as: private_read
to_human()
click to toggle source
Get human-readable DUID
description @return [String]
# File lib/packetgen/header/dhcpv6/duid.rb, line 58 def to_human "DUID<#{type},#{body.inspect}>" end