summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/unix.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-111-4/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* netstat(1) support for UNIX SOCK_SEQPACKET sockets -- changes were requiredrwatson2009-10-051-5/+21
| | | | | | | only for the kvm case, as we supported SOCK_SEQPACKET via sysctl already. Sponsored by: Google MFC after: 3 months
* o With -L flag show unix sockets listen queues stats. It is usefulmaxim2008-12-311-6/+17
| | | | | | | | to know number of not accepted connections for monitoring purposes. PR: bin/128871 Submitted by: Anton Yuzhaninov MFC after: 1 month
* style(9)obrien2008-01-021-3/+3
| | | | | | | + 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-19/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+6
| | | | | Use warnx() instead of warn() when error message is not of any interest. Add prototypes.
* 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.
* remove K&R supportassar2001-06-151-5/+3
|
* revert removal of warning and K&R supportassar2001-06-151-2/+4
| | | | Requested by: bde
* remove most of the warningsassar2001-06-151-4/+2
|
* Use macro API to <sys/queue.h>phk2000-12-301-1/+1
| | | | | Submitted by: "Jason" <jsmethers@pdq.net> Reviewed by: phk
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix off-by-one error.fenner1999-02-161-2/+2
|
* Make netstat work again.phk1998-08-081-1/+2
|
* Fixed printf format errors.bde1998-07-061-2/+2
|
* Fix rev. 1.7: get offsetof from the correct header file.wollman1998-05-161-2/+2
|
* Fix broken sun_len usage: it is not sun_path length but biggerache1998-05-161-2/+5
|
* mbuf, inet, and unix modules no longer read kvm.wollman1998-05-151-50/+72
|
* While I'm in here, fix address printing for `netstat -f unix' which has beenwollman1997-08-251-12/+8
| | | | broken for a couple of weeks now...
* Remove prog, unused variables.charnier1997-07-291-0/+4
| | | | Cosmetic in usage string.
* Code cleanup: remove unused variables, use correct *printf formatalex1996-06-021-5/+5
| | | | | | specifiers (some unsigned values were printed as signed, some longs were printed as ints), and place parentheses around assignments in if statements.
* Move #include of queue.h before #include of socketvar.h in preparation fordg1996-03-111-0/+1
| | | | struct socket changes.
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+134
OpenPOWER on IntegriCloud