Signed-off-by: WATANABE Fumitaka <[email protected]>
---
 ryu/lib/packet/packet_base.py |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ryu/lib/packet/packet_base.py b/ryu/lib/packet/packet_base.py
index b0aeca0..ee573da 100644
--- a/ryu/lib/packet/packet_base.py
+++ b/ryu/lib/packet/packet_base.py
@@ -14,7 +14,11 @@
 # limitations under the License.


-class PacketBase(object):
+from ryu.ofproto.ofproto_parser import create_list_of_base_attributes
+from ryu.ofproto.ofproto_parser import StringifyMixin
+
+
+class PacketBase(StringifyMixin):
     """A base class for a protocol (ethernet, ipv4, ...) header."""
     _TYPES = {}

@@ -34,6 +38,7 @@ class PacketBase(object):
         Internal use only."""
         cls._TYPES[type_] = cls_

+    @create_list_of_base_attributes
     def __init__(self):
         super(PacketBase, self).__init__()
         self.length = 0
-- 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