Commit Graph

13 Commits

Author SHA1 Message Date
des
d8145c4b62 Don't free(sock) before it's even allocated.
Submitted by:	Joerg Sonnenberger <joerg@britannica.bec.de>
MFC after:	1 week
2005-06-10 06:36:03 +00:00
ru
96a90ac8d7 Unbreak sockstat(1) on systems without the divert protocol. 2004-12-06 09:28:05 +00:00
ru
0d2cefc65d Show divert(4) sockets as well. 2004-12-05 14:17:14 +00:00
roam
47b3e1d304 Do not display bogus entries for sockets in the TIME_WAIT or similar
states that no longer have a corresponding file descriptor - until now,
sockstat would mostly randomly match null kern.file.*.xf_data fields
with the first mostly-closed socket.

This bugfix is a RELENG_5 candidate.

Approved by:	andre
2004-08-25 16:36:17 +00:00
jmg
3210986215 make sockstat not print wierd addresses on not connected unix domain sockets
Pointed out by:	rwatson
Reviewed by:	peter
2003-07-19 06:23:56 +00:00
mux
df4d18c70c Finish the implementation of the -p switch so that it
actually works.  I have no idea why this wasn't finished
and happened to try to use it.
2003-06-07 14:36:49 +00:00
robert
83107b499f To reserve space for 65536 bits, allocate
65536 / (sizeof(int) * CHAR_BITS) `int's instead of
65536 / (sizeof(int) * CHAR_BITS) bytes to avoid a possible
segmentation fault if ports above 16383 are specified via the
-p option on a platform with 4 byte wide ints.

Approved by:	re (bmah)
Reported by:	Marco Wertejuk <wertejuk@mwcis.com>
2003-05-09 09:11:27 +00:00
dillon
ccd5574cc6 Bow to the whining masses and change a union back into void *. Retain
removal of unnecessary casts and throw in some minor cleanups to see if
anyone complains, just for the hell of it.
2003-01-13 00:33:17 +00:00
dillon
ddf9ef103e Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it.

Change struct xfile xf_data to xun_data (ABI is still compatible).

If we need to add a #define for f_data and xf_data we can, but I don't
think it will be necessary.  There are no operational changes in this
commit.
2003-01-12 01:37:13 +00:00
robert
1495d7e56f Use a cast to `void *' before casting to a pointer to a structure
to stop GCC emitting warnings about increased alignment requirements
which broke the build for sparc64.

Approved by:	des
2002-08-02 11:57:59 +00:00
des
1d14d5adc9 Don't depend on namespace pollution from <netinet/in_pcb.h>.
Submitted by:	bde
2002-08-01 16:49:31 +00:00
des
7884f69d0c Implement the -l and -c options, which I'd forgotten. 2002-08-01 11:02:30 +00:00
des
06dac20202 Rewrite sockstat(1) in C.
Sponsored by:	DARPA, NAI Labs
2002-07-31 12:32:03 +00:00