update pyloxi to floodlight/loxigen-artifacts@6bc35bacb8ac44ebfc391b8bf98e51262449fe0d
diff --git a/src/python/loxi/of13/action_id.py b/src/python/loxi/of13/action_id.py
index e0e495e..b1519f0 100644
--- a/src/python/loxi/of13/action_id.py
+++ b/src/python/loxi/of13/action_id.py
@@ -35,7 +35,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -52,7 +51,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -140,7 +138,6 @@
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
packed.append(struct.pack("!L", self.experimenter))
packed.append(struct.pack("!L", self.subtype))
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -161,7 +158,6 @@
_experimenter = reader.read("!L")[0]
assert(_experimenter == 6035143)
obj.subtype = reader.read("!L")[0]
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -193,7 +189,6 @@
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
packed.append(struct.pack("!L", self.experimenter))
packed.append(struct.pack("!L", self.subtype))
- packed.append('\x00' * 3)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -210,7 +205,6 @@
assert(_experimenter == 6035143)
_subtype = reader.read("!L")[0]
assert(_subtype == 1)
- reader.skip(3)
return obj
def __eq__(self, other):
@@ -283,7 +277,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -296,7 +289,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -323,7 +315,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -336,7 +327,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -363,7 +353,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -376,7 +365,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -403,7 +391,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -416,7 +403,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -490,8 +476,6 @@
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
packed.append(struct.pack("!L", self.experimenter))
packed.append(struct.pack("!H", self.subtype))
- packed.append('\x00' * 2)
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -512,8 +496,6 @@
_experimenter = reader.read("!L")[0]
assert(_experimenter == 8992)
obj.subtype = reader.read("!H")[0]
- reader.skip(2)
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -545,8 +527,6 @@
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
packed.append(struct.pack("!L", self.experimenter))
packed.append(struct.pack("!H", self.subtype))
- packed.append('\x00' * 2)
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -563,8 +543,6 @@
assert(_experimenter == 8992)
_subtype = reader.read("!H")[0]
assert(_subtype == 18)
- reader.skip(2)
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -591,7 +569,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 6)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -604,7 +581,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(6)
return obj
def __eq__(self, other):
@@ -631,7 +607,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 2)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -644,7 +619,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(2)
return obj
def __eq__(self, other):
@@ -671,7 +645,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -684,7 +657,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -711,7 +683,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -724,7 +695,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -751,7 +721,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 2)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -764,7 +733,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(2)
return obj
def __eq__(self, other):
@@ -791,7 +759,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 2)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -804,7 +771,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(2)
return obj
def __eq__(self, other):
@@ -831,7 +797,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 2)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -844,7 +809,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(2)
return obj
def __eq__(self, other):
@@ -909,7 +873,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 3)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -922,7 +885,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(3)
return obj
def __eq__(self, other):
@@ -949,7 +911,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 3)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -962,7 +923,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(3)
return obj
def __eq__(self, other):
diff --git a/src/python/loxi/of13/common.py b/src/python/loxi/of13/common.py
index be5f8cd..93a4faf 100644
--- a/src/python/loxi/of13/common.py
+++ b/src/python/loxi/of13/common.py
@@ -88,6 +88,42 @@
q.text('}')
+class bsn_flow_checksum_bucket_stats_entry(loxi.OFObject):
+
+ def __init__(self, checksum=None):
+ if checksum != None:
+ self.checksum = checksum
+ else:
+ self.checksum = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!Q", self.checksum))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_flow_checksum_bucket_stats_entry()
+ obj.checksum = reader.read("!Q")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.checksum != other.checksum: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_flow_checksum_bucket_stats_entry {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("checksum = ");
+ q.text("%#x" % self.checksum)
+ q.breakable()
+ q.text('}')
+
+
class bsn_gentable_bucket_stats_entry(loxi.OFObject):
def __init__(self, checksum=None):
@@ -684,6 +720,52 @@
q.text('}')
+class bsn_table_checksum_stats_entry(loxi.OFObject):
+
+ def __init__(self, table_id=None, checksum=None):
+ if table_id != None:
+ self.table_id = table_id
+ else:
+ self.table_id = 0
+ if checksum != None:
+ self.checksum = checksum
+ else:
+ self.checksum = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.table_id))
+ packed.append(struct.pack("!Q", self.checksum))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_table_checksum_stats_entry()
+ obj.table_id = reader.read("!B")[0]
+ obj.checksum = reader.read("!Q")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.table_id != other.table_id: return False
+ if self.checksum != other.checksum: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_table_checksum_stats_entry {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("table_id = ");
+ q.text("%#x" % self.table_id)
+ q.text(","); q.breakable()
+ q.text("checksum = ");
+ q.text("%#x" % self.checksum)
+ q.breakable()
+ q.text('}')
+
+
class bsn_vport(loxi.OFObject):
subtypes = {}
@@ -2740,7 +2822,7 @@
table_feature_prop.subtypes[15] = table_feature_prop_apply_setfield_miss
class table_feature_prop_experimenter(table_feature_prop):
- type = 65535
+ type = 65534
def __init__(self, experimenter=None, subtype=None, experimenter_data=None):
if experimenter != None:
@@ -2772,7 +2854,7 @@
def unpack(reader):
obj = table_feature_prop_experimenter()
_type = reader.read("!H")[0]
- assert(_type == 65535)
+ assert(_type == 65534)
_length = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_length - (2 + 2))
@@ -2804,7 +2886,74 @@
q.breakable()
q.text('}')
-table_feature_prop.subtypes[65535] = table_feature_prop_experimenter
+table_feature_prop.subtypes[65534] = table_feature_prop_experimenter
+
+class table_feature_prop_experimenter_miss(table_feature_prop):
+ type = 65535
+
+ def __init__(self, experimenter=None, subtype=None, experimenter_data=None):
+ if experimenter != None:
+ self.experimenter = experimenter
+ else:
+ self.experimenter = 0
+ if subtype != None:
+ self.subtype = subtype
+ else:
+ self.subtype = 0
+ if experimenter_data != None:
+ self.experimenter_data = experimenter_data
+ else:
+ self.experimenter_data = ''
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 1
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ packed.append(self.experimenter_data)
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = table_feature_prop_experimenter_miss()
+ _type = reader.read("!H")[0]
+ assert(_type == 65535)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.experimenter = reader.read("!L")[0]
+ obj.subtype = reader.read("!L")[0]
+ obj.experimenter_data = str(reader.read_all())
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.experimenter != other.experimenter: return False
+ if self.subtype != other.subtype: return False
+ if self.experimenter_data != other.experimenter_data: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("table_feature_prop_experimenter_miss {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("experimenter = ");
+ q.text("%#x" % self.experimenter)
+ q.text(","); q.breakable()
+ q.text("subtype = ");
+ q.text("%#x" % self.subtype)
+ q.text(","); q.breakable()
+ q.text("experimenter_data = ");
+ q.pp(self.experimenter_data)
+ q.breakable()
+ q.text('}')
+
+table_feature_prop.subtypes[65535] = table_feature_prop_experimenter_miss
class table_feature_prop_instructions(table_feature_prop):
type = 0
diff --git a/src/python/loxi/of13/const.py b/src/python/loxi/of13/const.py
index 85dad90..b513de8 100644
--- a/src/python/loxi/of13/const.py
+++ b/src/python/loxi/of13/const.py
@@ -693,6 +693,7 @@
OFPR_BSN_FRAGMENTATION_REQUIRED = 137
OFPR_BSN_ARP = 139
OFPR_BSN_DHCP = 140
+OFPR_BSN_DEBUG = 141
ofp_packet_in_reason_map = {
0: 'OFPR_NO_MATCH',
@@ -710,6 +711,7 @@
137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
139: 'OFPR_BSN_ARP',
140: 'OFPR_BSN_DHCP',
+ 141: 'OFPR_BSN_DEBUG',
}
# Identifiers from group ofp_port
diff --git a/src/python/loxi/of13/instruction.py b/src/python/loxi/of13/instruction.py
index adb6543..e9c03dd 100644
--- a/src/python/loxi/of13/instruction.py
+++ b/src/python/loxi/of13/instruction.py
@@ -283,6 +283,54 @@
bsn.subtypes[1] = bsn_arp_offload
+class bsn_deny(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 5
+
+ def __init__(self):
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ packed.append('\x00' * 4)
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_deny()
+ _type = reader.read("!H")[0]
+ assert(_type == 65535)
+ _len = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_len - (2 + 2))
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 5)
+ reader.skip(4)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_deny {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[5] = bsn_deny
+
class bsn_dhcp_offload(bsn):
type = 65535
experimenter = 6035143
@@ -331,6 +379,54 @@
bsn.subtypes[2] = bsn_dhcp_offload
+class bsn_disable_split_horizon_check(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 3
+
+ def __init__(self):
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ packed.append('\x00' * 4)
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_disable_split_horizon_check()
+ _type = reader.read("!H")[0]
+ assert(_type == 65535)
+ _len = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_len - (2 + 2))
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 3)
+ reader.skip(4)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_disable_split_horizon_check {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[3] = bsn_disable_split_horizon_check
+
class bsn_disable_src_mac_check(bsn):
type = 65535
experimenter = 6035143
@@ -379,6 +475,54 @@
bsn.subtypes[0] = bsn_disable_src_mac_check
+class bsn_permit(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 4
+
+ def __init__(self):
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ packed.append('\x00' * 4)
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_permit()
+ _type = reader.read("!H")[0]
+ assert(_type == 65535)
+ _len = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_len - (2 + 2))
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 4)
+ reader.skip(4)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_permit {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[4] = bsn_permit
+
class clear_actions(instruction):
type = 5
diff --git a/src/python/loxi/of13/instruction_id.py b/src/python/loxi/of13/instruction_id.py
index 5580f27..49157e6 100644
--- a/src/python/loxi/of13/instruction_id.py
+++ b/src/python/loxi/of13/instruction_id.py
@@ -77,7 +77,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -90,7 +89,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -178,7 +176,6 @@
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
packed.append(struct.pack("!L", self.experimenter))
packed.append(struct.pack("!L", self.subtype))
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -199,7 +196,6 @@
_experimenter = reader.read("!L")[0]
assert(_experimenter == 6035143)
obj.subtype = reader.read("!L")[0]
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -231,7 +227,6 @@
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
packed.append(struct.pack("!L", self.experimenter))
packed.append(struct.pack("!L", self.subtype))
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -248,7 +243,6 @@
assert(_experimenter == 6035143)
_subtype = reader.read("!L")[0]
assert(_subtype == 1)
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -265,6 +259,52 @@
bsn.subtypes[1] = bsn_arp_offload
+class bsn_deny(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 5
+
+ def __init__(self):
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_deny()
+ _type = reader.read("!H")[0]
+ assert(_type == 65535)
+ _len = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_len - (2 + 2))
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 5)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_deny {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[5] = bsn_deny
+
class bsn_dhcp_offload(bsn):
type = 65535
experimenter = 6035143
@@ -279,7 +319,6 @@
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
packed.append(struct.pack("!L", self.experimenter))
packed.append(struct.pack("!L", self.subtype))
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -296,7 +335,6 @@
assert(_experimenter == 6035143)
_subtype = reader.read("!L")[0]
assert(_subtype == 2)
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -313,6 +351,52 @@
bsn.subtypes[2] = bsn_dhcp_offload
+class bsn_disable_split_horizon_check(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 3
+
+ def __init__(self):
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_disable_split_horizon_check()
+ _type = reader.read("!H")[0]
+ assert(_type == 65535)
+ _len = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_len - (2 + 2))
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 3)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_disable_split_horizon_check {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[3] = bsn_disable_split_horizon_check
+
class bsn_disable_src_mac_check(bsn):
type = 65535
experimenter = 6035143
@@ -327,7 +411,6 @@
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
packed.append(struct.pack("!L", self.experimenter))
packed.append(struct.pack("!L", self.subtype))
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -344,7 +427,6 @@
assert(_experimenter == 6035143)
_subtype = reader.read("!L")[0]
assert(_subtype == 0)
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -361,6 +443,52 @@
bsn.subtypes[0] = bsn_disable_src_mac_check
+class bsn_permit(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 4
+
+ def __init__(self):
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_permit()
+ _type = reader.read("!H")[0]
+ assert(_type == 65535)
+ _len = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_len - (2 + 2))
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 4)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_permit {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[4] = bsn_permit
+
class clear_actions(instruction_id):
type = 5
@@ -371,7 +499,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -384,7 +511,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -411,7 +537,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 3)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -424,7 +549,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(3)
return obj
def __eq__(self, other):
@@ -489,7 +613,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -502,7 +625,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
@@ -529,7 +651,6 @@
packed = []
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
- packed.append('\x00' * 4)
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -542,7 +663,6 @@
_len = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_len - (2 + 2))
- reader.skip(4)
return obj
def __eq__(self, other):
diff --git a/src/python/loxi/of13/message.py b/src/python/loxi/of13/message.py
index f4716fc..0aaeec6 100644
--- a/src/python/loxi/of13/message.py
+++ b/src/python/loxi/of13/message.py
@@ -2109,6 +2109,546 @@
bsn_header.subtypes[56] = bsn_controller_connections_request
+class experimenter_stats_reply(stats_reply):
+ subtypes = {}
+
+ version = 4
+ type = 19
+ stats_type = 65535
+
+ def __init__(self, xid=None, flags=None, experimenter=None, subtype=None):
+ if xid != None:
+ self.xid = xid
+ else:
+ self.xid = None
+ if flags != None:
+ self.flags = flags
+ else:
+ self.flags = 0
+ if experimenter != None:
+ self.experimenter = experimenter
+ else:
+ self.experimenter = 0
+ if subtype != None:
+ self.subtype = subtype
+ else:
+ self.subtype = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.version))
+ packed.append(struct.pack("!B", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+ packed.append(struct.pack("!L", self.xid))
+ packed.append(struct.pack("!H", self.stats_type))
+ packed.append(struct.pack("!H", self.flags))
+ packed.append('\x00' * 4)
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ length = sum([len(x) for x in packed])
+ packed[2] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ subtype, = reader.peek('!L', 16)
+ subclass = experimenter_stats_reply.subtypes.get(subtype)
+ if subclass:
+ return subclass.unpack(reader)
+
+ obj = experimenter_stats_reply()
+ _version = reader.read("!B")[0]
+ assert(_version == 4)
+ _type = reader.read("!B")[0]
+ assert(_type == 19)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.xid = reader.read("!L")[0]
+ _stats_type = reader.read("!H")[0]
+ assert(_stats_type == 65535)
+ obj.flags = reader.read("!H")[0]
+ reader.skip(4)
+ obj.experimenter = reader.read("!L")[0]
+ obj.subtype = reader.read("!L")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.xid != other.xid: return False
+ if self.flags != other.flags: return False
+ if self.experimenter != other.experimenter: return False
+ if self.subtype != other.subtype: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("experimenter_stats_reply {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("xid = ");
+ if self.xid != None:
+ q.text("%#x" % self.xid)
+ else:
+ q.text('None')
+ q.text(","); q.breakable()
+ q.text("flags = ");
+ q.text("%#x" % self.flags)
+ q.text(","); q.breakable()
+ q.text("subtype = ");
+ q.text("%#x" % self.subtype)
+ q.breakable()
+ q.text('}')
+
+stats_reply.subtypes[65535] = experimenter_stats_reply
+
+class bsn_stats_reply(experimenter_stats_reply):
+ subtypes = {}
+
+ version = 4
+ type = 19
+ stats_type = 65535
+ experimenter = 6035143
+
+ def __init__(self, xid=None, flags=None, subtype=None):
+ if xid != None:
+ self.xid = xid
+ else:
+ self.xid = None
+ if flags != None:
+ self.flags = flags
+ else:
+ self.flags = 0
+ if subtype != None:
+ self.subtype = subtype
+ else:
+ self.subtype = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.version))
+ packed.append(struct.pack("!B", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+ packed.append(struct.pack("!L", self.xid))
+ packed.append(struct.pack("!H", self.stats_type))
+ packed.append(struct.pack("!H", self.flags))
+ packed.append('\x00' * 4)
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ length = sum([len(x) for x in packed])
+ packed[2] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ subtype, = reader.peek('!L', 20)
+ subclass = bsn_stats_reply.subtypes.get(subtype)
+ if subclass:
+ return subclass.unpack(reader)
+
+ obj = bsn_stats_reply()
+ _version = reader.read("!B")[0]
+ assert(_version == 4)
+ _type = reader.read("!B")[0]
+ assert(_type == 19)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.xid = reader.read("!L")[0]
+ _stats_type = reader.read("!H")[0]
+ assert(_stats_type == 65535)
+ obj.flags = reader.read("!H")[0]
+ reader.skip(4)
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ obj.subtype = reader.read("!L")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.xid != other.xid: return False
+ if self.flags != other.flags: return False
+ if self.subtype != other.subtype: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_stats_reply {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("xid = ");
+ if self.xid != None:
+ q.text("%#x" % self.xid)
+ else:
+ q.text('None')
+ q.text(","); q.breakable()
+ q.text("flags = ");
+ q.text("%#x" % self.flags)
+ q.breakable()
+ q.text('}')
+
+experimenter_stats_reply.subtypes[6035143] = bsn_stats_reply
+
+class bsn_flow_checksum_bucket_stats_reply(bsn_stats_reply):
+ version = 4
+ type = 19
+ stats_type = 65535
+ experimenter = 6035143
+ subtype = 10
+
+ def __init__(self, xid=None, flags=None, entries=None):
+ if xid != None:
+ self.xid = xid
+ else:
+ self.xid = None
+ if flags != None:
+ self.flags = flags
+ else:
+ self.flags = 0
+ if entries != None:
+ self.entries = entries
+ else:
+ self.entries = []
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.version))
+ packed.append(struct.pack("!B", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+ packed.append(struct.pack("!L", self.xid))
+ packed.append(struct.pack("!H", self.stats_type))
+ packed.append(struct.pack("!H", self.flags))
+ packed.append('\x00' * 4)
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ packed.append(loxi.generic_util.pack_list(self.entries))
+ length = sum([len(x) for x in packed])
+ packed[2] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_flow_checksum_bucket_stats_reply()
+ _version = reader.read("!B")[0]
+ assert(_version == 4)
+ _type = reader.read("!B")[0]
+ assert(_type == 19)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.xid = reader.read("!L")[0]
+ _stats_type = reader.read("!H")[0]
+ assert(_stats_type == 65535)
+ obj.flags = reader.read("!H")[0]
+ reader.skip(4)
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 10)
+ obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_flow_checksum_bucket_stats_entry.unpack)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.xid != other.xid: return False
+ if self.flags != other.flags: return False
+ if self.entries != other.entries: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_flow_checksum_bucket_stats_reply {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("xid = ");
+ if self.xid != None:
+ q.text("%#x" % self.xid)
+ else:
+ q.text('None')
+ q.text(","); q.breakable()
+ q.text("flags = ");
+ q.text("%#x" % self.flags)
+ q.text(","); q.breakable()
+ q.text("entries = ");
+ q.pp(self.entries)
+ q.breakable()
+ q.text('}')
+
+bsn_stats_reply.subtypes[10] = bsn_flow_checksum_bucket_stats_reply
+
+class experimenter_stats_request(stats_request):
+ subtypes = {}
+
+ version = 4
+ type = 18
+ stats_type = 65535
+
+ def __init__(self, xid=None, flags=None, experimenter=None, subtype=None):
+ if xid != None:
+ self.xid = xid
+ else:
+ self.xid = None
+ if flags != None:
+ self.flags = flags
+ else:
+ self.flags = 0
+ if experimenter != None:
+ self.experimenter = experimenter
+ else:
+ self.experimenter = 0
+ if subtype != None:
+ self.subtype = subtype
+ else:
+ self.subtype = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.version))
+ packed.append(struct.pack("!B", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+ packed.append(struct.pack("!L", self.xid))
+ packed.append(struct.pack("!H", self.stats_type))
+ packed.append(struct.pack("!H", self.flags))
+ packed.append('\x00' * 4)
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ length = sum([len(x) for x in packed])
+ packed[2] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ subtype, = reader.peek('!L', 16)
+ subclass = experimenter_stats_request.subtypes.get(subtype)
+ if subclass:
+ return subclass.unpack(reader)
+
+ obj = experimenter_stats_request()
+ _version = reader.read("!B")[0]
+ assert(_version == 4)
+ _type = reader.read("!B")[0]
+ assert(_type == 18)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.xid = reader.read("!L")[0]
+ _stats_type = reader.read("!H")[0]
+ assert(_stats_type == 65535)
+ obj.flags = reader.read("!H")[0]
+ reader.skip(4)
+ obj.experimenter = reader.read("!L")[0]
+ obj.subtype = reader.read("!L")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.xid != other.xid: return False
+ if self.flags != other.flags: return False
+ if self.experimenter != other.experimenter: return False
+ if self.subtype != other.subtype: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("experimenter_stats_request {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("xid = ");
+ if self.xid != None:
+ q.text("%#x" % self.xid)
+ else:
+ q.text('None')
+ q.text(","); q.breakable()
+ q.text("flags = ");
+ q.text("%#x" % self.flags)
+ q.text(","); q.breakable()
+ q.text("subtype = ");
+ q.text("%#x" % self.subtype)
+ q.breakable()
+ q.text('}')
+
+stats_request.subtypes[65535] = experimenter_stats_request
+
+class bsn_stats_request(experimenter_stats_request):
+ subtypes = {}
+
+ version = 4
+ type = 18
+ stats_type = 65535
+ experimenter = 6035143
+
+ def __init__(self, xid=None, flags=None, subtype=None):
+ if xid != None:
+ self.xid = xid
+ else:
+ self.xid = None
+ if flags != None:
+ self.flags = flags
+ else:
+ self.flags = 0
+ if subtype != None:
+ self.subtype = subtype
+ else:
+ self.subtype = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.version))
+ packed.append(struct.pack("!B", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+ packed.append(struct.pack("!L", self.xid))
+ packed.append(struct.pack("!H", self.stats_type))
+ packed.append(struct.pack("!H", self.flags))
+ packed.append('\x00' * 4)
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ length = sum([len(x) for x in packed])
+ packed[2] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ subtype, = reader.peek('!L', 20)
+ subclass = bsn_stats_request.subtypes.get(subtype)
+ if subclass:
+ return subclass.unpack(reader)
+
+ obj = bsn_stats_request()
+ _version = reader.read("!B")[0]
+ assert(_version == 4)
+ _type = reader.read("!B")[0]
+ assert(_type == 18)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.xid = reader.read("!L")[0]
+ _stats_type = reader.read("!H")[0]
+ assert(_stats_type == 65535)
+ obj.flags = reader.read("!H")[0]
+ reader.skip(4)
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ obj.subtype = reader.read("!L")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.xid != other.xid: return False
+ if self.flags != other.flags: return False
+ if self.subtype != other.subtype: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_stats_request {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("xid = ");
+ if self.xid != None:
+ q.text("%#x" % self.xid)
+ else:
+ q.text('None')
+ q.text(","); q.breakable()
+ q.text("flags = ");
+ q.text("%#x" % self.flags)
+ q.breakable()
+ q.text('}')
+
+experimenter_stats_request.subtypes[6035143] = bsn_stats_request
+
+class bsn_flow_checksum_bucket_stats_request(bsn_stats_request):
+ version = 4
+ type = 18
+ stats_type = 65535
+ experimenter = 6035143
+ subtype = 10
+
+ def __init__(self, xid=None, flags=None, table_id=None):
+ if xid != None:
+ self.xid = xid
+ else:
+ self.xid = None
+ if flags != None:
+ self.flags = flags
+ else:
+ self.flags = 0
+ if table_id != None:
+ self.table_id = table_id
+ else:
+ self.table_id = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.version))
+ packed.append(struct.pack("!B", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+ packed.append(struct.pack("!L", self.xid))
+ packed.append(struct.pack("!H", self.stats_type))
+ packed.append(struct.pack("!H", self.flags))
+ packed.append('\x00' * 4)
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ packed.append(struct.pack("!B", self.table_id))
+ length = sum([len(x) for x in packed])
+ packed[2] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_flow_checksum_bucket_stats_request()
+ _version = reader.read("!B")[0]
+ assert(_version == 4)
+ _type = reader.read("!B")[0]
+ assert(_type == 18)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.xid = reader.read("!L")[0]
+ _stats_type = reader.read("!H")[0]
+ assert(_stats_type == 65535)
+ obj.flags = reader.read("!H")[0]
+ reader.skip(4)
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 10)
+ obj.table_id = reader.read("!B")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.xid != other.xid: return False
+ if self.flags != other.flags: return False
+ if self.table_id != other.table_id: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_flow_checksum_bucket_stats_request {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("xid = ");
+ if self.xid != None:
+ q.text("%#x" % self.xid)
+ else:
+ q.text('None')
+ q.text(","); q.breakable()
+ q.text("flags = ");
+ q.text("%#x" % self.flags)
+ q.text(","); q.breakable()
+ q.text("table_id = ");
+ q.text("%#x" % self.table_id)
+ q.breakable()
+ q.text('}')
+
+bsn_stats_request.subtypes[10] = bsn_flow_checksum_bucket_stats_request
+
class bsn_flow_idle(bsn_header):
version = 4
type = 4
@@ -2501,188 +3041,6 @@
bsn_header.subtypes[36] = bsn_flow_idle_enable_set_request
-class experimenter_stats_reply(stats_reply):
- subtypes = {}
-
- version = 4
- type = 19
- stats_type = 65535
-
- def __init__(self, xid=None, flags=None, experimenter=None, subtype=None):
- if xid != None:
- self.xid = xid
- else:
- self.xid = None
- if flags != None:
- self.flags = flags
- else:
- self.flags = 0
- if experimenter != None:
- self.experimenter = experimenter
- else:
- self.experimenter = 0
- if subtype != None:
- self.subtype = subtype
- else:
- self.subtype = 0
- return
-
- def pack(self):
- packed = []
- packed.append(struct.pack("!B", self.version))
- packed.append(struct.pack("!B", self.type))
- packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
- packed.append(struct.pack("!L", self.xid))
- packed.append(struct.pack("!H", self.stats_type))
- packed.append(struct.pack("!H", self.flags))
- packed.append('\x00' * 4)
- packed.append(struct.pack("!L", self.experimenter))
- packed.append(struct.pack("!L", self.subtype))
- length = sum([len(x) for x in packed])
- packed[2] = struct.pack("!H", length)
- return ''.join(packed)
-
- @staticmethod
- def unpack(reader):
- subtype, = reader.peek('!L', 16)
- subclass = experimenter_stats_reply.subtypes.get(subtype)
- if subclass:
- return subclass.unpack(reader)
-
- obj = experimenter_stats_reply()
- _version = reader.read("!B")[0]
- assert(_version == 4)
- _type = reader.read("!B")[0]
- assert(_type == 19)
- _length = reader.read("!H")[0]
- orig_reader = reader
- reader = orig_reader.slice(_length - (2 + 2))
- obj.xid = reader.read("!L")[0]
- _stats_type = reader.read("!H")[0]
- assert(_stats_type == 65535)
- obj.flags = reader.read("!H")[0]
- reader.skip(4)
- obj.experimenter = reader.read("!L")[0]
- obj.subtype = reader.read("!L")[0]
- return obj
-
- def __eq__(self, other):
- if type(self) != type(other): return False
- if self.xid != other.xid: return False
- if self.flags != other.flags: return False
- if self.experimenter != other.experimenter: return False
- if self.subtype != other.subtype: return False
- return True
-
- def pretty_print(self, q):
- q.text("experimenter_stats_reply {")
- with q.group():
- with q.indent(2):
- q.breakable()
- q.text("xid = ");
- if self.xid != None:
- q.text("%#x" % self.xid)
- else:
- q.text('None')
- q.text(","); q.breakable()
- q.text("flags = ");
- q.text("%#x" % self.flags)
- q.text(","); q.breakable()
- q.text("subtype = ");
- q.text("%#x" % self.subtype)
- q.breakable()
- q.text('}')
-
-stats_reply.subtypes[65535] = experimenter_stats_reply
-
-class bsn_stats_reply(experimenter_stats_reply):
- subtypes = {}
-
- version = 4
- type = 19
- stats_type = 65535
- experimenter = 6035143
-
- def __init__(self, xid=None, flags=None, subtype=None):
- if xid != None:
- self.xid = xid
- else:
- self.xid = None
- if flags != None:
- self.flags = flags
- else:
- self.flags = 0
- if subtype != None:
- self.subtype = subtype
- else:
- self.subtype = 0
- return
-
- def pack(self):
- packed = []
- packed.append(struct.pack("!B", self.version))
- packed.append(struct.pack("!B", self.type))
- packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
- packed.append(struct.pack("!L", self.xid))
- packed.append(struct.pack("!H", self.stats_type))
- packed.append(struct.pack("!H", self.flags))
- packed.append('\x00' * 4)
- packed.append(struct.pack("!L", self.experimenter))
- packed.append(struct.pack("!L", self.subtype))
- length = sum([len(x) for x in packed])
- packed[2] = struct.pack("!H", length)
- return ''.join(packed)
-
- @staticmethod
- def unpack(reader):
- subtype, = reader.peek('!L', 20)
- subclass = bsn_stats_reply.subtypes.get(subtype)
- if subclass:
- return subclass.unpack(reader)
-
- obj = bsn_stats_reply()
- _version = reader.read("!B")[0]
- assert(_version == 4)
- _type = reader.read("!B")[0]
- assert(_type == 19)
- _length = reader.read("!H")[0]
- orig_reader = reader
- reader = orig_reader.slice(_length - (2 + 2))
- obj.xid = reader.read("!L")[0]
- _stats_type = reader.read("!H")[0]
- assert(_stats_type == 65535)
- obj.flags = reader.read("!H")[0]
- reader.skip(4)
- _experimenter = reader.read("!L")[0]
- assert(_experimenter == 6035143)
- obj.subtype = reader.read("!L")[0]
- return obj
-
- def __eq__(self, other):
- if type(self) != type(other): return False
- if self.xid != other.xid: return False
- if self.flags != other.flags: return False
- if self.subtype != other.subtype: return False
- return True
-
- def pretty_print(self, q):
- q.text("bsn_stats_reply {")
- with q.group():
- with q.indent(2):
- q.breakable()
- q.text("xid = ");
- if self.xid != None:
- q.text("%#x" % self.xid)
- else:
- q.text('None')
- q.text(","); q.breakable()
- q.text("flags = ");
- q.text("%#x" % self.flags)
- q.breakable()
- q.text('}')
-
-experimenter_stats_reply.subtypes[6035143] = bsn_stats_reply
-
class bsn_gentable_bucket_stats_reply(bsn_stats_reply):
version = 4
type = 19
@@ -2771,188 +3129,6 @@
bsn_stats_reply.subtypes[5] = bsn_gentable_bucket_stats_reply
-class experimenter_stats_request(stats_request):
- subtypes = {}
-
- version = 4
- type = 18
- stats_type = 65535
-
- def __init__(self, xid=None, flags=None, experimenter=None, subtype=None):
- if xid != None:
- self.xid = xid
- else:
- self.xid = None
- if flags != None:
- self.flags = flags
- else:
- self.flags = 0
- if experimenter != None:
- self.experimenter = experimenter
- else:
- self.experimenter = 0
- if subtype != None:
- self.subtype = subtype
- else:
- self.subtype = 0
- return
-
- def pack(self):
- packed = []
- packed.append(struct.pack("!B", self.version))
- packed.append(struct.pack("!B", self.type))
- packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
- packed.append(struct.pack("!L", self.xid))
- packed.append(struct.pack("!H", self.stats_type))
- packed.append(struct.pack("!H", self.flags))
- packed.append('\x00' * 4)
- packed.append(struct.pack("!L", self.experimenter))
- packed.append(struct.pack("!L", self.subtype))
- length = sum([len(x) for x in packed])
- packed[2] = struct.pack("!H", length)
- return ''.join(packed)
-
- @staticmethod
- def unpack(reader):
- subtype, = reader.peek('!L', 16)
- subclass = experimenter_stats_request.subtypes.get(subtype)
- if subclass:
- return subclass.unpack(reader)
-
- obj = experimenter_stats_request()
- _version = reader.read("!B")[0]
- assert(_version == 4)
- _type = reader.read("!B")[0]
- assert(_type == 18)
- _length = reader.read("!H")[0]
- orig_reader = reader
- reader = orig_reader.slice(_length - (2 + 2))
- obj.xid = reader.read("!L")[0]
- _stats_type = reader.read("!H")[0]
- assert(_stats_type == 65535)
- obj.flags = reader.read("!H")[0]
- reader.skip(4)
- obj.experimenter = reader.read("!L")[0]
- obj.subtype = reader.read("!L")[0]
- return obj
-
- def __eq__(self, other):
- if type(self) != type(other): return False
- if self.xid != other.xid: return False
- if self.flags != other.flags: return False
- if self.experimenter != other.experimenter: return False
- if self.subtype != other.subtype: return False
- return True
-
- def pretty_print(self, q):
- q.text("experimenter_stats_request {")
- with q.group():
- with q.indent(2):
- q.breakable()
- q.text("xid = ");
- if self.xid != None:
- q.text("%#x" % self.xid)
- else:
- q.text('None')
- q.text(","); q.breakable()
- q.text("flags = ");
- q.text("%#x" % self.flags)
- q.text(","); q.breakable()
- q.text("subtype = ");
- q.text("%#x" % self.subtype)
- q.breakable()
- q.text('}')
-
-stats_request.subtypes[65535] = experimenter_stats_request
-
-class bsn_stats_request(experimenter_stats_request):
- subtypes = {}
-
- version = 4
- type = 18
- stats_type = 65535
- experimenter = 6035143
-
- def __init__(self, xid=None, flags=None, subtype=None):
- if xid != None:
- self.xid = xid
- else:
- self.xid = None
- if flags != None:
- self.flags = flags
- else:
- self.flags = 0
- if subtype != None:
- self.subtype = subtype
- else:
- self.subtype = 0
- return
-
- def pack(self):
- packed = []
- packed.append(struct.pack("!B", self.version))
- packed.append(struct.pack("!B", self.type))
- packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
- packed.append(struct.pack("!L", self.xid))
- packed.append(struct.pack("!H", self.stats_type))
- packed.append(struct.pack("!H", self.flags))
- packed.append('\x00' * 4)
- packed.append(struct.pack("!L", self.experimenter))
- packed.append(struct.pack("!L", self.subtype))
- length = sum([len(x) for x in packed])
- packed[2] = struct.pack("!H", length)
- return ''.join(packed)
-
- @staticmethod
- def unpack(reader):
- subtype, = reader.peek('!L', 20)
- subclass = bsn_stats_request.subtypes.get(subtype)
- if subclass:
- return subclass.unpack(reader)
-
- obj = bsn_stats_request()
- _version = reader.read("!B")[0]
- assert(_version == 4)
- _type = reader.read("!B")[0]
- assert(_type == 18)
- _length = reader.read("!H")[0]
- orig_reader = reader
- reader = orig_reader.slice(_length - (2 + 2))
- obj.xid = reader.read("!L")[0]
- _stats_type = reader.read("!H")[0]
- assert(_stats_type == 65535)
- obj.flags = reader.read("!H")[0]
- reader.skip(4)
- _experimenter = reader.read("!L")[0]
- assert(_experimenter == 6035143)
- obj.subtype = reader.read("!L")[0]
- return obj
-
- def __eq__(self, other):
- if type(self) != type(other): return False
- if self.xid != other.xid: return False
- if self.flags != other.flags: return False
- if self.subtype != other.subtype: return False
- return True
-
- def pretty_print(self, q):
- q.text("bsn_stats_request {")
- with q.group():
- with q.indent(2):
- q.breakable()
- q.text("xid = ");
- if self.xid != None:
- q.text("%#x" % self.xid)
- else:
- q.text('None')
- q.text(","); q.breakable()
- q.text("flags = ");
- q.text("%#x" % self.flags)
- q.breakable()
- q.text('}')
-
-experimenter_stats_request.subtypes[6035143] = bsn_stats_request
-
class bsn_gentable_bucket_stats_request(bsn_stats_request):
version = 4
type = 18
@@ -6678,6 +6854,256 @@
bsn_stats_request.subtypes[6] = bsn_switch_pipeline_stats_request
+class bsn_table_checksum_stats_reply(bsn_stats_reply):
+ version = 4
+ type = 19
+ stats_type = 65535
+ experimenter = 6035143
+ subtype = 11
+
+ def __init__(self, xid=None, flags=None, entries=None):
+ if xid != None:
+ self.xid = xid
+ else:
+ self.xid = None
+ if flags != None:
+ self.flags = flags
+ else:
+ self.flags = 0
+ if entries != None:
+ self.entries = entries
+ else:
+ self.entries = []
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.version))
+ packed.append(struct.pack("!B", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+ packed.append(struct.pack("!L", self.xid))
+ packed.append(struct.pack("!H", self.stats_type))
+ packed.append(struct.pack("!H", self.flags))
+ packed.append('\x00' * 4)
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ packed.append(loxi.generic_util.pack_list(self.entries))
+ length = sum([len(x) for x in packed])
+ packed[2] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_table_checksum_stats_reply()
+ _version = reader.read("!B")[0]
+ assert(_version == 4)
+ _type = reader.read("!B")[0]
+ assert(_type == 19)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.xid = reader.read("!L")[0]
+ _stats_type = reader.read("!H")[0]
+ assert(_stats_type == 65535)
+ obj.flags = reader.read("!H")[0]
+ reader.skip(4)
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 11)
+ obj.entries = loxi.generic_util.unpack_list(reader, common.bsn_table_checksum_stats_entry.unpack)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.xid != other.xid: return False
+ if self.flags != other.flags: return False
+ if self.entries != other.entries: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_table_checksum_stats_reply {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("xid = ");
+ if self.xid != None:
+ q.text("%#x" % self.xid)
+ else:
+ q.text('None')
+ q.text(","); q.breakable()
+ q.text("flags = ");
+ q.text("%#x" % self.flags)
+ q.text(","); q.breakable()
+ q.text("entries = ");
+ q.pp(self.entries)
+ q.breakable()
+ q.text('}')
+
+bsn_stats_reply.subtypes[11] = bsn_table_checksum_stats_reply
+
+class bsn_table_checksum_stats_request(bsn_stats_request):
+ version = 4
+ type = 18
+ stats_type = 65535
+ experimenter = 6035143
+ subtype = 11
+
+ def __init__(self, xid=None, flags=None):
+ if xid != None:
+ self.xid = xid
+ else:
+ self.xid = None
+ if flags != None:
+ self.flags = flags
+ else:
+ self.flags = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.version))
+ packed.append(struct.pack("!B", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+ packed.append(struct.pack("!L", self.xid))
+ packed.append(struct.pack("!H", self.stats_type))
+ packed.append(struct.pack("!H", self.flags))
+ packed.append('\x00' * 4)
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ length = sum([len(x) for x in packed])
+ packed[2] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_table_checksum_stats_request()
+ _version = reader.read("!B")[0]
+ assert(_version == 4)
+ _type = reader.read("!B")[0]
+ assert(_type == 18)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.xid = reader.read("!L")[0]
+ _stats_type = reader.read("!H")[0]
+ assert(_stats_type == 65535)
+ obj.flags = reader.read("!H")[0]
+ reader.skip(4)
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 11)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.xid != other.xid: return False
+ if self.flags != other.flags: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_table_checksum_stats_request {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("xid = ");
+ if self.xid != None:
+ q.text("%#x" % self.xid)
+ else:
+ q.text('None')
+ q.text(","); q.breakable()
+ q.text("flags = ");
+ q.text("%#x" % self.flags)
+ q.breakable()
+ q.text('}')
+
+bsn_stats_request.subtypes[11] = bsn_table_checksum_stats_request
+
+class bsn_table_set_buckets_size(bsn_header):
+ version = 4
+ type = 4
+ experimenter = 6035143
+ subtype = 61
+
+ def __init__(self, xid=None, table_id=None, buckets_size=None):
+ if xid != None:
+ self.xid = xid
+ else:
+ self.xid = None
+ if table_id != None:
+ self.table_id = table_id
+ else:
+ self.table_id = 0
+ if buckets_size != None:
+ self.buckets_size = buckets_size
+ else:
+ self.buckets_size = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!B", self.version))
+ packed.append(struct.pack("!B", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 2
+ packed.append(struct.pack("!L", self.xid))
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ packed.append(struct.pack("!H", self.table_id))
+ packed.append('\x00' * 2)
+ packed.append(struct.pack("!L", self.buckets_size))
+ length = sum([len(x) for x in packed])
+ packed[2] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_table_set_buckets_size()
+ _version = reader.read("!B")[0]
+ assert(_version == 4)
+ _type = reader.read("!B")[0]
+ assert(_type == 4)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.xid = reader.read("!L")[0]
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 61)
+ obj.table_id = reader.read("!H")[0]
+ reader.skip(2)
+ obj.buckets_size = reader.read("!L")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.xid != other.xid: return False
+ if self.table_id != other.table_id: return False
+ if self.buckets_size != other.buckets_size: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_table_set_buckets_size {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("xid = ");
+ if self.xid != None:
+ q.text("%#x" % self.xid)
+ else:
+ q.text('None')
+ q.text(","); q.breakable()
+ q.text("table_id = ");
+ q.text("%#x" % self.table_id)
+ q.text(","); q.breakable()
+ q.text("buckets_size = ");
+ q.text("%#x" % self.buckets_size)
+ q.breakable()
+ q.text('}')
+
+bsn_header.subtypes[61] = bsn_table_set_buckets_size
+
class bsn_time_reply(bsn_header):
version = 4
type = 4