diff options
Diffstat (limited to 'ryu/ofproto')
-rw-r--r-- | ryu/ofproto/ofproto_v1_3.py | 9 | ||||
-rw-r--r-- | ryu/ofproto/ofproto_v1_4.py | 9 | ||||
-rw-r--r-- | ryu/ofproto/ofproto_v1_4_parser.py | 4 | ||||
-rw-r--r-- | ryu/ofproto/ofproto_v1_5.py | 9 | ||||
-rw-r--r-- | ryu/ofproto/ofproto_v1_5_parser.py | 4 |
5 files changed, 31 insertions, 4 deletions
diff --git a/ryu/ofproto/ofproto_v1_3.py b/ryu/ofproto/ofproto_v1_3.py index 35389c0a..c3adc612 100644 --- a/ryu/ofproto/ofproto_v1_3.py +++ b/ryu/ofproto/ofproto_v1_3.py @@ -1220,6 +1220,15 @@ oxm_types = [ oxm_fields.generate(__name__) +# Note: struct ofp_prop_experimenter is specific to this implementation. +# It does not have a corresponding structure in the specification. +# This structure defines common structure for ofp_*_prop_experimenter. +# struct ofp_prop_experimenter +OFP_PROP_EXPERIMENTER_PACK_STR = '!HHII' +OFP_PROP_EXPERIMENTER_SIZE = 12 +assert (calcsize(OFP_PROP_EXPERIMENTER_PACK_STR) == + OFP_PROP_EXPERIMENTER_SIZE) + # define constants OFP_VERSION = 0x04 OFP_TCP_PORT = 6633 diff --git a/ryu/ofproto/ofproto_v1_4.py b/ryu/ofproto/ofproto_v1_4.py index 47c2f1ac..345846e4 100644 --- a/ryu/ofproto/ofproto_v1_4.py +++ b/ryu/ofproto/ofproto_v1_4.py @@ -1473,6 +1473,15 @@ OFP_BUNDLE_ADD_MSG_SIZE = 24 assert (calcsize(OFP_BUNDLE_ADD_MSG_PACK_STR) + OFP_HEADER_SIZE == OFP_BUNDLE_ADD_MSG_SIZE) +# Note: struct ofp_prop_experimenter is specific to this implementation. +# It does not have a corresponding structure in the specification. +# This structure defines common structure for ofp_*_prop_experimenter. +# struct ofp_prop_experimenter +OFP_PROP_EXPERIMENTER_PACK_STR = '!HHII' +OFP_PROP_EXPERIMENTER_SIZE = 12 +assert (calcsize(OFP_PROP_EXPERIMENTER_PACK_STR) == + OFP_PROP_EXPERIMENTER_SIZE) + # define constants OFP_VERSION = 0x05 OFP_TCP_PORT = 6653 diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py index 3cf2a40b..f9efba5a 100644 --- a/ryu/ofproto/ofproto_v1_4_parser.py +++ b/ryu/ofproto/ofproto_v1_4_parser.py @@ -893,8 +893,8 @@ class OFPPropCommonExperimenter4ByteData(StringifyMixin): @classmethod def parser(cls, buf): (type_, length, experimenter, exp_type) = struct.unpack_from( - ofproto.OFP_TABLE_MOD_PROP_EXPERIMENTER_PACK_STR, buf, 0) - data = buf[ofproto.OFP_TABLE_MOD_PROP_EXPERIMENTER_SIZE:length] + ofproto.OFP_PROP_EXPERIMENTER_PACK_STR, buf, 0) + data = buf[ofproto.OFP_PROP_EXPERIMENTER_SIZE:length] return cls(type_, length, experimenter, exp_type, data) def serialize(self): diff --git a/ryu/ofproto/ofproto_v1_5.py b/ryu/ofproto/ofproto_v1_5.py index ce5667d1..31e5cc05 100644 --- a/ryu/ofproto/ofproto_v1_5.py +++ b/ryu/ofproto/ofproto_v1_5.py @@ -1809,6 +1809,15 @@ OFP_BUNDLE_ADD_MSG_SIZE = 24 assert (calcsize(OFP_BUNDLE_ADD_MSG_PACK_STR) + OFP_HEADER_SIZE == OFP_BUNDLE_ADD_MSG_SIZE) +# Note: struct ofp_prop_experimenter is specific to this implementation. +# It does not have a corresponding structure in the specification. +# This structure defines common structure for ofp_*_prop_experimenter. +# struct ofp_prop_experimenter +OFP_PROP_EXPERIMENTER_PACK_STR = '!HHII' +OFP_PROP_EXPERIMENTER_SIZE = 12 +assert (calcsize(OFP_PROP_EXPERIMENTER_PACK_STR) == + OFP_PROP_EXPERIMENTER_SIZE) + # define constants OFP_VERSION = 0x06 OFP_TCP_PORT = 6653 diff --git a/ryu/ofproto/ofproto_v1_5_parser.py b/ryu/ofproto/ofproto_v1_5_parser.py index fd9ef079..998b4bd3 100644 --- a/ryu/ofproto/ofproto_v1_5_parser.py +++ b/ryu/ofproto/ofproto_v1_5_parser.py @@ -1037,8 +1037,8 @@ class OFPPropCommonExperimenter4ByteData(StringifyMixin): @classmethod def parser(cls, buf): (type_, length, experimenter, exp_type) = struct.unpack_from( - ofproto.OFP_TABLE_MOD_PROP_EXPERIMENTER_PACK_STR, buf, 0) - data = buf[ofproto.OFP_TABLE_MOD_PROP_EXPERIMENTER_SIZE:length] + ofproto.OFP_PROP_EXPERIMENTER_PACK_STR, buf, 0) + data = buf[ofproto.OFP_PROP_EXPERIMENTER_SIZE:length] return cls(type_, length, experimenter, exp_type, data) def serialize(self): |