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

diff --git a/ryu/ofproto/ofproto_v1_2_parser.py 
b/ryu/ofproto/ofproto_v1_2_parser.py
index c6117a3..17f19ba 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -942,6 +942,7 @@ class Flow(object):
         self.ipv6_flabel = 0
         self.icmpv6_type = 0
         self.icmpv6_code = 0
+        self.ipv6_nd_target = []
         self.mpls_lable = 0
         self.mpls_tc = 0
 
@@ -1125,6 +1126,10 @@ class OFPMatch(object):
             self.fields.append(
                 OFPMatchField.make(ofproto_v1_2.OXM_OF_ICMPV6_CODE))
 
+        if self.wc.ft_test(ofproto_v1_2.OFPXMT_OFB_IPV6_ND_TARGET):
+            self.fields.append(
+                OFPMatchField.make(ofproto_v1_2.OXM_OF_IPV6_ND_TARGET))
+
         if self.wc.ft_test(ofproto_v1_2.OFPXMT_OFB_MPLS_LABEL):
             self.fields.append(
                 OFPMatchField.make(ofproto_v1_2.OXM_OF_MPLS_LABEL))
@@ -1338,6 +1343,10 @@ class OFPMatch(object):
         self.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_ICMPV6_CODE)
         self.flow.icmpv6_code = icmpv6_code
 
+    def set_ipv6_nd_target(self, target):
+        self.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_IPV6_ND_TARGET)
+        self.flow.ipv6_nd_target = target
+
     def set_mpls_label(self, mpls_label):
         self.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_MPLS_LABEL)
         self.flow.mpls_label = mpls_label
@@ -1866,6 +1875,19 @@ class MTICMPV6Code(OFPMatchField):
         return MTICMPV6Code(header)
 
 
[email protected]_field_header([ofproto_v1_2.OXM_OF_IPV6_ND_TARGET])
+class MTIPv6NdTarget(OFPMatchField):
+    def __init__(self, header):
+        super(MTIPv6NdTarget, self).__init__(header, '!4I')
+
+    def serialize(self, buf, offset, match):
+        self.putv6(buf, offset, match.flow.ipv6_nd_target, [])
+
+    @classmethod
+    def parser(cls, header, buf, offset):
+        return MTIPv6NdTarget(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