svinota/pyroute2 — pull request #36 by celebdor (2014-06-06 22:42:06+00:00)
Title: tcmsg: add hfsc support

With this patch, pyroute2 gets hfsc qdisc and class parsing, showing
things like the curve data the "stats app", etc. Example:

[{'attrs': [['TCA_KIND', 'hfsc'],
['TCA_OPTIONS', {}],
['TCA_STATS2',
{'attrs': [['TCA_STATS_BASIC', {'bytes': 0, 'packets': 0}],
['TCA_STATS_QUEUE',
{'backlog': 0, 'drops': 0, 'overlimits': 0, 'qlen': 0, 'requeues': 0}],
['TCA_STATS_APP', {'level': 1, 'period': 0, 'rtwork': 0, 'work': 0}]]}],
['TCA_STATS',
{'backlog': 0,
'bps': 0,
'bytes': 0,
'drop': 0,
'overlimits': 0,
'packets': 0,
'pps': 0,
'qlen': 0}],
['TCA_XSTATS',
'00:30:26:05:00:88:ff:ff:a0:39:7d:99:00:88:ff:ff:8c:b9:33:81:ff:ff:ff:ff']],
'event': 'RTM_NEWTCLASS',
'family': 0,
'handle': 2147680256,
'index': 3,
'info': 0,
'pad1': 0,
'pad2': 0,
'parent': 4294967295},
{'attrs': [['TCA_KIND', 'hfsc'],
['TCA_OPTIONS',
{'attrs': [['TCA_HFSC_FSC', {'d': 0, 'm1': 0, 'm2': 10000000}],
['TCA_HFSC_USC', {'d': 0, 'm1': 0, 'm2': 50000000}]]}],
['TCA_STATS2',
{'attrs': [['TCA_STATS_BASIC', {'bytes': 0, 'packets': 0}],
['TCA_STATS_QUEUE',
{'backlog': 0, 'drops': 0, 'overlimits': 0, 'qlen': 0, 'requeues': 0}],
['TCA_STATS_APP', {'level': 0, 'period': 0, 'rtwork': 0, 'work': 0}]]}],
['TCA_STATS',
{'backlog': 0,
'bps': 0,
'bytes': 0,
'drop': 0,
'overlimits': 0,
'packets': 0,
'pps': 0,
'qlen': 0}],
['TCA_XSTATS',
'c8:30:26:05:00:88:ff:ff:a0:39:7d:99:00:88:ff:ff:8c:b9:33:81:ff:ff:ff:ff']],
'event': 'RTM_NEWTCLASS',
'family': 0,
'handle': 2147680257,
'index': 3,
'info': 0,
'pad1': 0,
'pad2': 0,
'parent': 2147680256}]

Signed-off-by: Antoni S. Puimedon