Commit Graph

8230 Commits

Author SHA1 Message Date
elad
bbf85a429b Use PRIxPTR when printing a pointer. 2005-08-12 14:08:16 +00:00
rpaulo
cccbf666c8 Query the v6 sockets only if USE_INET6 != "no". Patch provided by Jukka Salmi
on PR#30963.

ok atatat@
2005-08-10 20:32:57 +00:00
rpaulo
0459285527 Fix a typo in the islistening() routine. Patch provided by Jukka Salmi
on PR#30963.
2005-08-10 20:21:14 +00:00
mrg
3a96c9add9 add a "file" to the arguments that isn't enclosed in square brackets
making it clear that at least one file/directory argument is required
in both the manual and usage.  "find" with no args currently barfs but
these documents implied it would do something useful.
2005-08-10 06:51:24 +00:00
christos
81c9862ba6 - Minor logical restructure. Make sure we can create the client before
even bothering to call makemsg(); (Liam Foy)
- Use MAXPATHLEN consistently (Liam Foy)
- WARNS=3, KNF and misc cleanups
2005-08-09 23:41:38 +00:00
christos
573f57f885 Say which daemon produces the data and correct the default of 3 minutes
(Liam Foy)
2005-08-09 23:28:59 +00:00
christos
abefed98a7 Add typedefs for DuplicateProc and FreeProc from Max Okumoto. 2005-08-09 21:36:42 +00:00
christos
81b135acdf From Max Okumoto:
- Remove casts to NULL.
- Remove space between cast and object.
2005-08-08 16:42:54 +00:00
he
4577ef8d16 Replace usage of caddr_t with intptr_t, to allow this to build cleanly
on both 32- and 64-bit archs.
2005-08-08 12:11:52 +00:00
blymn
64e76e4ea0 Don't error when tape drives are not configured on a system. 2005-08-08 11:31:48 +00:00
christos
a35a74cd06 Fix pasto: don't call the wrong function from the wrapper. Reported by perry. 2005-08-08 01:28:08 +00:00
elad
dbc883fab2 Use sysctl to read live kernel PF_INET PCBs. 2005-08-07 17:10:36 +00:00
christos
9eb4baf479 From Liam Foy:
- Print uptime in secs if uptime is less than 1 minute
- If at least one call to onehost() fails, return one (allows for external error detection)
- Avoid leaks, use clnt_destroy (from OpenBSD)
- err(3) cleans
From me:
- lint cleanups
- more KNF
2005-08-07 16:01:45 +00:00
cube
3b40577510 - Make sure devitab is correctly handled, in case we're removing the entry
it contains,
- Properly update the d_ihead list:  if we have remaining aliases, use them
  to fill in the gap

Thanks to Bernd Ernesti for the test cases.
2005-08-07 15:11:12 +00:00
blymn
132bb1fe89 Add tape statistics. 2005-08-07 12:32:38 +00:00
blymn
71c77b437a Add support for tape statistics. 2005-08-07 12:23:20 +00:00
blymn
681d2bb37b Add support for gathering tape statistics. 2005-08-07 12:21:46 +00:00
elad
c1494c99c6 Use sysctl to fetch IP, ICMP, TCP, and UDP statistics. 2005-08-06 17:58:13 +00:00
rpaulo
ec70a5dc17 Explained how -B works and how it works in conjunction with -I or -s.
Reviewed by wiz@
2005-08-06 11:23:32 +00:00
elad
8920c39bb8 Fix printing formats. 2005-08-05 12:16:51 +00:00
christos
6240774069 More KNF cleanups from Max Okumoto 2005-08-05 00:53:18 +00:00
rpaulo
9ce7ce6bf0 Added #include <kvm.h> since netstat.h, which is included too, needs it. 2005-08-04 19:41:28 +00:00
rpaulo
22a0fcf290 Added bpf.c. 2005-08-04 19:40:00 +00:00
rpaulo
66daeed445 Implemented the userland part of the BPF statistics and BPF peers,
net.bpf.stats and net.bpf.peers sysctls respectively. netstat(1) now
has an additional syntax:
	netstat [-s] [-B] [-I Interface]

Only the super user can see a list of BPF peers with the following command:
# netstat -B
Active BPF peers
PID     Int     Recv     Drop     Capt     Flags  Bufsize  Comm
4941    lo0     0        0        0        I--S-  262144   tcpdump
252     ex0     19668    0        5        I-RS-  32768    dhclient

