Class: Pio::Lldp::Frame

Inherits:
BinData::Record
  • Object
show all
Includes:
EthernetHeader
Defined in:
lib/pio/lldp/frame.rb

Overview

LLDP frame

Instance Method Summary collapse

Methods included from EthernetHeader

included, #vlan?, #vlan_pcp, #vlan_vid

Instance Method Details

#dpidObject



25
26
27
# File 'lib/pio/lldp/frame.rb', line 25

def dpid
  chassis_id.to_i
end

#management_addressObject



45
46
47
# File 'lib/pio/lldp/frame.rb', line 45

def management_address
  get_tlv_field 8, 'management_address'
end

#organizationally_specificObject



49
50
51
# File 'lib/pio/lldp/frame.rb', line 49

def organizationally_specific
  get_tlv 127
end

#port_descriptionObject



29
30
31
# File 'lib/pio/lldp/frame.rb', line 29

def port_description
  get_tlv_field 4, 'port_description'
end

#system_capabilitiesObject



41
42
43
# File 'lib/pio/lldp/frame.rb', line 41

def system_capabilities
  get_tlv 7
end

#system_descriptionObject



37
38
39
# File 'lib/pio/lldp/frame.rb', line 37

def system_description
  get_tlv_field 6, 'system_description'
end

#system_nameObject



33
34
35
# File 'lib/pio/lldp/frame.rb', line 33

def system_name
  get_tlv_field 5, 'system_name'
end