packet lib: set protocol_name in each protocol
With this, it's easy to know the protocol name. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
5fd538ee7f
commit
5a0eea61fa
@ -28,6 +28,7 @@ class PacketBase(object):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(PacketBase, self).__init__()
|
super(PacketBase, self).__init__()
|
||||||
self.length = 0
|
self.length = 0
|
||||||
|
self.protocol_name = self.__class__.__name__
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def parser(cls):
|
def parser(cls):
|
||||||
|
Loading…
Reference in New Issue
Block a user