Signed-off-by: FUJITA Tomonori <[email protected]>
---
 ryu/ofproto/ofproto_v1_2.py        |    2 +-
 ryu/ofproto/ofproto_v1_2_parser.py |   44 ++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/ryu/ofproto/ofproto_v1_2.py b/ryu/ofproto/ofproto_v1_2.py
index a2d4d8e..394f392 100644
--- a/ryu/ofproto/ofproto_v1_2.py
+++ b/ryu/ofproto/ofproto_v1_2.py
@@ -833,7 +833,7 @@ OXM_OF_ICMPV6_TYPE = oxm_tlv_header(OFPXMT_OFB_ICMPV6_TYPE, 
1)
 OXM_OF_ICMPV6_CODE = oxm_tlv_header(OFPXMT_OFB_ICMPV6_CODE, 1)
 OXM_OF_IPV6_ND_TARGET = oxm_tlv_header(OFPXMT_OFB_IPV6_ND_TARGET, 16)
 OXM_OF_IPV6_ND_SLL = oxm_tlv_header(OFPXMT_OFB_IPV6_ND_SLL, 6)
-OXM_OF_IPV6_NT_TLL = oxm_tlv_header(OFPXMT_OFB_IPV6_ND_TLL, 6)
+OXM_OF_IPV6_ND_TLL = oxm_tlv_header(OFPXMT_OFB_IPV6_ND_TLL, 6)
 OXM_OF_MPLS_LABEL = oxm_tlv_header(OFPXMT_OFB_MPLS_LABEL, 4)
 OXM_OF_MPLS_TC = oxm_tlv_header(OFPXMT_OFB_MPLS_TC, 1)
 
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py 
b/ryu/ofproto/ofproto_v1_2_parser.py
index 17f19ba..df865d0 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -943,6 +943,8 @@ class Flow(object):
         self.icmpv6_type = 0
         self.icmpv6_code = 0
         self.ipv6_nd_target = []
+        self.ipv6_nd_sll = 0
+        self.ipv6_nd_tll = 0
         self.mpls_lable = 0
         self.mpls_tc = 0
 
@@ -1130,6 +1132,14 @@ class OFPMatch(object):
             self.fields.append(
                 OFPMatchField.make(ofproto_v1_2.OXM_OF_IPV6_ND_TARGET))
 
+        if self.wc.ft_test(ofproto_v1_2.OFPXMT_OFB_IPV6_ND_SLL):
+            self.fields.append(
+                OFPMatchField.make(ofproto_v1_2.OXM_OF_IPV6_ND_SLL))
+
+        if self.wc.ft_test(ofproto_v1_2.OFPXMT_OFB_IPV6_ND_TLL):
+            self.fields.append(
+                OFPMatchField.make(ofproto_v1_2.OXM_OF_IPV6_ND_TLL))
+
         if self.wc.ft_test(ofproto_v1_2.OFPXMT_OFB_MPLS_LABEL):
             self.fields.append(
                 OFPMatchField.make(ofproto_v1_2.OXM_OF_MPLS_LABEL))
@@ -1347,6 +1357,14 @@ class OFPMatch(object):
         self.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_IPV6_ND_TARGET)
         self.flow.ipv6_nd_target = target
 
+    def set_ipv6_nd_sll(self, ipv6_nd_sll):
+        self.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_IPV6_ND_SLL)
+        self.flow.ipv6_nd_sll = ipv6_nd_sll
+
+    def set_ipv6_nd_tll(self, ipv6_nd_tll):
+        self.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_IPV6_ND_TLL)
+        self.flow.ipv6_nd_tll = ipv6_nd_tll
+
     def set_mpls_label(self, mpls_label):
         self.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_MPLS_LABEL)
         self.flow.mpls_label = mpls_label
@@ -1888,6 +1906,32 @@ class MTIPv6NdTarget(OFPMatchField):
         return MTIPv6NdTarget(header)
 
 
[email protected]_field_header([ofproto_v1_2.OXM_OF_IPV6_ND_SLL])
+class MTIPv6NdSll(OFPMatchField):
+    def __init__(self, header):
+        super(MTIPv6NdSll, self).__init__(header, '!6s')
+
+    def serialize(self, buf, offset, match):
+        self.put(buf, offset, match.flow.ipv6_nd_sll)
+
+    @classmethod
+    def parser(cls, header, buf, offset):
+        return MTIPv6NdSll(header)
+
+
[email protected]_field_header([ofproto_v1_2.OXM_OF_IPV6_ND_TLL])
+class MTIPv6NdTll(OFPMatchField):
+    def __init__(self, header):
+        super(MTIPv6NdTll, self).__init__(header, '!6s')
+
+    def serialize(self, buf, offset, match):
+        self.put(buf, offset, match.flow.ipv6_nd_tll)
+
+    @classmethod
+    def parser(cls, header, buf, offset):
+        return MTIPv6NdTll(header)
+
+
 @OFPMatchField.register_field_header([ofproto_v1_2.OXM_OF_MPLS_TC])
 class MTMplsTc(OFPMatchField):
     def __init__(self, header):
-- 
1.7.4.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to