OpenBSD CVS

CVS log for src/usr.bin/netstat/inet6.c


[BACK] Up to [local] / src / usr.bin / netstat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.57 / (download) - annotate - [select for diffs], Mon Feb 5 23:16:39 2024 UTC (3 months, 1 week ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.56: +4 -5 lines
Diff to previous 1.56 (colored)

Add netstat counter for route cache.

To optimize route caching, count cache hits and misses.  This is
shown in netstat -s for both inet and inet6.  Reuse the old IPv6
forward cache counter.  Sort ip6s_wrongif consistently.  For now
only IPv4 cache counter has been implemented.

OK mvs@

Revision 1.56 / (download) - annotate - [select for diffs], Fri Aug 12 14:49:15 2022 UTC (21 months, 1 week ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.55: +3 -1 lines
Diff to previous 1.55 (colored)

There are some places in ip and ip6 input where operations fail due
to out of memory.  Use a generic idropped counter for those.
OK mvs@

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jan 26 18:22:35 2021 UTC (3 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.54: +1 -3 lines
Diff to previous 1.54 (colored)

sockb variable is unused (and even worse, was common unused)

Revision 1.54 / (download) - annotate - [select for diffs], Sun Dec 8 11:08:22 2019 UTC (4 years, 5 months ago) by sashan
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.53: +2 -1 lines
Diff to previous 1.53 (colored)

Make sure packet destination address matches interface address,
where such packet is bound to. This check is enforced if and only
IP forwarding is disabled.

Change discussed with bluhm@, claudio@, deraadt@, markus@, tobhe@

OK bluhm@, claudio@, tobhe@

Revision 1.53 / (download) - annotate - [select for diffs], Sat Apr 20 11:36:19 2019 UTC (5 years, 1 month ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.52: +1 -2 lines
Diff to previous 1.52 (colored)

The rip6 checksum errors are accounted per socket.  So the no socket
errors include these, do not subtract both from delivered.  Avoids
an underflow in the rip6 delivered counter.
OK deraadt@ claudio@

Revision 1.52 / (download) - annotate - [select for diffs], Sat Jan 21 11:32:04 2017 UTC (7 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.51: +2 -3 lines
Diff to previous 1.51 (colored)

The POSIX APIs that that sockaddrs all ignore the s*_len field in the
incoming socket, so userspace doesn't need to set it unless it has its
own reasons for tracking the size along with the sockaddr.

ok phessler@ deraadt@ florian@

Revision 1.51 / (download) - annotate - [select for diffs], Thu Dec 22 11:04:44 2016 UTC (7 years, 4 months ago) by rzalamena
Branch: MAIN
Changes since 1.50: +2 -34 lines
Diff to previous 1.50 (colored)

Remove PIM support from the multicast stack.

ok mpi@

Revision 1.50 / (download) - annotate - [select for diffs], Mon Mar 28 07:30:28 2016 UTC (8 years, 1 month ago) by jca
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.49: +1 -4 lines
Diff to previous 1.49 (colored)

Drop if-zeroed gethostbyname2.h header, remnant from KAME times

Revision 1.49 / (download) - annotate - [select for diffs], Fri Sep 11 19:35:37 2015 UTC (8 years, 8 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.48: +1 -126 lines
Diff to previous 1.48 (colored)

Remove never called functions to dump per-ifp IPv6 statistics now that
the kernel buffers are gone.

ok claudio@

Revision 1.48 / (download) - annotate - [select for diffs], Thu Feb 12 01:49:02 2015 UTC (9 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.47: +2 -3 lines
Diff to previous 1.47 (colored)

Switch the printing of open sockets from ugly KVM internals to use
kvm_getfiles. This allows to run netstat without any extra privileges
and removes another setgid program from base..
There is still kvm reader code in there which is used for debugging
purposes (crashdump). netstat should still behave mostly the same.
deraadt@ and sthen@ agree that it is time to get this puppy in.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:10 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.46: +4 -3 lines
Diff to previous 1.46 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.46 / (download) - annotate - [select for diffs], Thu Aug 14 12:55:50 2014 UTC (9 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.45: +1 -2 lines
Diff to previous 1.45 (colored)

No need for <netinet/in_systm.h> nor <netinet/tcpip.h>.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Jun 23 03:46:17 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.44: +6 -6 lines
Diff to previous 1.44 (colored)

The second level of the CTL_NET sysctl is a PF_*, not an AF_*

inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)

Revision 1.44 / (download) - annotate - [select for diffs], Sun Aug 18 16:32:24 2013 UTC (10 years, 9 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.43: +6 -6 lines
Diff to previous 1.43 (colored)

Fix calls to printf-like functions which passed a non-fixed string
as the format and no variable args.
Replace "%#0.*X" with "%#.*X": the zero-fill flag is ignored/implied
on numeric conversions when a precision is specified.

ok jung@ millert@ krw@

Revision 1.43 / (download) - annotate - [select for diffs], Tue Dec 4 02:30:34 2012 UTC (11 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.42: +1 -2 lines
Diff to previous 1.42 (colored)

remove some unnecessary sys/mbuf.h inclusions

Revision 1.42 / (download) - annotate - [select for diffs], Tue Dec 21 13:12:13 2010 UTC (13 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.41: +1 -3 lines
Diff to previous 1.41 (colored)

ip6s_exthdrtoolong is always zero so remove it here which is the last user.
OK mikeb@, henning@, deraadt@

Revision 1.41 / (download) - annotate - [select for diffs], Thu Oct 21 10:51:05 2010 UTC (13 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.40: +1 -60 lines
Diff to previous 1.40 (colored)

There is neither TCP6 nor struct tcp6cb in our kernel.  So remove
tcp6_dump() from netstat.  It was never called anyway.  No binary
change.
ok henning@ claudio@

Revision 1.40 / (download) - annotate - [select for diffs], Thu Nov 5 20:50:14 2009 UTC (14 years, 6 months ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.39: +33 -1 lines
Diff to previous 1.39 (colored)

IPv6 support for divert sockets.

tested by phessler@ pyr@
ok claudio@
"go ahead" deraadt@

Revision 1.39 / (download) - annotate - [select for diffs], Fri Jul 17 14:21:37 2009 UTC (14 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.38: +22 -9 lines
Diff to previous 1.38 (colored)

revert 1.38: naddy looked closer at the output and some of the sections don't make sense without the headers anymore

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jul 16 23:14:10 2009 UTC (14 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.37: +10 -23 lines
Diff to previous 1.37 (colored)

make the inet6 output a little more like everything else.
ok deraadt + a small fix from damien

Revision 1.37 / (download) - annotate - [select for diffs], Sat Feb 7 15:06:04 2009 UTC (15 years, 3 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.36: +3 -2 lines
Diff to previous 1.36 (colored)

add missing headers needed for warn() and err().

ok claudio@ ray@

Revision 1.36 / (download) - annotate - [select for diffs], Wed Dec 19 01:47:00 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.35: +1 -11 lines
Diff to previous 1.35 (colored)

delete rcsid crud

Revision 1.35 / (download) - annotate - [select for diffs], Fri Dec 14 18:35:46 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.34: +39 -21 lines
Diff to previous 1.34 (colored)

remove 21 nlist variables, and instead use sysctl to query the kernel
turn on INET6 the default (remove the #ifdef's)
ok claudio reyk

Revision 1.34 / (download) - annotate - [select for diffs], Tue Sep 11 18:16:48 2007 UTC (16 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

u_quad_t -> u_int64_t and %qu -> %llu, from brad

Revision 1.33 / (download) - annotate - [select for diffs], Fri Nov 17 01:11:23 2006 UTC (17 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.32: +4 -3 lines
Diff to previous 1.32 (colored)

change semantics of ff01::/16 to interface local multicast
(to sync up with more recent IPv6 spec)

ok from: deraadt mcbride

Revision 1.32 / (download) - annotate - [select for diffs], Fri Mar 25 17:01:03 2005 UTC (19 years, 1 month ago) by jaredy
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.31: +9 -9 lines
Diff to previous 1.31 (colored)

kill unneeded (char *) casts.  ok millert, otto

Revision 1.31 / (download) - annotate - [select for diffs], Wed Nov 17 01:47:20 2004 UTC (19 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.30: +2 -6 lines
Diff to previous 1.30 (colored)

remove NI_WITHSCOPEID (which is not standard)

Revision 1.30 / (download) - annotate - [select for diffs], Thu Nov 6 06:18:20 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.29: +4 -3 lines
Diff to previous 1.29 (colored)

fix linklocal multicast address handling.  Matthias Drochner

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:13 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.28: +3 -7 lines
Diff to previous 1.28 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.28 / (download) - annotate - [select for diffs], Wed May 14 23:37:05 2003 UTC (21 years ago) by itojun
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

use __KAME__ to determine kame-based kernel.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Mar 16 19:10:46 2003 UTC (21 years, 2 months ago) by sturm
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

correctly initialize a pointer

OK millert@

Revision 1.26 / (download) - annotate - [select for diffs], Thu Mar 13 09:09:33 2003 UTC (21 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +12 -6 lines
Diff to previous 1.25 (colored)

lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu

Revision 1.25 / (download) - annotate - [select for diffs], Sat Feb 1 01:51:31 2003 UTC (21 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +23 -37 lines
Diff to previous 1.24 (colored)

ansi

Revision 1.24 / (download) - annotate - [select for diffs], Sat Oct 26 18:56:53 2002 UTC (21 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

typo.  NetBSD PR 18816

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jun 9 04:07:10 2002 UTC (21 years, 11 months ago) by jsyn
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Standardization -- s/tdb/TDB/ and various dup expansions.

ok aaron@

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jun 9 02:16:39 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored)

use strchr() instead of index()

Revision 1.21 / (download) - annotate - [select for diffs], Fri Jun 7 21:58:38 2002 UTC (21 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.20: +40 -2 lines
Diff to previous 1.20 (colored)

print rip6stat

Revision 1.20 / (download) - annotate - [select for diffs], Mon May 27 01:50:36 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.19: +29 -26 lines
Diff to previous 1.19 (colored)

a night of cleanup, so i can read this easier

Revision 1.19 / (download) - annotate - [select for diffs], Tue Feb 19 18:38:02 2002 UTC (22 years, 3 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

Fix gethostname() usage.

deraadt@ ok

Revision 1.18 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:50 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jan 17 21:34:58 2002 UTC (22 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.16: +51 -51 lines
Diff to previous 1.16 (colored)

evil, annoying spaces and tabs

Revision 1.16 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:15 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
Changes since 1.15: +5 -5 lines
Diff to previous 1.15 (colored)

kill more registers

millert@ ok

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 13 02:29:15 2001 UTC (22 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

typo in icmp6 stat printing

Revision 1.14 / (download) - annotate - [select for diffs], Wed Feb 7 11:43:50 2001 UTC (23 years, 3 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.13: +176 -147 lines
Diff to previous 1.13 (colored)

by default, don't bark on inbound ND messages, as outsider may be able to
fill up /var with bogus packets.
setting net.inet6.icmp6.nd6_debug will re-enable kernel messages on invalid
ND packet and other occasions.

improve icmp6 stats.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 11 17:53:29 2000 UTC (23 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

typo in -s message

Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 11 17:40:52 2000 UTC (23 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored)

show # of successful IPv6 path MTU changes with -s.  from kame

Revision 1.11 / (download) - annotate - [select for diffs], Sat Aug 26 03:01:50 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

typo. sync with kame

Revision 1.10 / (download) - annotate - [select for diffs], Sun Aug 13 19:01:38 2000 UTC (23 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.9: +6 -6 lines
Diff to previous 1.9 (colored)

typo.  be more friendly with netstat -ssn.  from jhawk@netbsd (via kame)

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jul 12 16:16:57 2000 UTC (23 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.8: +2 -34 lines
Diff to previous 1.8 (colored)

remove m_pulldown statistics, it is purely experimental and belongs to
kame system only (not for *bsd-merged systems).

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jul 6 10:16:56 2000 UTC (23 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.7: +24 -2 lines
Diff to previous 1.7 (colored)

more stats

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jun 16 02:10:50 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.6: +5 -3 lines
Diff to previous 1.6 (colored)

print # of icmp6 error suppressed by rate limit

Revision 1.6 / (download) - annotate - [select for diffs], Wed May 17 11:54:50 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.5: +4 -4 lines
Diff to previous 1.5 (colored)

s/icmp/icmp6/ in message

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 28 11:57:32 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.4: +110 -99 lines
Diff to previous 1.4 (colored)

update IPv6 portion to match latest sys/netinet6.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jan 18 05:39:35 2000 UTC (24 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.3: +2 -4 lines
Diff to previous 1.3 (colored)

print IPv6 multicast groups on -ia.
align multicast addresses on output (broken on 1.15 -> 1.16).

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jan 5 00:07:08 2000 UTC (24 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.2: +5 -5 lines
Diff to previous 1.2 (colored)

s/input histogram/input packet/histogram/
suggested by: deraadt

Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 30 20:31:31 1999 UTC (24 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +7 -6 lines
Diff to previous 1.1 (colored)

fix netstat -ss; some zeroed counters were displayed

Revision 1.1 / (download) - annotate - [select for diffs], Wed Dec 8 12:30:17 1999 UTC (24 years, 5 months ago) by itojun
Branch: MAIN

add IPv6 support from KAME.  cleanup type matches with printf() format.
KAME_SCOPEID should be enabled after KAME get{addr,name}info(3) merge.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.