This may be table status and table desc messages.

Signed-off-by: Simon Horman <[email protected]>
---
 ryu/ofproto/ofproto_v1_4_parser.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/ryu/ofproto/ofproto_v1_4_parser.py 
b/ryu/ofproto/ofproto_v1_4_parser.py
index 042552e..dba1220 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -1663,6 +1663,28 @@ class OFPPort(StringifyMixin):
         return ofpport
 
 
+class OFPTableDesc(StringifyMixin):
+    def __init__(self, length=None, table_id=None, config=None,
+                 properties=None):
+        super(OFPTableDesc, self).__init__()
+        self.table_id = table_id
+        self.length = length
+        self.config = config
+        self.properties = properties
+
+    @classmethod
+    def parser(cls, buf, offset):
+        (length, table_id, config) = struct.unpack_from(
+            ofproto.OFP_TABLE_DESC_PACK_STR, buf, offset)
+        props = []
+        rest = buf[offset + ofproto.OFP_TABLE_DESC_SIZE:offset + length]
+        while rest:
+            p, rest = OFPTableModProp.parse(rest)
+            props.append(p)
+        ofptabledesc = cls(length, table_id, config, props)
+        return ofptabledesc
+
+
 def _set_stats_type(stats_type, stats_body_cls):
     def _set_cls_stats_type(cls):
         cls.cls_stats_type = stats_type
-- 
1.8.5.2


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to