diff options
author | 竹下昇 <takeshita.noboru1@gmail.com> | 2013-03-26 18:36:46 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-03-28 19:24:54 +0900 |
commit | 4f94ae8c2becbf1d4f1a0b4b722ac5737c4515cf (patch) | |
tree | acb1f91445192cf90dfa21c4e405ca77f43cef64 | |
parent | 366da0b919a478d9cb87b69e56bfa53566e148f6 (diff) |
lib ofctl_v1_2: add VLAN_ID setting means
This patch contains the following update for ofctl_v1_2 library.
adding a means which sets up VLAN_ID.
(I think that I will use this by a firewall Ryu application.)
Signed-off-by: TAKESHITA Noboru <takeshita.noboru@yes.nttcom.ne.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/lib/ofctl_v1_2.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py index fce39809..2a2a7c05 100644 --- a/ryu/lib/ofctl_v1_2.py +++ b/ryu/lib/ofctl_v1_2.py @@ -69,6 +69,7 @@ def to_match(dp, attrs): 'dl_src': mac.haddr_to_bin, 'dl_dst': mac.haddr_to_bin, 'dl_type': int, + 'dl_vlan': int, 'nw_src': to_match_ip, 'nw_dst': to_match_ip, 'nw_proto': int, @@ -79,6 +80,7 @@ def to_match(dp, attrs): 'dl_src': match.set_dl_src, 'dl_dst': match.set_dl_dst, 'dl_type': match.set_dl_type, + 'dl_vlan': match.set_vlan_vid, 'nw_src': match.set_ipv4_src_masked, 'nw_dst': match.set_ipv4_dst_masked, 'nw_proto': match.set_ip_proto, @@ -145,6 +147,7 @@ def match_to_str(ofmatch): ofproto_v1_2.OXM_OF_ETH_SRC: 'dl_src', ofproto_v1_2.OXM_OF_ETH_DST: 'dl_dst', ofproto_v1_2.OXM_OF_ETH_TYPE: 'dl_type', + ofproto_v1_2.OXM_OF_VLAN_VID: 'dl_vlan', ofproto_v1_2.OXM_OF_IPV4_SRC: 'nw_src', ofproto_v1_2.OXM_OF_IPV4_DST: 'nw_dst', ofproto_v1_2.OXM_OF_IPV4_SRC_W: 'nw_src', |