Openflow parser
This commit is contained in:
parent
70b0d8919e
commit
fc02a678de
338 changed files with 9081 additions and 0 deletions
19
lib/openflow/multipart/aggregate/reply.ex
Normal file
19
lib/openflow/multipart/aggregate/reply.ex
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
defmodule Openflow.Multipart.Aggregate.Reply do
|
||||
defstruct(
|
||||
version: 4,
|
||||
xid: 0,
|
||||
datapath_id: nil, # virtual field
|
||||
flags: [],
|
||||
packet_count: 0,
|
||||
byte_count: 0,
|
||||
flow_count: 0
|
||||
)
|
||||
|
||||
alias __MODULE__
|
||||
|
||||
def ofp_type, do: 18
|
||||
|
||||
def read(<<packet_count::64, byte_count::64, flow_count::32, _::size(4)-unit(8)>>) do
|
||||
%Reply{packet_count: packet_count, byte_count: byte_count, flow_count: flow_count}
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue