diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2013-09-04 16:04:33 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-09-14 08:01:33 +0900 |
commit | 7cbc98db1fe8430f961e5e36229a56b8c816eeba (patch) | |
tree | 0902de59337fbe3b458826bca759a764a4c1d54b | |
parent | 35676eba53fdf6ba584428abcf8ed339c1b705b3 (diff) |
of10: assume OFPTableStats.name UTF-8
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/ofproto/ofproto_v1_0_parser.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ryu/ofproto/ofproto_v1_0_parser.py b/ryu/ofproto/ofproto_v1_0_parser.py index db11aacf..edca8d28 100644 --- a/ryu/ofproto/ofproto_v1_0_parser.py +++ b/ryu/ofproto/ofproto_v1_0_parser.py @@ -1076,6 +1076,15 @@ class OFPAggregateStats(ofproto_parser.namedtuple('OFPAggregateStats', ( class OFPTableStats(ofproto_parser.namedtuple('OFPTableStats', ( 'table_id', 'name', 'wildcards', 'max_entries', 'active_count', 'lookup_count', 'matched_count'))): + + _TYPE = { + 'utf-8': [ + # OF spec is unclear about the encoding of name. + # we assumes UTF-8. + 'name', + ] + } + @classmethod def parser(cls, buf, offset): tbl = struct.unpack_from(ofproto_v1_0.OFP_TABLE_STATS_PACK_STR, |