[controller,p4] add debug print into controller

This commit is contained in:
Nico Schottelius 2019-02-24 15:53:10 +01:00
commit 949560c995
3 changed files with 31 additions and 2 deletions

View file

@ -143,7 +143,7 @@ class L2Controller(object):
def debug_print_pkg(self, pkg, msg="INCOMING"):
log.info("{}: {}".format(msg, self.debug_format_pkg(pkg)))
log.debug("{}: {}".format(msg, self.debug_format_pkg(pkg)))
def debug_format_pkg(self, pkg):
packet = Ether(str(pkg))
@ -169,6 +169,8 @@ class L2Controller(object):
def recv_msg_cpu(self, pkg):
packet = Ether(str(pkg))
debug_print_pkg(pkg)
if packet.type == 0x800:
pass
elif packet.type == 0x86dd: