To inherit StringifyMixin is required for other packet libraries
like icmpv6.echo which does not inherit PacketBase, too.


Signed-off-by: WATANABE Fumitaka <[email protected]>
---
 ryu/lib/packet/icmp.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ryu/lib/packet/icmp.py b/ryu/lib/packet/icmp.py
index b049380..0dd5c2e 100644
--- a/ryu/lib/packet/icmp.py
+++ b/ryu/lib/packet/icmp.py
@@ -17,6 +17,7 @@ import struct

 from . import packet_base
 from . import packet_utils
+from ryu.ofproto.ofproto_parser import StringifyMixin


 ICMP_ECHO_REPLY = 0
@@ -101,7 +102,7 @@ class icmp(packet_base.PacketBase):


 @icmp.register_icmp_type(ICMP_ECHO_REPLY, ICMP_ECHO_REQUEST)
-class echo(object):
+class echo(StringifyMixin):
     """ICMP sub encoder/decoder class for Echo and Echo Reply messages.

     This is used with ryu.lib.packet.icmp.icmp for
@@ -150,7 +151,7 @@ class echo(object):


 @icmp.register_icmp_type(ICMP_TIME_EXCEEDED)
-class TimeExceeded(object):
+class TimeExceeded(StringifyMixin):
     _PACK_STR = '!4x'
     _MIN_LEN = struct.calcsize(_PACK_STR)

-- 1.7.10.4



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to