Signed-off-by: IWASE Yusuke <iwase.yusu...@gmail.com>
---
 ryu/lib/mrtlib.py | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/ryu/lib/mrtlib.py b/ryu/lib/mrtlib.py
index a89ccfc..c2d50c6 100644
--- a/ryu/lib/mrtlib.py
+++ b/ryu/lib/mrtlib.py
@@ -264,6 +264,12 @@ class Ospf2MrtMessage(MrtMessage):
     # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     _HEADER_FMT = '!4s4s'
     HEADER_SIZE = struct.calcsize(_HEADER_FMT)
+    _TYPE = {
+        'ascii': [
+            'remote_ip',
+            'local_ip',
+        ],
+    }
 
     def __init__(self, remote_ip, local_ip, ospf_message):
         self.remote_ip = remote_ip
@@ -328,6 +334,12 @@ class TableDumpMrtMessage(MrtMessage):
     # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     _HEADER_FMT = ''  # should be defined in subclass
     HEADER_SIZE = 0
+    _TYPE = {
+        'ascii': [
+            'prefix',
+            'peer_ip',
+        ],
+    }
 
     def __init__(self, view_num, seq_num, prefix, prefix_len, status,
                  originated_time, peer_ip, peer_as, bgp_attributes,
@@ -457,6 +469,11 @@ class 
TableDump2PeerIndexTableMrtMessage(TableDump2MrtMessage):
     HEADER_SIZE = struct.calcsize(_HEADER_FMT)
     _PEER_COUNT_FMT = '!H'
     PEER_COUNT_SIZE = struct.calcsize(_PEER_COUNT_FMT)
+    _TYPE = {
+        'ascii': [
+            'bgp_id',
+        ],
+    }
 
     def __init__(self, bgp_id, peer_entries,
                  view_name='', view_name_len=None, peer_count=None):
@@ -540,6 +557,13 @@ class MrtPeer(stringify.StringifyMixin):
     IP_ADDR_FAMILY_BIT = 1 << 0
     AS_NUMBER_SIZE_BIT = 1 << 1
 
+    _TYPE = {
+        'ascii': [
+            'bgp_id',
+            'ip_addr',
+        ],
+    }
+
     def __init__(self, bgp_id, ip_addr, as_num, type_=0):
         self.type = type_
         self.bgp_id = bgp_id
@@ -937,6 +961,12 @@ class Bgp4MpMrtMessage(MrtMessage):
     """
     MRT Message for the BGP4MP Type.
     """
+    _TYPE = {
+        'ascii': [
+            'peer_ip',
+            'local_ip',
+        ],
+    }
 
 
 @MrtRecord.register_type(MrtRecord.TYPE_BGP4MP)
-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to