- if_dump['interface_name'] = if_dump['interface_name'].rstrip('\x00')
- if_dump['tag'] = if_dump['tag'].rstrip('\x00')
- if_dump['l2_address'] = L2Util.bin_to_mac(if_dump['l2_address'])
+ if_dump['l2_address'] = str(if_dump['l2_address'])
+ if_dump['b_dmac'] = str(if_dump['b_dmac'])
+ if_dump['b_smac'] = str(if_dump['b_smac'])
+ if_dump['flags'] = if_dump['flags'].value
+ if_dump['type'] = if_dump['type'].value
+ if_dump['link_duplex'] = if_dump['link_duplex'].value
+ if_dump['sub_if_flags'] = if_dump['sub_if_flags'].value \
+ if hasattr(if_dump['sub_if_flags'], 'value') \
+ else int(if_dump['sub_if_flags'])