History log of /openbsd-current/usr.bin/netstat/inet6.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.57 05-Feb-2024 bluhm

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 tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE OPENBSD_7_4_BASE
# 1.56 12-Aug-2022 bluhm

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 tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.55 26-Jan-2021 deraadt

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


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.54 08-Dec-2019 sashan

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 tags: OPENBSD_6_6_BASE
# 1.53 20-Apr-2019 bluhm

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 tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.52 21-Jan-2017 guenther

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@


# 1.51 22-Dec-2016 rzalamena

Remove PIM support from the multicast stack.

ok mpi@


Revision tags: OPENBSD_6_0_BASE
# 1.50 28-Mar-2016 jca

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


Revision tags: OPENBSD_5_9_BASE
# 1.49 11-Sep-2015 mpi

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

ok claudio@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.48 12-Feb-2015 claudio

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.


# 1.47 16-Jan-2015 deraadt

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)


# 1.46 14-Aug-2014 mpi

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


Revision tags: OPENBSD_5_6_BASE
# 1.45 23-Jun-2014 guenther

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 tags: OPENBSD_5_5_BASE
# 1.44 18-Aug-2013 guenther

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 tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.43 04-Dec-2012 deraadt

remove some unnecessary sys/mbuf.h inclusions


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.42 21-Dec-2010 claudio

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


# 1.41 21-Oct-2010 bluhm

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 tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.40 05-Nov-2009 michele

IPv6 support for divert sockets.

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


# 1.39 17-Jul-2009 tedu

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


# 1.38 16-Jul-2009 tedu

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


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.37 07-Feb-2009 chl

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

ok claudio@ ray@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.36 19-Dec-2007 deraadt

delete rcsid crud


# 1.35 14-Dec-2007 deraadt

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


# 1.34 11-Sep-2007 henning

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


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.33 17-Nov-2006 itojun

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

ok from: deraadt mcbride


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.32 25-Mar-2005 jaredy

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


Revision tags: OPENBSD_3_7_BASE
# 1.31 17-Nov-2004 itojun

remove NI_WITHSCOPEID (which is not standard)


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.30 06-Nov-2003 itojun

fix linklocal multicast address handling. Matthias Drochner


Revision tags: OPENBSD_3_4_BASE
# 1.29 03-Jun-2003 millert

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


# 1.28 14-May-2003 itojun

use __KAME__ to determine kame-based kernel.


Revision tags: OPENBSD_3_3_BASE
# 1.27 16-Mar-2003 sturm

correctly initialize a pointer

OK millert@


# 1.26 13-Mar-2003 deraadt

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


# 1.25 01-Feb-2003 deraadt

ansi


# 1.24 26-Oct-2002 itojun

typo. NetBSD PR 18816


Revision tags: OPENBSD_3_2_BASE
# 1.23 09-Jun-2002 jsyn

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

ok aaron@


# 1.22 09-Jun-2002 deraadt

use strchr() instead of index()


# 1.21 07-Jun-2002 itojun

print rip6stat


# 1.20 27-May-2002 deraadt

a night of cleanup, so i can read this easier


Revision tags: OPENBSD_3_1_BASE
# 1.19 19-Feb-2002 mpech

Fix gethostname() usage.

deraadt@ ok


# 1.18 16-Feb-2002 millert

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.


# 1.17 17-Jan-2002 mickey

evil, annoying spaces and tabs


# 1.16 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.15 13-Jun-2001 itojun

typo in icmp6 stat printing


Revision tags: OPENBSD_2_9_BASE
# 1.14 07-Feb-2001 itojun

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.


# 1.13 11-Dec-2000 itojun

typo in -s message


# 1.12 11-Dec-2000 itojun

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


Revision tags: OPENBSD_2_8_BASE
# 1.11 26-Aug-2000 itojun

typo. sync with kame


# 1.10 13-Aug-2000 itojun

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


# 1.9 12-Jul-2000 itojun

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


# 1.8 06-Jul-2000 itojun

more stats


# 1.7 16-Jun-2000 itojun

print # of icmp6 error suppressed by rate limit


# 1.6 17-May-2000 itojun

s/icmp/icmp6/ in message


Revision tags: OPENBSD_2_7_BASE
# 1.5 28-Feb-2000 itojun

update IPv6 portion to match latest sys/netinet6.


# 1.4 18-Jan-2000 itojun

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


