19. Optional TLVの種類
• Port Description (4)
• System Name (5)
• System Description (6)
• System Capabilities (7)
• Management Address (8)
※カッコ内は TLV type の値
よく使う
32. class MacAddress < BinData::Primitive
array :octets, :type => :uint8, :initial_length => 6
def set value
self.octets = value.split(/:/).collect do | each |
each.hex
end
end
文字列→整数配列