summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/atalk.c
Commit message (Collapse)AuthorAgeFilesLines
* style(9)obrien2008-01-021-2/+2
| | | | | | | + kread is not a boolean, so check it as such + fix $FreeBSD$ Ids + denote copyrights with /*- + misc whitespace changes.
* Restore netstat -M functionality for most statistics on core dumps. Injhb2007-07-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Achieve WARNS=2 by using uintmax_t to pass around 64-bit quantities,yar2006-07-281-0/+1
| | | | | | | 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
* Add __FBSDID. Replace local variable sin by sockin to not conflict with sin(3).charnier2004-07-261-4/+5
| | | | | Use warnx() instead of warn() when error message is not of any interest. Add prototypes.
* Warns cleanups for netstat:dwmalone2002-09-051-5/+6
| | | | | | | | | | | 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).
* Widen struct sockbuf's sb_timeo member to int from short. Withjdp2002-07-241-1/+1
| | | | | | | | | | | | | 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.
* Don't misuse the return from snprintf.brian2001-08-201-5/+7
| | | | MFC after: 2 weeks
* remove warningsassar2001-06-151-3/+3
| | | | | remove superfluous declarations make things more consistent
* remove K&R supportassar2001-06-151-8/+3
|
* revert removal of warning and K&R supportassar2001-06-151-4/+9
| | | | Requested by: bde
* nflag -> numeric_port. nflag is no moreassar2001-06-151-1/+1
|
* Print symbolic names for appletalk ports. Also some very minor style 9 issues.imp2001-06-151-2/+15
| | | | | PR: bin/4157 Submitted by: Denny Gentry <denny1@home.com>
* remove most of the warningsassar2001-06-151-9/+4
|
* Fixed printing of netatalk statistics WRT the -s flag.ru2001-06-121-2/+2
| | | | | | PR: bin/6994 Submitted by: Zahemszky Gabor <zgabor@zg.CoDe.hu> MFC after: 1 week
* Cleanup towards -Walljulian1999-10-211-13/+6
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fixed printf format errors.bde1998-07-061-7/+5
|
* Remove prog, unused variables.charnier1997-07-291-3/+1
| | | | Cosmetic in usage string.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix up programs which expect <net/if.h> to include <sys/time.h> to insteadwollman1996-12-101-4/+1
| | | | | | do it themselves. (Some of these programs actually depended on this beyond compiling the definition of struct ifinfo!) Also fix up some other #include messes while we're at it.
* Eliminate unnecessary include of <sys/mbuf.h>. PCBs aren't stored in mbufswollman1996-10-281-1/+4
| | | | any more.
* fix printing of netranges in the i and r displays for netatalkjulian1996-08-311-4/+39
|
* Submitted by: archie@whistle.comjulian1996-07-231-38/+41
| | | | appletalk cleanups
* appletalk cleanupsjulian1996-07-091-10/+10
| | | | | | | | | | | e.g. Active ATALK connections Proto Recv-Q Send-Q Local Address Foreign Address (state) ddp 0 0 [69.230]130 [*.*]* ddp 0 0 [69.230]128 [*.*]* ddp 0 0 [69.230]1 [*.*]* etc..
* better appletalk support.julian1996-06-101-2/+95
|
* patches to allow netstat to monitor appletalk sockets openned using thejulian1996-06-081-0/+154
/sys/netatalk protocol stack more cleanups and fixes are likely
OpenPOWER on IntegriCloud