And every user can see the BPF statistics with:
$ netstat -s -B
bpf:
        19669 total packets received
        5 total packets captured
        0 total packets dropped

This idea came from FreeBSD (Christian S.J. Peron) but, currently, they
doen't have a userland utility in the base system to read the sysctls.

Reviewed by: christos@
2005-08-04 19:39:40 +00:00
christos
9f80093159 remove unnecessary casts to void * functions (Max Okumoto) 2005-08-04 00:20:12 +00:00
christos
62a6753895 from Max Okumoto: debug should be int, not boolean. 2005-08-03 20:55:01 +00:00
xtraeme
5057789f26 Don't show ptyfs in the display, it's useless. 2005-08-01 02:38:03 +00:00
christos
244d270d1b warns=3, delint. 2005-07-30 16:19:09 +00:00
christos
d8213a2a2a - Check stdin, stdout, and stderr for a tty. From Liam Foy for SUSv3
compliance.
- While here, delint, prototypes, getsetprogname, warns=3
2005-07-30 16:14:39 +00:00
christos
e8323719e6 Usage should exit with to according to posix (from Liam Foy).
While here, pass WARNS=3 and lint
2005-07-30 14:43:13 +00:00
yamt
19ff568b84 allow configuration without swap. 2005-07-30 06:40:30 +00:00
christos
b3350d3e14 Remove unused files. From Max Okumoto. 2005-07-30 00:49:13 +00:00
christos
0d20a48365 remove -static. 2005-07-29 01:19:20 +00:00
christos
0a918ea74c Traditional flex uses int instead of yy_size_t for some api functions.
Unfortunately this mangles differently in c++, so we get undefined symbols.
So we define the old function prototype to keep things happy.
2005-07-28 04:14:30 +00:00
he
759fbc6504 The return type from getopt(3) is int, not char. Besides, char is
not guaranteed to be signed, so comparison with -1 will cause a
warning (turned error) for some of our ports (e.g. our arm ports).
Fix this by making the 'ch' variable an int instead of a char.
2005-07-27 09:29:02 +00:00
christos
3692d77541 Whitespace KNF cleanup from Max Okumoto 2005-07-25 22:55:58 +00:00
cube
c3414672de The devi lists in struct devbase and struct deva really should use the
TAILQ set of macros from queue.h...  It's way too easy to make mistakes...

config(1) was segfaulting in deldev() in some situations...  Reported by
Brend Ernesti.
2005-07-25 22:31:07 +00:00
hubertf
f81ddc5831 Add vndcompress 2005-07-25 18:10:09 +00:00
wiz
a654b897c8 Sync usage with man page. 2005-07-25 12:25:54 +00:00
wiz
8107329829 Various improvements. 2005-07-25 12:24:40 +00:00
hubertf
e98029593c Add vndcompress(1) and vnduncompress(1) to transform filesystem/disk
images from "normal" into cloop2-format compressed images and back.
Written by Florian Stoehr (netbsd@wolfnode.de) with some polishing
by me.

Compressed disk images can be used with the vnd(4) driver when compiled with
VND_COMPRESSION and "vnconfig -z".  Useful for creation of Live CDs/DVDs.
2005-07-25 12:17:59 +00:00
cube
878c29f51a Correct an if test. 2005-07-25 06:22:09 +00:00
cube
e499d8b53e Implement the long overdue syntax "no <dev> at <attachment>". We can't
pretend anymore we don't have it.

This is the result of 7 hours of work on the train journey forth and
back to the family reunion for the birthday of my cousin Mickael, whom
I thank for living just far away enough.
2005-07-24 21:31:02 +00:00
christos
4023e9bbcb add more crap for denic. From OpenBSD. 2005-07-22 16:01:52 +00:00
peter
0d03348661 Implement the following two XSI extensions:
-q: quick mode, list only the names and the number of users currently
logged on.

-s: default mode, list only the name, line and time fields.
2005-07-22 14:23:05 +00:00
ross
6a10734347 Fix a couple of stack-smashing buffer overflows. 2005-07-20 17:22:45 +00:00
dsainty
de09461393 Sprinkle const liberally 2005-07-20 12:54:30 +00:00
dsainty
0de40530b6 From discussion on tech-userlevel, change the comment formatting in the
changes applied in revision 1.10.  At the same time, expand the comments
a bit to make the code slightly clearer.  No code changes.
2005-07-20 12:40:27 +00:00
christos
b89278a40d WARNS=3 2005-07-19 23:18:31 +00:00
christos
ca28631014 Pass lint completely. 2005-07-19 23:07:10 +00:00