From e3f911e6ab90be10a37edf00c5da2c204513c242 Mon Sep 17 00:00:00 2001 From: Matthew Long Date: Wed, 8 Nov 2017 06:05:12 -0500 Subject: [PATCH] Including non-unicast packets in packet count calculation (#1167) --- psutil/_psutil_windows.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c index d908a1c7d..1d1fd939a 100644 --- a/psutil/_psutil_windows.c +++ b/psutil/_psutil_windows.c @@ -2304,8 +2304,8 @@ psutil_net_io_counters(PyObject *self, PyObject *args) { py_nic_info = Py_BuildValue("(KKKKKKKK)", pIfRow->OutOctets, pIfRow->InOctets, - pIfRow->OutUcastPkts, - pIfRow->InUcastPkts, + (pIfRow->OutUcastPkts + pIfRow->OutNUcastPkts), + (pIfRow->InUcastPkts + pIfRow->InNUcastPkts), pIfRow->InErrors, pIfRow->OutErrors, pIfRow->InDiscards, @@ -2314,8 +2314,8 @@ psutil_net_io_counters(PyObject *self, PyObject *args) { py_nic_info = Py_BuildValue("(kkkkkkkk)", pIfRow->dwOutOctets, pIfRow->dwInOctets, - pIfRow->dwOutUcastPkts, - pIfRow->dwInUcastPkts, + (pIfRow->dwOutUcastPkts + pIfRow->dwOutNUcastPkts), + (pIfRow->dwInUcastPkts + pIfRow->dwInNUcastPkts), pIfRow->dwInErrors, pIfRow->dwOutErrors, pIfRow->dwInDiscards,