netstat -I in 4.3 shows lo0 too

2008-09-09 Thread Federico Giannici

Since we upgraded from 4.2 to 4.3 the netstat -I ifname command changed it's 
output and now includes the lo0 statistics too.


With 4.2:

# netstat -I sk0
NameMtu   Network Address  Ipkts IerrsOpkts Oerrs Colls
sk0 1500  Link  00:1c:f0:97:35:81  7441780 0 10252318 0 0
sk0 1500  195.120.250 arcidiocesi.paler  7441780 0 10252318 0 0
sk0 1500  fe80::%sk0/ fe80::21c:f0ff:fe  7441780 0 10252318 0 0
sk0 1500  195.120.250 secure.arcidioces  7441780 0 10252318 0 0


With 4.3:

# netstat -I sk0
NameMtu   Network Address  Ipkts IerrsOpkts Oerrs Colls
lo0 33168 localhost   localhost.neomedi70876 070876 0 0
lo0 33168 localhost.n localhost.neomedi70876 070876 0 0
lo0 33168 fe80::%lo0/ fe80::1%lo0  70876 070876 0 0
sk0 1500  Link  00:11:d8:8d:9f:c8 182383837 0 180003390 0 0
sk0 1500  eowyn.neome eowyn.neomedia.it 182383837 0 180003390 0 0
sk0 1500  fe80::%sk0/ fe80::211:d8ff:fe 182383837 0 180003390 0 0
sk0 1500  eowyn.neome eowyn.neomedia.it 182383837 0 180003390 0 0
sk0 1500  rtpproxy.ne rtpproxy.neomedia 182383837 0 180003390 0 0
sk0 1500  sip.neomedi sip.neomedia.it   182383837 0 180003390 0 0
sk0 1500  voice.neome voice.neomedia.it 182383837 0 180003390 0 0


These outputs are from different servers, but it's analogous in every server we 
tested.

Is this expected?


Thanks.

--
___
   __
  |-  [EMAIL PROTECTED]
  |ederico Giannici  http://www.neomedia.it
___



Re: netstat -I in 4.3 shows lo0 too

2008-09-09 Thread Евгений Юнак
2008/9/9 Federico Giannici [EMAIL PROTECTED]:
 Since we upgraded from 4.2 to 4.3 the netstat -I ifname command changed
 it's output and now includes the lo0 statistics too.


 With 4.2:

 # netstat -I sk0
 NameMtu   Network Address  Ipkts IerrsOpkts Oerrs
 Colls
 sk0 1500  Link  00:1c:f0:97:35:81  7441780 0 10252318 0
   0
 sk0 1500  195.120.250 arcidiocesi.paler  7441780 0 10252318 0
   0
 sk0 1500  fe80::%sk0/ fe80::21c:f0ff:fe  7441780 0 10252318 0
   0
 sk0 1500  195.120.250 secure.arcidioces  7441780 0 10252318 0
   0


 With 4.3:

 # netstat -I sk0
 NameMtu   Network Address  Ipkts IerrsOpkts Oerrs
 Colls
 lo0 33168 localhost   localhost.neomedi70876 070876 0
   0
 lo0 33168 localhost.n localhost.neomedi70876 070876 0
   0
 lo0 33168 fe80::%lo0/ fe80::1%lo0  70876 070876 0
   0
 sk0 1500  Link  00:11:d8:8d:9f:c8 182383837 0 180003390 0
 0
 sk0 1500  eowyn.neome eowyn.neomedia.it 182383837 0 180003390 0
 0
 sk0 1500  fe80::%sk0/ fe80::211:d8ff:fe 182383837 0 180003390 0
 0
 sk0 1500  eowyn.neome eowyn.neomedia.it 182383837 0 180003390 0
 0
 sk0 1500  rtpproxy.ne rtpproxy.neomedia 182383837 0 180003390 0
 0
 sk0 1500  sip.neomedi sip.neomedia.it   182383837 0 180003390 0
 0
 sk0 1500  voice.neome voice.neomedia.it 182383837 0 180003390 0
 0


 These outputs are from different servers, but it's analogous in every server
 we tested.

 Is this expected?


 Thanks.

 --
 ___
   __
  |-  [EMAIL PROTECTED]
  |ederico Giannici  http://www.neomedia.it
 ___



