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.nob...@yes.nttcom.ne.jp>
---
 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 fce3980..2a2a7c0 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',
-- 1.7.10.4

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to