diff options
Diffstat (limited to 'psutil/_pswindows.py')
-rw-r--r-- | psutil/_pswindows.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/psutil/_pswindows.py b/psutil/_pswindows.py index 43008487..ad3645b4 100644 --- a/psutil/_pswindows.py +++ b/psutil/_pswindows.py @@ -208,6 +208,16 @@ def net_connections(kind, _pid=-1): nt = _common.pconn(fd, fam, type, laddr, raddr, status) ret.add(nt) return list(ret) + + +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 def users(): |