Sha256: 40b4b40952c883d9a7c88fc4c3c247e87caf91909ec85a5268ad48005deb131c

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

require 'pio/open_flow/action'
require 'pio/open_flow13/port32'

# Base module.
module Pio
  module OpenFlow13
    # Output to switch port.
    class SendOutPort < OpenFlow::Action
      NO_BUFFER = 0xffff

      action_header action_type: 0, action_length: 16
      port32 :port
      uint16 :max_length, initial_value: NO_BUFFER
      uint48 :padding

      def initialize(port)
        super(port: port)
      end

      def max_length
        case @format.max_length
        when NO_BUFFER
          :no_buffer
        else
          @format.max_length
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pio-0.30.2 lib/pio/open_flow13/send_out_port.rb