sbm

simple bandwidth monitor
git clone git://git.2f30.org/sbm
Log | Files | Refs | LICENSE

commit 720ecec4e098282ea0dce51683b152fda2306462
parent 7fb41338b41ae24747b441b8bd44fa5a6c0b9ad9
Author: sin <sin@2f30.org>
Date:   Tue, 16 Feb 2016 16:50:56 +0000

Style fix

Diffstat:
Msbm.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sbm.c b/sbm.c @@ -16,6 +16,7 @@ #include <sys/types.h> #include <sys/socket.h> + #include <net/if.h> #ifdef __linux__ #include <linux/if_link.h> @@ -130,7 +131,7 @@ sample(char *ifname, unsigned long long *rxbytes, unsigned long long *txbytes, sdl = (struct sockaddr_dl *)(ifm + 1); if (sdl->sdl_family != AF_LINK) continue; - if (strncmp(sdl->sdl_data, ifname, sdl->sdl_nlen) != 0) + if (strncmp(sdl->sdl_data, ifname, sdl->sdl_nlen)) continue; *rxbytes = ifm->ifm_data.ifi_ibytes; *txbytes = ifm->ifm_data.ifi_obytes;