Openflow parser

This commit is contained in:
Eishun Kondoh 2017-11-13 22:52:53 +09:00
parent 70b0d8919e
commit fc02a678de
338 changed files with 9081 additions and 0 deletions

View file

@ -0,0 +1,21 @@
defmodule Openflow.Action.NxDecTtl do
defstruct([])
@experimenter 0x00002320
@nxast 18
alias __MODULE__
def new do
%NxDecTtl{}
end
def to_binary(%NxDecTtl{}) do
exp_body = <<@experimenter::32, @nxast::16, 0::size(6)-unit(8)>>
<<0xffff::16, 16::16, exp_body::bytes>>
end
def read(<<@experimenter::32, @nxast::16, _::16, _::size(4)-unit(8)>>) do
%NxDecTtl{}
end
end