From 4f94ae8c2becbf1d4f1a0b4b722ac5737c4515cf Mon Sep 17 00:00:00 2001 From: 竹下昇 Date: Tue, 26 Mar 2013 18:36:46 +0900 Subject: 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 Signed-off-by: FUJITA Tomonori --- ryu/lib/ofctl_v1_2.py | 3 +++ 1 file changed, 3 insertions(+) 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', -- cgit v1.2.3