Implement Openflow Protocol and Callback system
This commit is contained in:
parent
fc02a678de
commit
e52fe31b79
48 changed files with 937 additions and 244 deletions
|
|
@ -19,6 +19,16 @@ defmodule Openflow.Multipart.GroupDesc.Reply do
|
|||
groups = Openflow.Multipart.GroupDescStats.read(groups_bin)
|
||||
%Reply{groups: groups}
|
||||
end
|
||||
|
||||
def append_body(%Reply{groups: groups} = message, %Reply{flags: [:more], groups: continue}) do
|
||||
%{message|groups: [continue|groups]}
|
||||
end
|
||||
def append_body(%Reply{groups: groups} = message, %Reply{flags: [], groups: continue}) do
|
||||
new_groups = [continue|groups]
|
||||
|> Enum.reverse
|
||||
|> List.flatten
|
||||
%{message|groups: new_groups}
|
||||
end
|
||||
end
|
||||
|
||||
defmodule Openflow.Multipart.GroupDescStats do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue