Class: Pio::Lldp::Frame

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

Overview

LLDP frame

Constant Summary

Constants included from Ethernet

Ethernet::MINIMUM_FRAME_SIZE

Instance Method Summary collapse

Methods included from Ethernet

#ethernet_header_length, included

Instance Method Details

#dpidObject



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

def dpid
  chassis_id.to_i
end

#management_addressObject



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

def management_address
  get_tlv_field 8, 'management_address'
end

#organizationally_specificObject



52
53
54
# File 'lib/pio/lldp/frame.rb', line 52

def organizationally_specific
  get_tlv 127
end

#port_descriptionObject



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

def port_description
  get_tlv_field 4, 'port_description'
end

#system_capabilitiesObject



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

def system_capabilities
  get_tlv 7
end

#system_descriptionObject



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

def system_description
  get_tlv_field 6, 'system_description'
end

#system_nameObject



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

def system_name
  get_tlv_field 5, 'system_name'
end