From 5a0eea61faeb01ea45c2afd78637f054771c98af Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 5 Oct 2012 19:01:53 +0900 Subject: [PATCH] packet lib: set protocol_name in each protocol With this, it's easy to know the protocol name. Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/packet_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ryu/lib/packet/packet_base.py b/ryu/lib/packet/packet_base.py index 20964580..437678b3 100644 --- a/ryu/lib/packet/packet_base.py +++ b/ryu/lib/packet/packet_base.py @@ -28,6 +28,7 @@ class PacketBase(object): def __init__(self): super(PacketBase, self).__init__() self.length = 0 + self.protocol_name = self.__class__.__name__ @classmethod def parser(cls):