update pyloxi to floodlight/loxigen-artifacts@0b4fb635bf2c6839a667f01fcc5afb9cc7da3815
diff --git a/src/python/loxi/of13/bsn_tlv.py b/src/python/loxi/of13/bsn_tlv.py
index dd3eced..f169a6d 100644
--- a/src/python/loxi/of13/bsn_tlv.py
+++ b/src/python/loxi/of13/bsn_tlv.py
@@ -114,6 +114,53 @@
bsn_tlv.subtypes[10] = broadcast_query_timeout
+class circuit_id(bsn_tlv):
+ type = 14
+
+ def __init__(self, value=None):
+ if value != None:
+ self.value = value
+ else:
+ self.value = ''
+ 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(self.value)
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = circuit_id()
+ _type = reader.read("!H")[0]
+ assert(_type == 14)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.value = str(reader.read_all())
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.value != other.value: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("circuit_id {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.pp(self.value)
+ q.breakable()
+ q.text('}')
+
+bsn_tlv.subtypes[14] = circuit_id
+
class idle_notification(bsn_tlv):
type = 7
diff --git a/src/python/loxi/of13/const.py b/src/python/loxi/of13/const.py
index 404d582..85dad90 100644
--- a/src/python/loxi/of13/const.py
+++ b/src/python/loxi/of13/const.py
@@ -692,6 +692,7 @@
OFPR_BSN_DEST_PORT_UNREACHABLE = 136
OFPR_BSN_FRAGMENTATION_REQUIRED = 137
OFPR_BSN_ARP = 139
+OFPR_BSN_DHCP = 140
ofp_packet_in_reason_map = {
0: 'OFPR_NO_MATCH',
@@ -708,6 +709,7 @@
136: 'OFPR_BSN_DEST_PORT_UNREACHABLE',
137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
139: 'OFPR_BSN_ARP',
+ 140: 'OFPR_BSN_DHCP',
}
# Identifiers from group ofp_port
diff --git a/src/python/loxi/of13/instruction.py b/src/python/loxi/of13/instruction.py
index 5d36bda..adb6543 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_dhcp_offload(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 2
+
+ 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_dhcp_offload()
+ _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 == 2)
+ 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_dhcp_offload {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[2] = bsn_dhcp_offload
+
class bsn_disable_src_mac_check(bsn):
type = 65535
experimenter = 6035143
diff --git a/src/python/loxi/of13/instruction_id.py b/src/python/loxi/of13/instruction_id.py
index 2c101a1..5580f27 100644
--- a/src/python/loxi/of13/instruction_id.py
+++ b/src/python/loxi/of13/instruction_id.py
@@ -265,6 +265,54 @@
bsn.subtypes[1] = bsn_arp_offload
+class bsn_dhcp_offload(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 2
+
+ 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_dhcp_offload()
+ _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 == 2)
+ 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_dhcp_offload {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[2] = bsn_dhcp_offload
+
class bsn_disable_src_mac_check(bsn):
type = 65535
experimenter = 6035143