Sha256: 686343eaf509785e7c24891e3c37e4b2502f2fcf69a927f19402603fe82cbf2a

Contents?: true

Size: 950 Bytes

Versions: 4

Compression:

Stored size: 950 Bytes

Contents

require 'pio/open_flow/message'
require 'pio/open_flow10/match10'

module Pio
  module OpenFlow10
    # Flow Removed message
    class FlowRemoved < OpenFlow::Message
      # Why was this flow removed?
      # (enum ofp_flow_removed_reason)
      class Reason < BinData::Primitive
        REASONS = { idle_timeout: 0, hard_timeout: 1, delete: 2 }

        uint8 :reason

        def get
          REASONS.invert.fetch(reason)
        end

        def set(value)
          self.reason = REASONS.fetch(value)
        end
      end

      open_flow_header version: 1, message_type: 11, message_length: 88
      match10 :match
      uint64 :cookie
      uint16 :priority
      reason :reason
      string :padding1, length: 1
      hide :padding1
      uint32 :duration_sec
      uint32 :duration_nsec
      uint16 :idle_timeout
      string :padding2, length: 2
      hide :padding2
      uint64 :packet_count
      uint64 :byte_count
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pio-0.30.0 lib/pio/open_flow10/flow_removed.rb
pio-0.29.0 lib/pio/open_flow10/flow_removed.rb
pio-0.28.1 lib/pio/open_flow10/flow_removed.rb
pio-0.28.0 lib/pio/open_flow10/flow_removed.rb