def net_if_stats():
    ret = cext.net_if_stats()
    for name, items in ret.items():
        isup, duplex, speed, mtu = items
        if hasattr(_common, 'NicDuplex'):
            duplex = _common.NicDuplex(duplex)
        ret[name] = _common.snicstats(isup, duplex, speed, mtu)
    return ret
Get NIC stats (isup, duplex, speed, mtu).
dataset/ETHPy150Open giampaolo/psutil/psutil/_pssunos.py/net_if_stats