<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/netstat/netgraph.c, branch release/7.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2008-02-24T05:45:17+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2008-02-24T05:45:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a9c219fa3cec18ef9f30edec6fa106bf0e2d423d'/>
<id>a9c219fa3cec18ef9f30edec6fa106bf0e2d423d</id>
<content type='text'>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title>Restore netstat -M functionality for most statistics on core dumps.  In</title>
<updated>2007-07-16T17:15:55+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2007-07-16T17:15:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=feda1a4372d5e340da97042375dfb783dea52eda'/>
<id>feda1a4372d5e340da97042375dfb783dea52eda</id>
<content type='text'>
general, when support was added to netstat for fetching data using sysctl,
no provision was left for fetching equivalent data from a core dump, and
in fact, netstat would _always_ fetch data from the live kernel using
sysctl even when -M was specified resulting in the user believing they
were getting data from coredumps when they actually weren't.  Some specific
changes:
- Add a global 'live' variable that is true if netstat is running against
  the live kernel and false if -M has been specified.
- Stop abusing the sysctl flag in the protocol tables to hold the protocol
  number.  Instead, the protocol is now its own field in the tables, and
  it is passed as a separate parameter to the PCB and stat routines rather
  than overloading the KVM offset parameter.
- Don't run PCB or stats functions who don't have a namelist offset if we
  are being run against a crash dump (!live).
- For the inet and unix PCB routines, we generate the same buffer from KVM
  that the sysctl usually generates complete with the header and trailer.
- Don't run bpf stats for !live (before it would just silently always run
  live).
- kread() no longer trashes memory when opening the buffer if there is an
  error on open and the passed in buffer is smaller than _POSIX2_LINE_MAX.
- The multicast routing code doesn't fallback to kvm on live kernels if
  the sysctl fails.  Keeping this made the code rather hairy, and netstat
  is already tied to the kernel ABI anyway (even when using sysctl's since
  things like xinpcb contain an inpcb) so any kernels this is run against
  that have the multicast routing stuff should have the sysctls.
- Don't try to dig around in the kernel linker in the netgraph PCB routine
  for core dumps.

Other notes:
- sctp's PCB routine only works on live kernels, it looked rather
  complicated to generate all the same stuff via KVM.  Someone can always
  add it later if desired though.
- Fix the ipsec removal bug where N_xxx for IPSEC stats weren't renumbered.
- Use sysctlbyname() everywhere rather than hardcoded mib values.

MFC after:	1 week
Approved by:	re (rwatson)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
general, when support was added to netstat for fetching data using sysctl,
no provision was left for fetching equivalent data from a core dump, and
in fact, netstat would _always_ fetch data from the live kernel using
sysctl even when -M was specified resulting in the user believing they
were getting data from coredumps when they actually weren't.  Some specific
changes:
- Add a global 'live' variable that is true if netstat is running against
  the live kernel and false if -M has been specified.
- Stop abusing the sysctl flag in the protocol tables to hold the protocol
  number.  Instead, the protocol is now its own field in the tables, and
  it is passed as a separate parameter to the PCB and stat routines rather
  than overloading the KVM offset parameter.
- Don't run PCB or stats functions who don't have a namelist offset if we
  are being run against a crash dump (!live).
- For the inet and unix PCB routines, we generate the same buffer from KVM
  that the sysctl usually generates complete with the header and trailer.
- Don't run bpf stats for !live (before it would just silently always run
  live).
- kread() no longer trashes memory when opening the buffer if there is an
  error on open and the passed in buffer is smaller than _POSIX2_LINE_MAX.
- The multicast routing code doesn't fallback to kvm on live kernels if
  the sysctl fails.  Keeping this made the code rather hairy, and netstat
  is already tied to the kernel ABI anyway (even when using sysctl's since
  things like xinpcb contain an inpcb) so any kernels this is run against
  that have the multicast routing stuff should have the sysctls.
- Don't try to dig around in the kernel linker in the netgraph PCB routine
  for core dumps.

Other notes:
- sctp's PCB routine only works on live kernels, it looked rather
  complicated to generate all the same stuff via KVM.  Someone can always
  add it later if desired though.
- Fix the ipsec removal bug where N_xxx for IPSEC stats weren't renumbered.
- Use sysctlbyname() everywhere rather than hardcoded mib values.

MFC after:	1 week
Approved by:	re (rwatson)
</pre>
</div>
</content>
</entry>
<entry>
<title>- Achieve WARNS=3 by using sparse initializers or avoiding initializers at all.</title>
<updated>2006-07-28T16:16:40+00:00</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2006-07-28T16:16:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=096146f88b65f745ca84e5537de72e430e8ad330'/>
<id>096146f88b65f745ca84e5537de72e430e8ad330</id>
<content type='text'>
- Fix a nlist initialization: it should be terminated by a NULL entry.
- Constify.
- Catch an unused parameter.

Tested on:	i386 amd64 ia64
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Fix a nlist initialization: it should be terminated by a NULL entry.
- Constify.
- Catch an unused parameter.

