mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-09 14:26:10 +02:00
ofproto_v1_[345]: Define common structure for experimenter property
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
e61ade46d9
commit
0b5dd61930
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user