Commit Graph

43 Commits

Author SHA1 Message Date
ru
16a1b958bd Let bsd.prog.mk set SRCS and MAN to their default values. 2005-01-28 16:08:11 +00:00
ru
6d8d9001d6 Scheduled mdoc(7) sweep. 2005-01-11 10:32:52 +00:00
ru
a9bfcbb15f Unbreak sockstat(1) on systems without the divert protocol. 2004-12-06 09:28:05 +00:00
ru
4fb260fff1 Show divert(4) sockets as well. 2004-12-05 14:17:14 +00:00
roam
2e1bbe12b4 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
f71dcfc9b7 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
c67eeddecc 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
e8c12cb393 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
f745d7818c 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
cc74fcf3ae 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
ru
07cd1d9dbe mdoc(7) police: markup polishing.
Approved by:	re
2002-11-26 17:33:37 +00:00
robert
3969378623 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
93ca02b751 Don't depend on namespace pollution from <netinet/in_pcb.h>.
Submitted by:	bde
2002-08-01 16:49:31 +00:00
des
eacbaff0d8 Implement the -l and -c options, which I'd forgotten. 2002-08-01 11:02:30 +00:00
des
0bddd3104d Rewrite sockstat(1) in C.
Sponsored by:	DARPA, NAI Labs
2002-07-31 12:32:03 +00:00
des
c91c856b3e Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
des
22e58807a0 Drop maintainership of this, it serves no purpose. 2002-04-15 19:36:50 +00:00
ru
839959ae32 Spell "FreeBSD" with "F" and "BSD" in uppercase. 2001-08-13 16:33:00 +00:00
ru
3f0d9f6257 mdoc(7) police: fix markup. 2001-08-10 10:43:45 +00:00
des
ad6dbdfb06 Allow the user to specify port ranges against which to match inet sockets.
Suggested by:	roam
2001-08-07 19:59:52 +00:00
mjacob
aa34fd0505 Fix 64 bit issues so that sockstat && fstat work correctly on alpha.
PR:		29231
Submitted by:	pherman@frenchfries.net
MFC after:	2 weeks
2001-07-25 20:31:20 +00:00
ru
ecbb298b07 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
ru
2ac87222ba beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
ru
8ec47de9c3 MAN[1-9] -> MAN. 2001-03-27 10:52:19 +00:00
des
1d5bdc4c0d Use the newly introduced -W flag to netstat(1) to avoid truncated addresses. 2001-03-15 20:46:35 +00:00
des
44b9d422b2 Add (and document) options for showing only listening or connected sockets. 2001-03-06 13:48:38 +00:00
ru
b1e891e706 Prepare for mdoc(7)NG. 2001-01-16 09:39:23 +00:00
ru
cfafe5cee1 mdoc(7) police: added missing .Os call. 2000-12-14 13:58:15 +00:00
ru
046cd06ea5 Spell the des's name correctly. 2000-11-14 13:19:26 +00:00
des
ce30f3bd5b Skip sockets with no SCB 2000-10-13 16:25:37 +00:00
des
7baf027a23 Document the fact that sockstat now lists Unix domain sockets, and the new
command-line options for selecting what to display.
2000-10-07 14:11:43 +00:00
des
4757fed205 Total rewrite. This was actually the first non-trivial Perl script I ever
wrote, and as such was not very pretty.

Changes that may cause problems for people who use sockstat in scripts:

 - sockstat(8) now displays Unix domain sockets in addition to IPv4 and IPv6
 - the last period in local and foreign addresses is changed to a colon to
   make the port number easier to spot
 - IPv4 and IPv6 sockets are listed separately (IPv4 first, then IPv6, then
   Unix)
2000-10-07 14:10:37 +00:00
ru
283c2a6714 Restore support for displaying raw IPv4 sockets and
correct the author's name.  Were broken in rev 1.6.

Approved by:	des
2000-08-30 13:24:01 +00:00
des
93cec7047c Invoke netstat(1) and fstat(1) with full path. 2000-08-30 09:18:20 +00:00
charnier
e1069c675a Do not dot terminate list of references 2000-03-26 14:56:52 +00:00
shin
5f17cc44e7 Prevent sockstat print out some empty entries related to IPv6.
Sockstat use netstat tcp/udp socket print, and fstat tcp/udp
  socket print, but it just specify all of IPPROTO_IP and
  IPPROTO_IPV6 sockets for fstat.
  Now IPv6 socket also use raw socket, but only netstat don't print it,
  so now they are printed as empty entries in sockstat output.

Approved by: jkh
2000-03-11 11:25:00 +00:00
sheldonh
d39e57413d Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 12:20:22 +00:00
shin
e469e98e24 Update sockstat to support INET6 socket printing.
Approved by: jkh

Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
Reviewed by: des
2000-02-26 02:56:16 +00:00
sheldonh
59e5111760 Add xrefs to the {f,net,sock}stat.1 manpages. While I'm in there, fix
the sockstat.1 document title, which still remembers when sockstat was
called lsock.

Reviewed by:	mpp
1999-09-06 13:14:24 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
des
601bdbc76d Use -finet option to netstat(1), and don't discard anything.
Don't truncate the protocol field.
These two changes conspire to make sockstat(1) show divert sockets.

Submitted by:	ru
1999-07-06 19:12:31 +00:00
des
abb30c230a Don't use STDOUT_TOP.
Submitted by:	Christopher Masto <chris@netmonger.net>
1999-05-01 11:31:19 +00:00
des
010438dfb3 Rename lsock(1) to sockstat(1).
Suggested by:	Sheldon Hearn <sheldonh@iafrica.com>
Approved by:	Peter Wemm <peter@netplex.com.au>
1999-04-15 13:40:43 +00:00