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