Up to [cvs.NetBSD.org] / src / usr.bin / netstat
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: MAIN
Revision 1.18 / (download) - annotate - [select for diffs], Fri Aug 18 13:18:17 2023 UTC (7 months ago) by martin
Branch: MAIN
CVS Tags: triaxx-drm,
HEAD
Changes since 1.17: +3 -3
lines
Diff to previous 1.17 (colored)
Rename local bpf_* functions to nsbpf_* to avoid conflicts with new libpcap bpf_* functions
Revision 1.17 / (download) - annotate - [select for diffs], Sat Nov 19 08:56:20 2022 UTC (15 months, 4 weeks ago) by yamt
Branch: MAIN
CVS Tags: netbsd-10-base,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10
Changes since 1.16: +7 -2
lines
Diff to previous 1.16 (colored)
netstat/bpf.c: Don't print garbage for stale pid
Revision 1.16 / (download) - annotate - [select for diffs], Thu Sep 1 10:10:20 2022 UTC (18 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.15: +24 -24
lines
Diff to previous 1.15 (colored)
KNF. No functional change.
Revision 1.15 / (download) - annotate - [select for diffs], Fri Aug 28 07:23:48 2020 UTC (3 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Changes since 1.14: +3 -2
lines
Diff to previous 1.14 (colored)
netstat: strengthen against kernel changes netstat uses sysctlbyname to get counter data from the kernel. sysctlbyname fails with ENOMEM if actual counter data in the kernel is larger than a passed buffer. netstat just skips showing counters of a category if sysctlbyname fails, so if we added new counters of the category to the kernel, nestat shows nothing for the category. Fortunately sysctlbyname fills data as much as possible even if a passed buffer is short. So we can allow netstat to show the filled data anyway if sysctlbyname fails with ENOMEM. Note that this backcompat mechanism works only if new counters are appended, and doesn't work if new counters are inserted into the middle or counters are moved.
Revision 1.14 / (download) - annotate - [select for diffs], Sun Aug 18 04:14:40 2019 UTC (4 years, 7 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
is-mlppp-base,
is-mlppp
Changes since 1.13: +3 -3
lines
Diff to previous 1.13 (colored)
netstat: Add indirection of symbols to remove clash with sanitizers Add indirection and symbol renaming under MKSANITIZER for the linked in version of sysctlbyname, sysctlgetmibinfo and sysctlnametomib.
Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 26 09:50:42 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base,
phil-wifi-20190609,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
netbsd-9-base
Branch point for: phil-wifi,
netbsd-9
Changes since 1.12: +2 -2
lines
Diff to previous 1.12 (colored)
Fix a bug that BPF_D_OUT isn't printed correctly.
Revision 1.12 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:03 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
Changes since 1.11: +3 -2
lines
Diff to previous 1.11 (colored)
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif.
Revision 1.11 / (download) - annotate - [select for diffs], Fri Dec 14 08:15:44 2012 UTC (11 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-pagecache-base9,
yamt-pagecache-base8,
tls-maxphys-base,
tls-earlyentropy-base,
tls-earlyentropy,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
pgoyette-localcount-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount,
pgoyette-compat-base,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-8-base,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
localcount-20160914,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan,
agc-symver-base,
agc-symver
Branch point for: pgoyette-compat,
netbsd-8
Changes since 1.10: +2 -1
lines
Diff to previous 1.10 (colored)
Fix memory leak.
Revision 1.10 / (download) - annotate - [select for diffs], Mon Dec 13 21:15:30 2010 UTC (13 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4,
yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
netbsd-6-base,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus,
matt-mips64-premerge-20101231,
cherry-xenmp-base,
cherry-xenmp,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2
Branch point for: yamt-pagecache,
tls-maxphys,
netbsd-6
Changes since 1.9: +5 -3
lines
Diff to previous 1.9 (colored)
Add netstat rump client. For now, it always sets -X, i.e. will use only sysctl and no kvm (implementing /dev/mem for a rump kernel would probably not be hard, but still a non-zero effort). Note: since there is absolutely no network activity in a fresh rump kernel, rump.netstat usually displays exactly nothing when invoked without parameters. Arguments like -r, -bi, -p icmp etc. produce more stuff.
Revision 1.9 / (download) - annotate - [select for diffs], Sun Apr 12 16:08:37 2009 UTC (14 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: matt-premerge-20091211,
jym-xensuspend-nbase,
jym-xensuspend-base
Changes since 1.8: +6 -6
lines
Diff to previous 1.8 (colored)
Fix many WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare). Fix probable bug with numeric printing of anon ports when using sysctl.
Revision 1.8 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:14 2008 UTC (15 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4,
yamt-pf42-base3,
yamt-pf42-base2,
wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
wrstuden-revivesa,
netbsd-5-base,
netbsd-5-2-RELEASE,
netbsd-5-2-RC1,
netbsd-5-2-3-RELEASE,
netbsd-5-2-2-RELEASE,
netbsd-5-2-1-RELEASE,
netbsd-5-2,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-5-RELEASE,
netbsd-5-1-4-RELEASE,
netbsd-5-1-3-RELEASE,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-RC3,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
matt-nb5-pq3-base,
matt-nb5-pq3,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-premerge-20091211,
matt-nb5-mips64-k15,
matt-nb5-mips64,
matt-nb4-mips64-k7-u2a-k9b,
matt-mips64-base2,
hpcarm-cleanup-nbase
Branch point for: netbsd-5,
jym-xensuspend
Changes since 1.7: +1 -8
lines
Diff to previous 1.7 (colored)
Remove clause 3 and 4 from TNF licenses
Revision 1.7 / (download) - annotate - [select for diffs], Thu Apr 24 04:09:27 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.6: +2 -3
lines
Diff to previous 1.6 (colored)
Note which things are not available by KVM, and print a nice message stating so if someone specifically asks for it.
Revision 1.6 / (download) - annotate - [select for diffs], Fri Sep 22 23:21:52 2006 UTC (17 years, 6 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pf42-baseX,
yamt-pf42-base,
wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
netbsd-4-base,
netbsd-4-0-RELEASE,
netbsd-4-0-RC5,
netbsd-4-0-RC4,
netbsd-4-0-RC3,
netbsd-4-0-RC2,
netbsd-4-0-RC1,
netbsd-4-0-1-RELEASE,
netbsd-4-0,
netbsd-4,
matt-mips64-base,
matt-mips64,
matt-armv6-prevmlocking,
matt-armv6-nbase,
matt-armv6-base,
matt-armv6,
keiichi-mipv6-nbase,
keiichi-mipv6-base,
keiichi-mipv6,
hpcarm-cleanup-base,
hpcarm-cleanup,
cube-autoconf-base,
cube-autoconf
Branch point for: yamt-pf42
Changes since 1.5: +2 -2
lines
Diff to previous 1.5 (colored)
PR/31347: Geoff C. Wing: netstat err message is ambiguous about cause Applied patch, thanks!
Revision 1.5 / (download) - annotate - [select for diffs], Mon Nov 21 22:43:34 2005 UTC (18 years, 4 months ago) by rpaulo
Branch: MAIN
CVS Tags: chap-midi-nbase,
chap-midi-base,
chap-midi,
abandoned-netbsd-4-base,
abandoned-netbsd-4
Changes since 1.4: +3 -4
lines
Diff to previous 1.4 (colored)
Convert 3 printf() calls into one puts().
Revision 1.4 / (download) - annotate - [select for diffs], Fri Sep 2 22:52:24 2005 UTC (18 years, 6 months ago) by rpaulo
Branch: MAIN
Changes since 1.3: +106 -90
lines
Diff to previous 1.3 (colored)
Place the sysctl code under an if block and print an error message if the user tries to fetch information via kvm. Discussed with Elad Efrat.
Revision 1.3 / (download) - annotate - [select for diffs], Fri Sep 2 22:23:13 2005 UTC (18 years, 6 months ago) by rpaulo
Branch: MAIN
Changes since 1.2: +16 -9
lines
Diff to previous 1.2 (colored)
Request process information using sysctl(3) and not kvm(3) since bpf(4) statistics and peers are only available using the former.
Revision 1.2 / (download) - annotate - [select for diffs], Fri Aug 5 12:16:51 2005 UTC (18 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.1: +5 -5
lines
Diff to previous 1.1 (colored)
Fix printing formats.
Revision 1.1 / (download) - annotate - [select for diffs], Thu Aug 4 19:39:40 2005 UTC (18 years, 7 months ago) by rpaulo
Branch: MAIN
Implemented the userland part of the BPF statistics and BPF peers, net.bpf.stats and net.bpf.peers sysctls respectively. netstat(1) now has an additional syntax: netstat [-s] [-B] [-I Interface] Only the super user can see a list of BPF peers with the following command: # netstat -B Active BPF peers PID Int Recv Drop Capt Flags Bufsize Comm 4941 lo0 0 0 0 I--S- 262144 tcpdump 252 ex0 19668 0 5 I-RS- 32768 dhclient And every user can see the BPF statistics with: $ netstat -s -B bpf: 19669 total packets received 5 total packets captured 0 total packets dropped This idea came from FreeBSD (Christian S.J. Peron) but, currently, they doen't have a userland utility in the base system to read the sysctls. Reviewed by: christos@