Commit Graph

47 Commits

Author SHA1 Message Date
mycroft
20e25f9518 Fix portability problems, per PR 5783. 2004-07-06 13:05:25 +00:00
darrenr
221fa57241 With recent changes to BPF, pushing the default buffer size to 1MB, running
a bunch of small daemons that seem small packet flows can easily chew up
significant kernel memory (each BPF device opened takes 2*buffersize of
wired memory.)  In each of these applications, add code to set the buffer
size to 32k before setting the interface.
2004-04-10 17:53:05 +00:00
itojun
7f5c6fbfb1 use strlcpy 2003-08-19 22:22:27 +00:00
agc
326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
itojun
7bb0ef551c use bounded string op 2003-07-13 12:18:55 +00:00
itojun
d25769c013 assume presense of getifaddrs(3). 2003-05-15 14:50:02 +00:00
mycroft
aae6c28cf9 null commit 2002-09-23 12:44:34 +00:00
itojun
f46e921837 poll.h, not sys/poll.h 2002-09-23 03:36:03 +00:00
mycroft
fbf6498012 select() -> poll() 2002-09-19 03:04:13 +00:00
grant
eda9e509bb sweep of errx/warnx, remove unnecessary trailing \n 2002-07-20 08:40:16 +00:00
scottr
6cd097bc12 Pack the RMP packet layout definitions -- with ELF, 32-bit words
are by default aligned on 32-bit boundaries. Update a semi-related
comment with this info.
2002-05-14 04:58:56 +00:00
wiz
65d97d1e55 Improve markup, unquote header. 2002-02-02 01:40:52 +00:00
cgd
25bdbb661e convert to use getprogname() 2001-02-19 23:22:40 +00:00
lukem
9b7718e15b set *errmsg to errbuf, preventing coredump if no interfaces are up 2001-02-05 02:37:34 +00:00
cgd
9cfe468c74 avoid C sequence point issues warned about by development version of gcc. 2001-01-16 02:41:17 +00:00
cgd
ede451d831 comment about the backslash used to avoid trigraph 2001-01-16 02:36:29 +00:00
lukem
13220245b2 use explicit name rather than __progname in openlog 2001-01-11 01:43:25 +00:00
cgd
94e108c80f avoid accidental use of ANSI C trigraphs. 2000-12-20 01:30:26 +00:00
is
d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +00:00
itojun
e9c5139f22 use getifaddrs, not SIOCGIFCONF. (should use pcap_lookupdev instead...) 2000-04-13 08:52:44 +00:00
kleink
a3c6c197a2 Cast timeval members to types we know the printf conversions of. 2000-03-27 17:03:25 +00:00
thorpej
56c5efa335 Use pidfile(3). 1999-06-06 02:52:16 +00:00
bouyer
938264f6ee If the client doesn't supply a filename, give it back the first one listed
for this station instead of an error. This is required for hp700 machines.
1999-02-01 17:00:44 +00:00
mrg
fdca644f9d - fix typo in a comment
- use the last connection RMPCONN cache correctly, and do not leak
  memory for each connection.
1998-12-09 03:41:42 +00:00
mrg
32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:56:06 +00:00
mycroft
e8018f6da9 Use S_IS*(), not S_IF*. 1997-10-19 19:40:21 +00:00
lukem
7f43427b52 use strchr/strrchr/memset/memmove instead of index/rindex/bzero/bcopy 1997-10-18 11:23:20 +00:00
lukem
dd30ff553b use strchr/strrchr/memset/memmove instead of index/rindex/bzero/bcopy 1997-10-18 11:23:03 +00:00
lukem
0a9c07ac82 getopt returns -1 not EOF 1997-10-17 12:52:25 +00:00
lukem
d0f8d5f560 minor .Nm cleanup 1997-10-17 12:49:57 +00:00
kleink
66105c37fc Lseek(2) usage cleanup: the use of L_SET/L_INCR/L_XTND is deprecated,
use SEEK_SET/SEEK_CUR/SEEK_END instead.
1997-08-25 19:31:43 +00:00
thorpej
1a9c5f5f48 Arithmetic between "int" and "size_t" is promoted to "long" on the Alpha;
use the %ld printf format, and cast to (long) for printing.
1997-07-30 17:43:55 +00:00
thorpej
4902da1c96 Fix compiler warnings, build with WARNS. 1997-07-28 05:39:16 +00:00
cgd
c917dfb5b2 Fix broken uses of Dd. Both the mdoc and mdoc.samples pages agree:
.Dd is supposed to be invoked like:
	.Dd month day, year
e.g. ".Dd January 25, 1989", rather than:
	.Dd "month day, year"
which is what these pages did.
1997-05-29 01:48:05 +00:00
thorpej
509e392ad5 Remove the SIOCADDMULTI ioctl; it's not meant for user level code. Just
always set promiscuous mode on the interface.
1997-01-27 22:51:50 +00:00
mycroft
851e3892fc If __FreeBSD__, don't swap the length field in the 802.3 header. 1996-02-01 21:27:46 +00:00
thorpej
507ba8247c Kill some gratuitous byte-swapping calls, which broke rbootd on the i386
in some cases.  No functional change on big-endian systems.  From
Scott Reynolds <scottr@plexus.com>.
1995-11-14 08:41:42 +00:00
thorpej
31903d0eaa Be safer with types. From Scott Reynolds <scottr@plexus.com> 1995-10-06 05:12:12 +00:00
thorpej
0964493c0d Better way to deal with byte-order in the RMP packet (might work on a PDP-11!)
From Scott Reynolds <scottr@plexus.com>
1995-09-19 06:27:31 +00:00
thorpej
fd263d7b71 The rest of the little-endian patches from Scott Reynolds that
apparently slipped through the cracks before.
1995-09-12 20:07:52 +00:00
thorpej
d871ec0593 Changes from Scott Reynolds <scottr@plexus.com> to make this go on
little-endian machines (like the i386).
1995-09-12 07:13:06 +00:00
thorpej
6799ca3972 Use new-style RCS ids. 1995-08-21 17:05:08 +00:00
thorpej
fc5cbfd4ca A few things:
* Don't compute the basename, use __progname.
	* Use daemon() to detach.
	* Use err(3) functions where appropriate.
	* Remove some old 4.2 stuff.
1995-08-21 16:57:54 +00:00
cgd
d8806814a6 specify man pages the new way. 1994-12-22 11:32:57 +00:00
brezak
880d90d4e9 rbootd for booting HP workstations from 4.4BSD/Utah. 1994-01-11 16:41:38 +00:00
brezak
c26eaebf4f rbootd for booting HP workstations from 4.4BSD/Utah. 1994-01-11 16:41:19 +00:00
brezak
e05cab76da Original version from 4.4BSD/Utah. 1994-01-11 15:43:38 +00:00