From 3679d7facc57ebfc59f78fd34e163c3a6189aba9 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Mon, 1 Jul 2013 14:53:32 +0900 Subject: [PATCH] lib/packet: make packet_base.parser abstract method Signed-off-by: Isaku Yamahata Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/packet_base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ryu/lib/packet/packet_base.py b/ryu/lib/packet/packet_base.py index 847e5ce7..c3f76e31 100644 --- a/ryu/lib/packet/packet_base.py +++ b/ryu/lib/packet/packet_base.py @@ -13,9 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +import abc + class PacketBase(object): """A base class for a protocol (ethernet, ipv4, ...) header.""" + __metaclass__ = abc.ABCMeta _TYPES = {} @classmethod @@ -43,6 +46,7 @@ class PacketBase(object): return self.__class__.__name__ @classmethod + @abc.abstractmethod def parser(cls, buf): """Decode a protocol header.