Re: Strange error with "netstat -i 1"

2022-11-20 Thread Masanobu SAITOH



On 2022/11/18 23:18, Takahiro Kambe wrote:
> Oh, I just noticed.

Thank you for fixing.

> diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
> index e33f84f324..b02df5fc3b 100644
> --- a/usr.bin/netstat/if.c
> +++ b/usr.bin/netstat/if.c
> @@ -176,7 +176,7 @@ if_data_ext_get(const char *ifname, struct if_data_ext 
> *dext)
>  {
>   char namebuf[1024];
>   size_t len;
> - int drops;
> + int64_t drops;
>  
>   /* For sysctl */
>   snprintf(namebuf, sizeof(namebuf),
> 

-- 
---
SAITOH Masanobu (msai...@execsw.org
 msai...@netbsd.org)


Re: Strange error with "netstat -i 1"

2022-11-18 Thread Takahiro Kambe
Oh, I just noticed.

diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index e33f84f324..b02df5fc3b 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -176,7 +176,7 @@ if_data_ext_get(const char *ifname, struct if_data_ext 
*dext)
 {
char namebuf[1024];
size_t len;
-   int drops;
+   int64_t drops;
 
/* For sysctl */
snprintf(namebuf, sizeof(namebuf),

-- 
Takahiro Kambe 


Strange error with "netstat -i 1"

2022-11-18 Thread Takahiro Kambe
Hi,

netstat(1) on NetBSD 9.99.106 has problem with "-w" option.

% NetBSD lenovon.a.back-street.net 9.99.106 NetBSD 9.99.106 (GENERIC) #2: Fri 
Nov 18 11:42:37 JST 2022  
t...@lenovon.a.back-street.net:/data/current/amd64/obj/sys/arch/amd64/compile/GENERIC
 amd64
% netstat -I re0 -i
Name  Mtu   Network   Address  Ipkts IerrsOpkts Oerrs Colls
re0   1500  00:2b:67:c6:b4:2f 3096 0 2433 0 0
re0   1500  192.168.128/2 lenovon.a.back-st 3096 0 2433 0 0
re0   1500  fe80::/64 fe80::22b:67ff:fe 3096 0 2433 0 0
% netstat  -w 1 
netstat: 'net.interfaces.re0.sndq.drops' not found
netstat: 'net.interfaces.lo0.sndq.drops' not found
  lo0 inlo0 out  total in  total out
 packets  errs  packets  errs colls   packets  errs  packets  errs colls
netstat: 'net.interfaces.re0.sndq.drops' not found
netstat: 'net.interfaces.lo0.sndq.drops' not found
9279 0 9279 0 0 16426 016031 0 0
netstat: 'net.interfaces.re0.sndq.drops' not found
netstat: 'net.interfaces.lo0.sndq.drops' not found
   8 08 0 014 0   14 0 0

-- 
Takahiro Kambe