# 1.3 05-Jan-2000 itojun

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


# 1.2 30-Dec-1999 deraadt

fix netstat -ss; some zeroed counters were displayed


# 1.1 08-Dec-1999 itojun

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


# 1.56 12-Aug-2022 bluhm

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 tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.55 26-Jan-2021 deraadt

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


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.54 08-Dec-2019 sashan

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 tags: OPENBSD_6_6_BASE
# 1.53 20-Apr-2019 bluhm

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 tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.52 21-Jan-2017 guenther

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@


# 1.51 22-Dec-2016 rzalamena

Remove PIM support from the multicast stack.

ok mpi@


Revision tags: OPENBSD_6_0_BASE
# 1.50 28-Mar-2016 jca

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


Revision tags: OPENBSD_5_9_BASE
# 1.49 11-Sep-2015 mpi

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

ok claudio@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.48 12-Feb-2015 claudio

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.


# 1.47 16-Jan-2015 deraadt

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)


# 1.46 14-Aug-2014 mpi

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


Revision tags: OPENBSD_5_6_BASE
# 1.45 23-Jun-2014 guenther

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 tags: OPENBSD_5_5_BASE
# 1.44 18-Aug-2013 guenther

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 tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.43 04-Dec-2012 deraadt

remove some unnecessary sys/mbuf.h inclusions


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.42 21-Dec-2010 claudio

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


# 1.41 21-Oct-2010 bluhm

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 tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.40 05-Nov-2009 michele

IPv6 support for divert sockets.

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


# 1.39 17-Jul-2009 tedu

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


# 1.38 16-Jul-2009 tedu

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


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.37 07-Feb-2009 chl

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

ok claudio@ ray@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.36 19-Dec-2007 deraadt

delete rcsid crud


# 1.35 14-Dec-2007 deraadt

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


# 1.34 11-Sep-2007 henning

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


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.33 17-Nov-2006 itojun

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

ok from: deraadt mcbride


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.32 25-Mar-2005 jaredy

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


Revision tags: OPENBSD_3_7_BASE
# 1.31 17-Nov-2004 itojun

remove NI_WITHSCOPEID (which is not standard)


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.30 06-Nov-2003 itojun

fix linklocal multicast address handling. Matthias Drochner


Revision tags: OPENBSD_3_4_BASE
# 1.29 03-Jun-2003 millert

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


# 1.28 14-May-2003 itojun

use __KAME__ to determine kame-based kernel.


Revision tags: OPENBSD_3_3_BASE
# 1.27 16-Mar-2003 sturm

correctly initialize a pointer

OK millert@


# 1.26 13-Mar-2003 deraadt

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


# 1.25 01-Feb-2003 deraadt

ansi


# 1.24 26-Oct-2002 itojun

typo. NetBSD PR 18816


Revision tags: OPENBSD_3_2_BASE
# 1.23 09-Jun-2002 jsyn

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

ok aaron@


# 1.22 09-Jun-2002 deraadt

use strchr() instead of index()


# 1.21 07-Jun-2002 itojun

print rip6stat


# 1.20 27-May-2002 deraadt

a night of cleanup, so i can read this easier


Revision tags: OPENBSD_3_1_BASE
# 1.19 19-Feb-2002 mpech

Fix gethostname() usage.

deraadt@ ok


# 1.18 16-Feb-2002 millert

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.


# 1.17 17-Jan-2002 mickey

evil, annoying spaces and tabs


# 1.16 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.15 13-Jun-2001 itojun

typo in icmp6 stat printing


Revision tags: OPENBSD_2_9_BASE
# 1.14 07-Feb-2001 itojun

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.


# 1.13 11-Dec-2000 itojun

typo in -s message


# 1.12 11-Dec-2000 itojun

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


Revision tags: OPENBSD_2_8_BASE
# 1.11 26-Aug-2000 itojun

typo. sync with kame


# 1.10 13-Aug-2000 itojun

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


# 1.9 12-Jul-2000 itojun

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


# 1.8 06-Jul-2000 itojun

more stats


# 1.7 16-Jun-2000 itojun

print # of icmp6 error suppressed by rate limit


# 1.6 17-May-2000 itojun

s/icmp/icmp6/ in message


Revision tags: OPENBSD_2_7_BASE
# 1.5 28-Feb-2000 itojun