Tested on:	i386 amd64 ia64
</pre>
</div>
</content>
</entry>
<entry>
<title>Achieve WARNS=2 by using uintmax_t to pass around 64-bit quantities,</title>
<updated>2006-07-28T16:09:19+00:00</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2006-07-28T16:09:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7b95a1ebbd9aafe9f196a75d95c7b06eaee999a1'/>
<id>7b95a1ebbd9aafe9f196a75d95c7b06eaee999a1</id>
<content type='text'>
including to printf().  Using uintmax_t is also robust to further
extensions in both the C language and the bitwidth of kernel counters.

Tested on:	i386 amd64 ia64
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
including to printf().  Using uintmax_t is also robust to further
extensions in both the C language and the bitwidth of kernel counters.

Tested on:	i386 amd64 ia64
</pre>
</div>
</content>
</entry>
<entry>
<title>Add __FBSDID. Replace local variable sin by sockin to not conflict with sin(3).</title>
<updated>2004-07-26T20:18:11+00:00</updated>
<author>
<name>Philippe Charnier</name>
<email>charnier@FreeBSD.org</email>
</author>
<published>2004-07-26T20:18:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6cc6f12231c7267d34a409cfbd960c7f3d69f8eb'/>
<id>6cc6f12231c7267d34a409cfbd960c7f3d69f8eb</id>
<content type='text'>
Use warnx() instead of warn() when error message is not of any interest. Add
prototypes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use warnx() instead of warn() when error message is not of any interest. Add
prototypes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Warns cleanups for netstat:</title>
<updated>2002-09-05T17:06:51+00:00</updated>
<author>
<name>David Malone</name>
<email>dwmalone@FreeBSD.org</email>
</author>
<published>2002-09-05T17:06:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a01e3379df7c510218ec793cf6f288ac4aac6487'/>
<id>a01e3379df7c510218ec793cf6f288ac4aac6487</id>
<content type='text'>
1) Include arpa/inet.h for ntohs.
2) Constness fixes.
3) Fix shadowing except for "sin" which shouldn't be in scope.
4) Remove register keyword.
5) Add missing initialsers to user defined structs.
5) Make prototype of netname6 globally visable.
6) Use right macros for printing syncache stats (even though entrie isn't
   a word).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1) Include arpa/inet.h for ntohs.
2) Constness fixes.
3) Fix shadowing except for "sin" which shouldn't be in scope.
4) Remove register keyword.
5) Add missing initialsers to user defined structs.
5) Make prototype of netname6 globally visable.
6) Use right macros for printing syncache stats (even though entrie isn't
   a word).
</pre>
</div>
</content>
</entry>
<entry>
<title>Widen struct sockbuf's sb_timeo member to int from short.  With</title>
<updated>2002-07-24T03:02:43+00:00</updated>
<author>
<name>John Polstra</name>
<email>jdp@FreeBSD.org</email>
</author>
<published>2002-07-24T03:02:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f824b5187e4c4785cb32f6feb1a0c1459d6905c5'/>
<id>f824b5187e4c4785cb32f6feb1a0c1459d6905c5</id>
<content type='text'>
non-default but reasonable values of hz this member overflowed,
breaking NFS over UDP.

Also, as long as I'm plowing up struct sockbuf ... Change certain
members from u_long/long to u_int/int in order to reduce wasted
space on 64-bit machines.  This change was requested by Andrew
Gallatin.

Netstat and systat need to be rebuilt.  I am incrementing
__FreeBSD_version in case any ports need to change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
non-default but reasonable values of hz this member overflowed,
breaking NFS over UDP.

Also, as long as I'm plowing up struct sockbuf ... Change certain
members from u_long/long to u_int/int in order to reduce wasted
space on 64-bit machines.  This change was requested by Andrew
Gallatin.

Netstat and systat need to be rebuilt.  I am incrementing
__FreeBSD_version in case any ports need to change.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove warnings</title>
<updated>2001-06-15T23:55:45+00:00</updated>
<author>
<name>Assar Westerlund</name>
<email>assar@FreeBSD.org</email>
</author>
<published>2001-06-15T23:55:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f964d60dd3287932055bfdaadf3cba4a7ff2d648'/>
<id>f964d60dd3287932055bfdaadf3cba4a7ff2d648</id>
<content type='text'>
remove superfluous declarations
make things more consistent
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
remove superfluous declarations
make things more consistent
</pre>
</div>
</content>
</entry>
<entry>
<title>revert removal of warning and K&amp;R support</title>
<updated>2001-06-15T23:07:59+00:00</updated>
<author>
<name>Assar Westerlund</name>
<email>assar@FreeBSD.org</email>
</author>
<published>2001-06-15T23:07:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e9370a2e59648a97d70bd008b7d8ad1124cc5f56'/>
<id>e9370a2e59648a97d70bd008b7d8ad1124cc5f56</id>
<content type='text'>
Requested by: bde
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Requested by: bde
</pre>
</div>
</content>
</entry>
<entry>
<title>remove most of the warnings</title>
<updated>2001-06-15T01:53:05+00:00</updated>
<author>
<name>Assar Westerlund</name>
<email>assar@FreeBSD.org</email>
</author>
<published>2001-06-15T01:53:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=af7a0a2d2b9546d0fc4f33f1ea8fb7b126392832'/>
<id>af7a0a2d2b9546d0fc4f33f1ea8fb7b126392832</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
