mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-07 13:26:11 +02:00
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>
This commit is contained in:
parent
43e83726ae
commit
3679d7facc
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user