update IPv6 portion to match latest sys/netinet6.


# 1.4 18-Jan-2000 itojun

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


# 1.3 05-Jan-2000 itojun

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


# 1.2 30-Dec-1999 deraadt

fix netstat -ss; some zeroed counters were displayed


# 1.1 08-Dec-1999 itojun

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


# 1.55 26-Jan-2021 deraadt

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


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.54 08-Dec-2019 sashan

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 tags: OPENBSD_6_6_BASE
# 1.53 20-Apr-2019 bluhm

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 tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.52 21-Jan-2017 guenther

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@


# 1.51 22-Dec-2016 rzalamena

Remove PIM support from the multicast stack.

ok mpi@


Revision tags: OPENBSD_6_0_BASE
# 1.50 28-Mar-2016 jca

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


Revision tags: OPENBSD_5_9_BASE
# 1.49 11-Sep-2015 mpi

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

ok claudio@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.48 12-Feb-2015 claudio

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.


# 1.47 16-Jan-2015 deraadt

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)


# 1.46 14-Aug-2014 mpi

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


Revision tags: OPENBSD_5_6_BASE
# 1.45 23-Jun-2014 guenther

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 tags: OPENBSD_5_5_BASE
# 1.44 18-Aug-2013 guenther

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 tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.43 04-Dec-2012 deraadt

remove some unnecessary sys/mbuf.h inclusions


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.42 21-Dec-2010 claudio

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


# 1.41 21-Oct-2010 bluhm

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 tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.40 05-Nov-2009 michele

IPv6 support for divert sockets.

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


# 1.39 17-Jul-2009 tedu

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


# 1.38 16-Jul-2009 tedu

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


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.37 07-Feb-2009 chl

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

ok claudio@ ray@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.36 19-Dec-2007 deraadt

delete rcsid crud


# 1.35 14-Dec-2007 deraadt

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


# 1.34 11-Sep-2007 henning

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


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.33 17-Nov-2006 itojun

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

ok from: deraadt mcbride


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.32 25-Mar-2005 jaredy

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


Revision tags: OPENBSD_3_7_BASE
# 1.31 17-Nov-2004 itojun

remove NI_WITHSCOPEID (which is not standard)


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.30 06-Nov-2003 itojun

fix linklocal multicast address handling. Matthias Drochner


Revision tags: OPENBSD_3_4_BASE
# 1.29 03-Jun-2003 millert

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


# 1.28 14-May-2003 itojun

use __KAME__ to determine kame-based kernel.


Revision tags: OPENBSD_3_3_BASE
# 1.27 16-Mar-2003 sturm

correctly initialize a pointer

OK millert@


# 1.26 13-Mar-2003 deraadt

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


# 1.25 01-Feb-2003 deraadt

ansi


# 1.24 26-Oct-2002 itojun

typo. NetBSD PR 18816


Revision tags: OPENBSD_3_2_BASE
# 1.23 09-Jun-2002 jsyn

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

ok aaron@


# 1.22 09-Jun-2002 deraadt

use strchr() instead of index()


# 1.21 07-Jun-2002 itojun

print rip6stat


# 1.20 27-May-2002 deraadt

a night of cleanup, so i can read this easier


Revision tags: OPENBSD_3_1_BASE
# 1.19 19-Feb-2002 mpech

Fix gethostname() usage.

deraadt@ ok


# 1.18 16-Feb-2002 millert

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.


# 1.17 17-Jan-2002 mickey

evil, annoying spaces and tabs


# 1.16 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.15 13-Jun-2001 itojun

typo in icmp6 stat printing


Revision tags: OPENBSD_2_9_BASE
# 1.14 07-Feb-2001 itojun

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.


# 1.13 11-Dec-2000 itojun

typo in -s message


# 1.12 11-Dec-2000 itojun

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


Revision tags: OPENBSD_2_8_BASE
# 1.11 26-Aug-2000 itojun

typo. sync with kame


# 1.10 13-Aug-2000 itojun

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


# 1.9 12-Jul-2000 itojun

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


# 1.8 06-Jul-2000 itojun

more stats


# 1.7 16-Jun-2000 itojun

print # of icmp6 error suppressed by rate limit


# 1.6 17-May-2000 itojun

s/icmp/icmp6/ in message


Revision tags: OPENBSD_2_7_BASE
# 1.5 28-Feb-2000 itojun