I've noticed another strange change in netstat behavior.
In 4.2, netstat -if inet works as expected, but in 4.4 it shows inet6
too. and vice versa.
All other combinations of views (-i, -r, -a) with address families
(inet, inet6, local) work fine,
only -i seems to ignore -f.
netstat manpage states it is possible to combine them, and it actually
worked back in 4.2
(don't have 4.3 near hand, so can't test it)
I think this is a bug, either in documentation or in code.
Anyway it would have be nice to have netstat -if work

[EMAIL PROTECTED]:~$ netstat -invf inet
NameMtu   Network Address  Ipkts IerrsOpkts Oerrs Colls
lo0 33204 Link   0 00 0 0
lo0 33204 127/8   127.0.0.10 00 0 0
lo0 33204 ::1/128 ::1  0 00 0 0
lo0 33204 fe80::%lo0/64 fe80::1%lo0  0 00
   0 0
rl0 1500  Link  00:c0:df:06:fa:65 3607 0 2918 0 0
rl0 1500  192.168.64/24 192.168.64.20 3607 0 2918
   0 0
rl0 1500  fe80::%rl0/64 fe80::2c0:dfff:fe06:fa65%rl0 3607
0 2918 0 0
rl1 1500  Link  00:c0:df:06:f8:de39639 027584 0 0
rl1 1500  192.168.1/24 192.168.1.20 39639 027584 0 0
rl1 1500  fe80::%rl1/64 fe80::2c0:dfff:fe06:f8de%rl139639
027584 0 0
enc0*   1536  Link   0 00 0 0
pppoe0  1492  Link   39631 227580 0 0
pppoe0  1492  fe80::%pppoe0/64 fe80::2c0:dfff:fe06:fa65%pppoe0
39631 227580 0 0
pppoe0  1492  91.124.26.128/32 91.124.26.12839631 2
27580 0 0
pflog0  33204 Link   0 00 0 0
[EMAIL PROTECTED]:~$ netstat -invf inet6
NameMtu   Network Address  Ipkts IerrsOpkts Oerrs Colls
lo0 33204 Link   0 00 0 0
lo0 33204 127/8   127.0.0.10 00 0 0
lo0 33204 ::1/128 ::1  0 00 0 0
lo0 33204 fe80::%lo0/64 fe80::1%lo0  0 00
   0 0
rl0 1500  Link  00:c0:df:06:fa:65 3607 0 2918 0 0
rl0 1500  192.168.64/24 192.168.64.20 3607 0 2918
   0 0
rl0 1500  fe80::%rl0/64 fe80::2c0:dfff:fe06:fa65%rl0 3607
0 2918 0 0
rl1 1500  Link  00:c0:df:06:f8:de39662 027604 0 0
rl1 1500  192.168.1/24 192.168.1.20 39662 027604 0 0
rl1 1500  fe80::%rl1/64 fe80::2c0:dfff:fe06:f8de%rl139662
027604 0 0
enc0*   1536  Link   0 00 0 0
pppoe0  1492  Link   39654 227600 0 0
pppoe0  1492  fe80::%pppoe0/64 fe80::2c0:dfff:fe06:fa65%pppoe0
39654 227600 0 0
pppoe0  1492  91.124.26.128/32 91.124.26.12839654   

Re: netstat -I in 4.3 shows lo0 too

2008-09-09 Thread Andreas Maus
On Tue, Sep 09, 2008 at 04:14:48PM +0200, Federico Giannici wrote:
 Since we upgraded from 4.2 to 4.3 the netstat -I ifname command changed 
 it's output and now includes the lo0 statistics too.
Hi.

Yes it is a bug and was previously discussed here:

http://marc.info/?l=openbsd-miscm=121403404706602w=2 

You can download a diff for this issue here:

http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/netstat/if.c.diff?r1=1.56r2=1.57

and rebuilding netstat by

cd /usr/src/usr.bin/netstat/
make  make install

(Assuming you installed the src.tar.gz tarball).

HTH,

Andreas.

-- 
Windows 95: A 32-bit patch for a 16-bit GUI shell running on top of
an 8-bit operating system written for a 4-bit processor by a 2-bit
company who cannot stand 1 bit of competition.