Class: Pio::OpenFlow13::PacketOut::InPort

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/pio/open_flow13/packet_out.rb

Overview

Packet’s input port or :controller

Constant Summary collapse

CONTROLLER =
0xfffffffd

Instance Method Summary collapse

Instance Method Details

#getObject



19
20
21
# File 'lib/pio/open_flow13/packet_out.rb', line 19

def get
  in_port == CONTROLLER ? :controller : in_port
end

#set(value) ⇒ Object



23
24
25
# File 'lib/pio/open_flow13/packet_out.rb', line 23

def set(value)
  self.in_port = (value == :controller ? NO_CONTROLLER : value)
end