update IPv6 portion to match latest sys/netinet6.


# 1.4 18-Jan-2000 itojun

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


# 1.3 05-Jan-2000 itojun

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


# 1.2 30-Dec-1999 deraadt

fix netstat -ss; some zeroed counters were displayed


# 1.1 08-Dec-1999 itojun

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


# 1.54 08-Dec-2019 sashan

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 tags: OPENBSD_6_6_BASE
# 1.53 20-Apr-2019 bluhm

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 tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.52 21-Jan-2017 guenther

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@


# 1.51 22-Dec-2016 rzalamena

Remove PIM support from the multicast stack.

ok mpi@


Revision tags: OPENBSD_6_0_BASE
# 1.50 28-Mar-2016 jca

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


Revision tags: OPENBSD_5_9_BASE
# 1.49 11-Sep-2015 mpi

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

ok claudio@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.48 12-Feb-2015 claudio

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.


# 1.47 16-Jan-2015 deraadt

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)


# 1.46 14-Aug-2014 mpi

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


Revision tags: OPENBSD_5_6_BASE
# 1.45 23-Jun-2014 guenther

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 tags: OPENBSD_5_5_BASE
# 1.44 18-Aug-2013 guenther

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 tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.43 04-Dec-2012 deraadt

remove some unnecessary sys/mbuf.h inclusions


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.42 21-Dec-2010 claudio

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


# 1.41 21-Oct-2010 bluhm

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 tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.40 05-Nov-2009 michele

IPv6 support for divert sockets.

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


# 1.39 17-Jul-2009 tedu

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


# 1.38 16-Jul-2009 tedu

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


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.37 07-Feb-2009 chl

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

ok claudio@ ray@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.36 19-Dec-2007 deraadt

delete rcsid crud


# 1.35 14-Dec-2007 deraadt

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


# 1.34 11-Sep-2007 henning

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


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.33 17-Nov-2006 itojun

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

ok from: deraadt mcbride


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.32 25-Mar-2005 jaredy

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


Revision tags: OPENBSD_3_7_BASE
# 1.31 17-Nov-2004 itojun

remove NI_WITHSCOPEID (which is not standard)


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.30 06-Nov-2003 itojun

fix linklocal multicast address handling. Matthias Drochner


Revision tags: OPENBSD_3_4_BASE
# 1.29 03-Jun-2003 millert

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


# 1.28 14-May-2003 itojun

use __KAME__ to determine kame-based kernel.


Revision tags: OPENBSD_3_3_BASE
# 1.27 16-Mar-2003 sturm

correctly initialize a pointer

OK millert@


# 1.26 13-Mar-2003 deraadt

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


# 1.25 01-Feb-2003 deraadt

ansi


# 1.24 26-Oct-2002 itojun

typo. NetBSD PR 18816


Revision tags: OPENBSD_3_2_BASE
# 1.23 09-Jun-2002 jsyn

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

ok aaron@


# 1.22 09-Jun-2002 deraadt

use strchr() instead of index()


# 1.21 07-Jun-2002 itojun

print rip6stat


# 1.20 27-May-2002 deraadt

a night of cleanup, so i can read this easier


Revision tags: OPENBSD_3_1_BASE
# 1.19 19-Feb-2002 mpech

Fix gethostname() usage.

deraadt@ ok


# 1.18 16-Feb-2002 millert

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.


# 1.17 17-Jan-2002 mickey

evil, annoying spaces and tabs


# 1.16 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.15 13-Jun-2001 itojun

typo in icmp6 stat printing


Revision tags: OPENBSD_2_9_BASE
# 1.14 07-Feb-2001 itojun

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.


# 1.13 11-Dec-2000 itojun

typo in -s message


# 1.12 11-Dec-2000 itojun

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


Revision tags: OPENBSD_2_8_BASE
# 1.11 26-Aug-2000 itojun

typo. sync with kame


# 1.10 13-Aug-2000 itojun

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


# 1.9 12-Jul-2000 itojun

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


# 1.8 06-Jul-2000 itojun

more stats


# 1.7 16-Jun-2000 itojun

print # of icmp6 error suppressed by rate limit


# 1.6 17-May-2000 itojun

s/icmp/icmp6/ in message


Revision tags: OPENBSD_2_7_BASE
# 1.5 28-Feb-2000 itojun

update IPv6 portion to match latest sys/netinet6.


