summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--psutil/_psbsd.py2
-rw-r--r--psutil/_pslinux.py2
-rw-r--r--psutil/_psosx.py2
-rw-r--r--psutil/_psutil_posix.c6
4 files changed, 6 insertions, 6 deletions
diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py
index 72ef71e8..5790ec85 100644
--- a/psutil/_psbsd.py
+++ b/psutil/_psbsd.py
@@ -346,7 +346,7 @@ def net_if_stats():
ret = {}
for name in names:
mtu = cext_posix.net_if_mtu(name)
- isup = cext_posix.net_if_flags(name)
+ isup = cext_posix.net_if_isup(name)
duplex, speed = cext_posix.net_if_duplex_speed(name)
if hasattr(_common, 'NicDuplex'):
duplex = _common.NicDuplex(duplex)
diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py
index e019bbcf..8b641c40 100644
--- a/psutil/_pslinux.py
+++ b/psutil/_pslinux.py
@@ -960,7 +960,7 @@ def net_if_stats():
ret = {}
for name in names:
mtu = cext_posix.net_if_mtu(name)
- isup = cext_posix.net_if_flags(name)
+ isup = cext_posix.net_if_isup(name)
duplex, speed = cext.net_if_duplex_speed(name)
ret[name] = _common.snicstats(isup, duplex_map[duplex], speed, mtu)
return ret
diff --git a/psutil/_psosx.py b/psutil/_psosx.py
index f22ef2fb..fcf64be3 100644
--- a/psutil/_psosx.py
+++ b/psutil/_psosx.py
@@ -233,7 +233,7 @@ def net_if_stats():
ret = {}
for name in names:
mtu = cext_posix.net_if_mtu(name)
- isup = cext_posix.net_if_flags(name)
+ isup = cext_posix.net_if_isup(name)
duplex, speed = cext_posix.net_if_duplex_speed(name)
if hasattr(_common, 'NicDuplex'):
duplex = _common.NicDuplex(duplex)
diff --git a/psutil/_psutil_posix.c b/psutil/_psutil_posix.c
index 707c55a1..a96b356d 100644
--- a/psutil/_psutil_posix.c
+++ b/psutil/_psutil_posix.c
@@ -301,12 +301,12 @@ error:
/*
- * Inspect NIC flags, returns a bool indicating whether the NIC is
+ * Inspect NIC flags and returns a bool indicating whether the NIC is
* running. References:
* http://www.i-scream.org/libstatgrab/
*/
static PyObject *
-psutil_net_if_flags(PyObject *self, PyObject *args) {
+psutil_net_if_isup(PyObject *self, PyObject *args) {
char *nic_name;
int sock = 0;
int ret;
@@ -545,7 +545,7 @@ PsutilMethods[] = {
"Retrieve NICs information"},
{"net_if_mtu", psutil_net_if_mtu, METH_VARARGS,
"Retrieve NIC MTU"},
- {"net_if_flags", psutil_net_if_flags, METH_VARARGS,
+ {"net_if_isup", psutil_net_if_isup, METH_VARARGS,
"Retrieve NIC flags"},
#if defined(PSUTIL_BSD) || defined(PSUTIL_OSX)
{"net_if_duplex_speed", psutil_net_if_duplex_speed, METH_VARARGS,