summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2013-07-01 14:53:32 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-07-02 01:19:18 +0900
commit3679d7facc57ebfc59f78fd34e163c3a6189aba9 (patch)
tree9a5759ecfe76f2fb47323151b591331012a01804
parent43e83726ae2ab6529964833542b35ae5a17a5f52 (diff)
lib/packet: make packet_base.parser abstract method
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/lib/packet/packet_base.py4
1 files changed, 4 insertions, 0 deletions
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.