of1.2: add OXM_OF_IPV6_ND_SLL and OXM_OF_IPV6_ND_TLL
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
3b3dcae115
commit
8748812e5e
@ -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_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_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_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_LABEL = oxm_tlv_header(OFPXMT_OFB_MPLS_LABEL, 4)
|
||||||
OXM_OF_MPLS_TC = oxm_tlv_header(OFPXMT_OFB_MPLS_TC, 1)
|
OXM_OF_MPLS_TC = oxm_tlv_header(OFPXMT_OFB_MPLS_TC, 1)
|
||||||
|
|
||||||
|
@ -943,6 +943,8 @@ class Flow(object):
|
|||||||
self.icmpv6_type = 0
|
self.icmpv6_type = 0
|
||||||
self.icmpv6_code = 0
|
self.icmpv6_code = 0
|
||||||
self.ipv6_nd_target = []
|
self.ipv6_nd_target = []
|
||||||
|
self.ipv6_nd_sll = 0
|
||||||
|
self.ipv6_nd_tll = 0
|
||||||
self.mpls_lable = 0
|
self.mpls_lable = 0
|
||||||
self.mpls_tc = 0
|
self.mpls_tc = 0
|
||||||
|
|
||||||
@ -1130,6 +1132,14 @@ class OFPMatch(object):
|
|||||||
self.fields.append(
|
self.fields.append(
|
||||||
OFPMatchField.make(ofproto_v1_2.OXM_OF_IPV6_ND_TARGET))
|
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):
|
if self.wc.ft_test(ofproto_v1_2.OFPXMT_OFB_MPLS_LABEL):
|
||||||
self.fields.append(
|
self.fields.append(
|
||||||
OFPMatchField.make(ofproto_v1_2.OXM_OF_MPLS_LABEL))
|
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.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_IPV6_ND_TARGET)
|
||||||
self.flow.ipv6_nd_target = 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):
|
def set_mpls_label(self, mpls_label):
|
||||||
self.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_MPLS_LABEL)
|
self.wc.ft_set(ofproto_v1_2.OFPXMT_OFB_MPLS_LABEL)
|
||||||
self.flow.mpls_label = mpls_label
|
self.flow.mpls_label = mpls_label
|
||||||
@ -1888,6 +1906,32 @@ class MTIPv6NdTarget(OFPMatchField):
|
|||||||
return MTIPv6NdTarget(header)
|
return MTIPv6NdTarget(header)
|
||||||
|
|
||||||
|
|
||||||
|
@OFPMatchField.register_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)
|
||||||
|
|
||||||
|
|
||||||
|
@OFPMatchField.register_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])
|
@OFPMatchField.register_field_header([ofproto_v1_2.OXM_OF_MPLS_TC])
|
||||||
class MTMplsTc(OFPMatchField):
|
class MTMplsTc(OFPMatchField):
|
||||||
def __init__(self, header):
|
def __init__(self, header):
|
||||||
|
Loading…
Reference in New Issue
Block a user