# 1.4 18-Jan-2000 itojun

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


# 1.3 05-Jan-2000 itojun

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


# 1.2 30-Dec-1999 deraadt

fix netstat -ss; some zeroed counters were displayed


# 1.1 08-Dec-1999 itojun

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


# 1.53 20-Apr-2019 bluhm

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 tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.52 21-Jan-2017 guenther

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@


# 1.51 22-Dec-2016 rzalamena

Remove PIM support from the multicast stack.

ok mpi@


Revision tags: OPENBSD_6_0_BASE
# 1.50 28-Mar-2016 jca

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


Revision tags: OPENBSD_5_9_BASE
# 1.49 11-Sep-2015 mpi

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

ok claudio@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.48 12-Feb-2015 claudio

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.


# 1.47 16-Jan-2015 deraadt

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)


# 1.46 14-Aug-2014 mpi

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


Revision tags: OPENBSD_5_6_BASE
# 1.45 23-Jun-2014 guenther

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 tags: OPENBSD_5_5_BASE
# 1.44 18-Aug-2013 guenther

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 tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.43 04-Dec-2012 deraadt

remove some unnecessary sys/mbuf.h inclusions


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.42 21-Dec-2010 claudio

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


# 1.41 21-Oct-2010 bluhm

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 tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.40 05-Nov-2009 michele

IPv6 support for divert sockets.

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


# 1.39 17-Jul-2009 tedu

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


# 1.38 16-Jul-2009 tedu

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


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.37 07-Feb-2009 chl

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

ok claudio@ ray@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.36 19-Dec-2007 deraadt

delete rcsid crud


# 1.35 14-Dec-2007 deraadt

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


# 1.34 11-Sep-2007 henning

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


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.33 17-Nov-2006 itojun

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

ok from: deraadt mcbride


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.32 25-Mar-2005 jaredy

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


Revision tags: OPENBSD_3_7_BASE
# 1.31 17-Nov-2004 itojun

remove NI_WITHSCOPEID (which is not standard)


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.30 06-Nov-2003 itojun

fix linklocal multicast address handling. Matthias Drochner


Revision tags: OPENBSD_3_4_BASE
# 1.29 03-Jun-2003 millert

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


# 1.28 14-May-2003 itojun

use __KAME__ to determine kame-based kernel.


Revision tags: OPENBSD_3_3_BASE
# 1.27 16-Mar-2003 sturm

correctly initialize a pointer

OK millert@


# 1.26 13-Mar-2003 deraadt

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


# 1.25 01-Feb-2003 deraadt

ansi


# 1.24 26-Oct-2002 itojun

typo. NetBSD PR 18816


Revision tags: OPENBSD_3_2_BASE
# 1.23 09-Jun-2002 jsyn

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

ok aaron@


# 1.22 09-Jun-2002 deraadt

use strchr() instead of index()


# 1.21 07-Jun-2002 itojun

print rip6stat


# 1.20 27-May-2002 deraadt

a night of cleanup, so i can read this easier


Revision tags: OPENBSD_3_1_BASE
# 1.19 19-Feb-2002 mpech

Fix gethostname() usage.

deraadt@ ok


# 1.18 16-Feb-2002 millert

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.


# 1.17 17-Jan-2002 mickey

evil, annoying spaces and tabs


# 1.16 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.15 13-Jun-2001 itojun

typo in icmp6 stat printing


Revision tags: OPENBSD_2_9_BASE
# 1.14 07-Feb-2001 itojun

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.


# 1.13 11-Dec-2000 itojun

typo in -s message


# 1.12 11-Dec-2000 itojun

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


Revision tags: OPENBSD_2_8_BASE
# 1.11 26-Aug-2000 itojun

typo. sync with kame


# 1.10 13-Aug-2000 itojun

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


# 1.9 12-Jul-2000 itojun

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


# 1.8 06-Jul-2000 itojun

more stats


# 1.7 16-Jun-2000 itojun

print # of icmp6 error suppressed by rate limit


# 1.6 17-May-2000 itojun

s/icmp/icmp6/ in message


Revision tags: OPENBSD_2_7_BASE
# 1.5 28-Feb-2000 itojun

update IPv6 portion to match latest sys/netinet6.


# 1.4 18-Jan-2000 itojun

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


# 1.3 05-Jan-2000 itojun

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


