Use symbolic names in debugging
This commit is contained in:
parent
764245a914
commit
e48abdb254
2 changed files with 8 additions and 33 deletions
|
|
@ -435,18 +435,7 @@ class L2Controller(object):
|
|||
ether_orig = ""
|
||||
orig_packet = ""
|
||||
|
||||
if packet.type == 0x0800:
|
||||
log.debug("Received raw (untagged) IPv4 packet - BUG")
|
||||
self.debug_print_pkg(pkg)
|
||||
|
||||
elif packet.type == 0x86dd:
|
||||
log.debug("Received raw (untagged) IPv6 packet - BUG")
|
||||
self.debug_print_pkg(pkg)
|
||||
|
||||
log.debug("cpu = {}".format(cpu_header.__repr__()))
|
||||
log.debug("v4 reassambled={}".format(orig_packet.__repr__()))
|
||||
|
||||
elif packet.type == 0x4242:
|
||||
if packet.type == 0x4242:
|
||||
cpu_header = CpuHeader(packet.payload)
|
||||
|
||||
# Not necessary anymore - cpu decoding works
|
||||
|
|
@ -462,7 +451,7 @@ class L2Controller(object):
|
|||
print("Broken pkg: {}".format(pkg.__repr__()))
|
||||
return
|
||||
else:
|
||||
print("Broken pkg: {}".format(pkg.__repr__()))
|
||||
print("Broken / unhandled pkg: {}".format(pkg.__repr__()))
|
||||
return
|
||||
|
||||
# Process parsed
|
||||
|
|
@ -481,7 +470,7 @@ class L2Controller(object):
|
|||
if ICMPv6EchoRequest in orig_packet:
|
||||
self.handle_icmp6_echo_request(orig_packet)
|
||||
else:
|
||||
log.debug("unhandled reassambled={} from table {}".format(orig_packet.__repr__(), cpu_header.table_id))
|
||||
log.debug("unhandled reassambled={} from table {}".format(orig_packet.__repr__(), table_id_fieds[cpu_header.table_id]))
|
||||
|
||||
|
||||
def run_cpu_port_loop(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue