diff --git a/lib/openflow/enums.ex b/lib/openflow/enums.ex index 61ff9e5..092f63c 100644 --- a/lib/openflow/enums.ex +++ b/lib/openflow/enums.ex @@ -2725,6 +2725,12 @@ defmodule Openflow.Enums do _class, _reason -> :pbb_uca end + def to_int(:packet_type, :openflow_basic) do + openflow_basic_to_int(:packet_type) + catch + _class, _reason -> :packet_type + end + def to_int(_int, :openflow_basic) do throw(:bad_enum) end @@ -7933,6 +7939,12 @@ defmodule Openflow.Enums do _class, _reason -> 41 end + def to_atom(0x2C, :openflow_basic) do + openflow_basic_to_atom(0x2C) + catch + _class, _reason -> 44 + end + def to_atom(_, :openflow_basic) do throw(:bad_enum) end @@ -11306,6 +11318,7 @@ defmodule Openflow.Enums do def openflow_basic_to_int(:tunnel_id), do: 0x26 def openflow_basic_to_int(:ipv6_exthdr), do: 0x27 def openflow_basic_to_int(:pbb_uca), do: 0x29 + def openflow_basic_to_int(:packet_type), do: 0x2C def openflow_basic_to_int(_), do: throw(:bad_enum) def openflow_basic_to_atom(0x0), do: :in_port def openflow_basic_to_atom(0x1), do: :in_phy_port @@ -11348,6 +11361,7 @@ defmodule Openflow.Enums do def openflow_basic_to_atom(0x26), do: :tunnel_id def openflow_basic_to_atom(0x27), do: :ipv6_exthdr def openflow_basic_to_atom(0x29), do: :pbb_uca + def openflow_basic_to_atom(0x2C), do: :packet_type def openflow_basic_to_atom(_), do: throw(:bad_enum) def vlan_id_to_int(:vid_present), do: 0x1000 def vlan_id_to_int(:vid_none), do: 0x0 @@ -13484,7 +13498,8 @@ defmodule Openflow.Enums do pbb_isid: 37, tunnel_id: 38, ipv6_exthdr: 39, - pbb_uca: 41 + pbb_uca: 41, + packet_type: 44 ] defp enum_of(:vlan_id), do: [vid_present: 4096, vid_none: 0] diff --git a/lib/openflow/match.ex b/lib/openflow/match.ex index 2f60a63..f7abea6 100644 --- a/lib/openflow/match.ex +++ b/lib/openflow/match.ex @@ -370,7 +370,8 @@ defmodule Openflow.Match do :pbb_isid, :tunnel_id, :ipv6_exthdr, - :pbb_uca + :pbb_uca, + :packet_type ], do: 0x8000 @@ -758,7 +759,8 @@ defmodule Openflow.Match do :nsh_c1, :nsh_c2, :nsh_c3, - :nsh_c4 + :nsh_c4, + :packet_type ], do: :u32 diff --git a/priv/openflow_enum_gen.exs b/priv/openflow_enum_gen.exs index f6cdcb9..a69900a 100644 --- a/priv/openflow_enum_gen.exs +++ b/priv/openflow_enum_gen.exs @@ -508,7 +508,8 @@ enums = [ pbb_isid: 37, tunnel_id: 38, ipv6_exthdr: 39, - pbb_uca: 41 + pbb_uca: 41, + packet_type: 44 ], vlan_id: [ # Bit that indicate that a VLAN id is set.