Fix to accept transaction_id to all message structs

This commit is contained in:
Eishun Kondoh 2018-03-22 23:49:03 +09:00
parent bb74f3d8c4
commit 4803c61061
29 changed files with 118 additions and 34 deletions

View file

@ -12,7 +12,13 @@ defmodule Openflow.TableMod do
def ofp_type, do: 17
def new(table_id) do
def new(options) when is_list(options) do
%TableMod{
xid: options[:xid] || 0,
table_id: options[:table_id] || 0
}
end
def new(table_id) when is_integer(table_id) or is_atom(table_id) do
%TableMod{table_id: table_id}
end