Commit Graph

8208 Commits

Author SHA1 Message Date
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
yamt fdeeeda1ac remove a wierd blank line in the case of -b. 2005-07-19 12:24:39 +00:00
christos ece0fd5c87 WARNS=3 2005-07-19 01:38:38 +00:00
lukem dccca90900 Revert back to using an int (instead of size_t) for holding a value that may
be negative.
Fixes progressbar display on terminals <43 columns wide.
Bug noted and solution suggested by Gavan Fantom.
2005-07-19 00:41:05 +00:00
christos ddee551034 Handle C99 array range initializers:
type a[] = { [lo ... hi] = c }:
2005-07-17 19:35:48 +00:00
christos 2d45339e97 Remove a const. 2005-07-17 17:08:25 +00:00
he a052596ae7 Make misc.h depend on makeerrnos.sh, to ease UPDATE builds after the
latest change to support WARNS=3.
2005-07-17 15:48:28 +00:00
he d36a483f83 Make this build with WARNS=3, and enable it.
Renames local variable syscall to syscall_ent to placate -Wshadow,
and adds const to struct field initialized to string literals.
2005-07-17 09:45:50 +00:00
he 7b9dcb30de Follow up the constification of ioctlname() in ktrace.h. 2005-07-17 08:44:08 +00:00
christos 553881914b WARNS=3, knf, ansi prototypes 2005-07-17 07:36:26 +00:00
christos 7fc92b0291 Explain why table is not const. 2005-07-16 22:32:36 +00:00
christos 58fc70c4d6 WARNS=3 2005-07-16 22:00:01 +00:00
christos fd2a8295bb - make input errors print the lint source line number they are called from.
- simplify a conditional.
2005-07-16 19:54:00 +00:00
christos 41d3ce981c Fix more lint problems. 2005-07-16 19:50:32 +00:00
christos 0aa8a97934 WARNS=3 and remove default values. 2005-07-16 16:21:05 +00:00
christos 140eaa6eeb - KNF
- better handling of errors and messages
- pass lint
2005-07-16 16:20:35 +00:00
christos 078c5c1a41 From David Sainty: If a process dissappears while we are signalling it, don't
count it as a match/error.
2005-07-16 15:53:56 +00:00
rpaulo 0024ded950 Remove the -L parameter from the first line of the SYNOPSIS
and bump the date.

ok Hubert Feyrer.
2005-07-16 12:35:59 +00:00
wiz bbd944217e Add missing break. From YOMURA Masanori in PR 30751. 2005-07-15 09:45:04 +00:00
reed 9887c735e4 Add NetBSD 2.0.2 was released on April 12, 2005. 2005-07-15 03:17:46 +00:00
wiz b6672bc279 Improve command description, from jmc, jaredy, and tom, all @openbsd. 2005-07-14 22:16:39 +00:00
mrg a3d57ef1bd play.c: allow empty files to exit gracefully rather than with an error
of "header seems really large".  reported by wiz.

record.c: don't use total_size in the header if is -1 (it's initial value)
2005-07-13 10:57:11 +00:00
sjg c3c1fc597e Expected results were not updated for comment testing. 2005-07-11 17:55:19 +00:00