Openflow parser
This commit is contained in:
parent
70b0d8919e
commit
fc02a678de
338 changed files with 9081 additions and 0 deletions
19
lib/openflow/instructions/clear_actions.ex
Normal file
19
lib/openflow/instructions/clear_actions.ex
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
defmodule Openflow.Instruction.ClearActions do
|
||||
defstruct([])
|
||||
|
||||
alias __MODULE__
|
||||
|
||||
def new do
|
||||
%ClearActions{}
|
||||
end
|
||||
|
||||
def to_binary(%ClearActions{}) do
|
||||
actions_bin = ""
|
||||
length = 8 + byte_size(actions_bin)
|
||||
<<5::16, length::16, 0::size(4)-unit(8), actions_bin::bytes>>
|
||||
end
|
||||
|
||||
def read(<<5::16, _length::16, _::size(4)-unit(8), _::bytes>>) do
|
||||
%ClearActions{}
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue