| Support an illegal message |
| class illegal_message_type(object): |
| version = ofp.OFP_VERSION |
| def __init__(self, xid=None): |
| 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)) |
| length = sum([len(x) for x in packed]) |
| packed[2] = struct.pack("!H", length) |
| raise NotImplementedError() |
| if type(self) != type(other): return False |
| if self.version != other.version: return False |
| if self.type != other.type: return False |
| if self.xid != other.xid: return False |
| return not self.__eq__(other) |
| return "illegal_message_type" |