Class: Pio::OpenFlow::PhyPort

Inherits:
BinData::Record
  • Object
show all
Extended by:
Flags
Defined in:
lib/pio/open_flow/phy_port.rb

Overview

Description of a physical port

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Flags

_def_flags, flags_16bit, flags_32bit

Instance Attribute Details

#datapath_idObject Also known as: dpid

Returns the value of attribute datapath_id.



55
56
57
# File 'lib/pio/open_flow/phy_port.rb', line 55

def datapath_id
  @datapath_id
end

Instance Method Details

#down?Boolean



70
71
72
# File 'lib/pio/open_flow/phy_port.rb', line 70

def down?
  config.include?(:port_down) || state.include?(:link_down)
end

#local?Boolean



74
75
76
# File 'lib/pio/open_flow/phy_port.rb', line 74

def local?
  port_no == PortNumber::NUMBERS[:local]
end

#mac_addressObject



62
63
64
# File 'lib/pio/open_flow/phy_port.rb', line 62

def mac_address
  hardware_address
end

#numberObject



58
59
60
# File 'lib/pio/open_flow/phy_port.rb', line 58

def number
  port_no
end

#up?Boolean



66
67
68
# File 'lib/pio/open_flow/phy_port.rb', line 66

def up?
  !down?
end