# 1.2 30-Dec-1999 deraadt

fix netstat -ss; some zeroed counters were displayed


# 1.1 08-Dec-1999 itojun

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


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.52 21-Jan-2017 guenther

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@


# 1.51 22-Dec-2016 rzalamena

Remove PIM support from the multicast stack.

ok mpi@


Revision tags: OPENBSD_6_0_BASE
# 1.50 28-Mar-2016 jca

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


Revision tags: OPENBSD_5_9_BASE
# 1.49 11-Sep-2015 mpi

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

ok claudio@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.48 12-Feb-2015 claudio

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.


# 1.47 16-Jan-2015 deraadt

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)


# 1.46 14-Aug-2014 mpi

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


Revision tags: OPENBSD_5_6_BASE
# 1.45 23-Jun-2014 guenther

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 tags: OPENBSD_5_5_BASE
# 1.44 18-Aug-2013 guenther

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 tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.43 04-Dec-2012 deraadt

remove some unnecessary sys/mbuf.h inclusions


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.42 21-Dec-2010 claudio

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


# 1.41 21-Oct-2010 bluhm

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 tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.40 05-Nov-2009 michele

IPv6 support for divert sockets.

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


# 1.39 17-Jul-2009 tedu

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


# 1.38 16-Jul-2009 tedu

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


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.37 07-Feb-2009 chl

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

ok claudio@ ray@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.36 19-Dec-2007 deraadt

delete rcsid crud


# 1.35 14-Dec-2007 deraadt

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


# 1.34 11-Sep-2007 henning

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


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.33 17-Nov-2006 itojun

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

ok from: deraadt mcbride


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.32 25-Mar-2005 jaredy

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


Revision tags: OPENBSD_3_7_BASE
# 1.31 17-Nov-2004 itojun

remove NI_WITHSCOPEID (which is not standard)


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.30 06-Nov-2003 itojun

fix linklocal multicast address handling. Matthias Drochner


Revision tags: OPENBSD_3_4_BASE
# 1.29 03-Jun-2003 millert

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


# 1.28 14-May-2003 itojun

use __KAME__ to determine kame-based kernel.


Revision tags: OPENBSD_3_3_BASE
# 1.27 16-Mar-2003 sturm

correctly initialize a pointer

OK millert@


# 1.26 13-Mar-2003 deraadt

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


# 1.25 01-Feb-2003 deraadt

ansi


# 1.24 26-Oct-2002 itojun

typo. NetBSD PR 18816


Revision tags: OPENBSD_3_2_BASE
# 1.23 09-Jun-2002 jsyn

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

ok aaron@


# 1.22 09-Jun-2002 deraadt

use strchr() instead of index()


# 1.21 07-Jun-2002 itojun

print rip6stat


# 1.20 27-May-2002 deraadt

a night of cleanup, so i can read this easier


Revision tags: OPENBSD_3_1_BASE
# 1.19 19-Feb-2002 mpech

Fix gethostname() usage.

deraadt@ ok


# 1.18 16-Feb-2002 millert

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.


# 1.17 17-Jan-2002 mickey

evil, annoying spaces and tabs


# 1.16 19-Nov-2001 mpech

kill more registers

millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.15 13-Jun-2001 itojun

typo in icmp6 stat printing


Revision tags: OPENBSD_2_9_BASE
# 1.14 07-Feb-2001 itojun

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.


# 1.13 11-Dec-2000 itojun

typo in -s message


# 1.12 11-Dec-2000 itojun

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


Revision tags: OPENBSD_2_8_BASE
# 1.11 26-Aug-2000 itojun

typo. sync with kame


# 1.10 13-Aug-2000 itojun

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


# 1.9 12-Jul-2000 itojun

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


# 1.8 06-Jul-2000 itojun

more stats


# 1.7 16-Jun-2000 itojun

print # of icmp6 error suppressed by rate limit


# 1.6 17-May-2000 itojun

s/icmp/icmp6/ in message


Revision tags: OPENBSD_2_7_BASE
# 1.5 28-Feb-2000 itojun

update IPv6 portion to match latest sys/netinet6.


# 1.4 18-Jan-2000 itojun

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


# 1.3 05-Jan-2000 itojun

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


# 1.2 30-Dec-1999 deraadt

fix netstat -ss; some zeroed counters were displayed


# 1.1 08-Dec-1999 itojun

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