From f8b26c8dabeecd9efe379237fe48b943b9547cd7 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 4 Sep 2013 16:04:34 +0900 Subject: of12: assume OFPTableStats.name UTF-8 Signed-off-by: YAMAMOTO Takashi Signed-off-by: FUJITA Tomonori --- ryu/ofproto/ofproto_v1_2_parser.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ryu/ofproto/ofproto_v1_2_parser.py b/ryu/ofproto/ofproto_v1_2_parser.py index bb2a3554..c055ae80 100644 --- a/ryu/ofproto/ofproto_v1_2_parser.py +++ b/ryu/ofproto/ofproto_v1_2_parser.py @@ -2308,6 +2308,15 @@ class OFPTableStats( stat.lookup_count, stat.matched_count)) self.logger.debug('TableStats: %s', tables) """ + + _TYPE = { + 'utf-8': [ + # OF spec is unclear about the encoding of name. + # we assumes UTF-8. + 'name', + ] + } + @classmethod def parser(cls, buf, offset): table = struct.unpack_from( -- cgit v1.2.3