Commit Graph

43 Commits

Author SHA1 Message Date
itojun
b9c3c448e1 use getifaddrs to avoid alignment constraints in SIOCGIFCONF.
(do you have PR # for this? >lukem)
2000-04-13 09:12:16 +00:00
abs
7d14d66b4d We need to close and open the socket to prevent routing updates building
up such that when we send our message we never see our reply (and hang)
Fix taken (modified) from PR 7508
2000-02-11 11:27:20 +00:00
abs
6068331e78 Indicate on which interface a packet has been received when debugging 2000-02-11 11:25:23 +00:00
nathanw
713f906d1c Copy struct ifreq returned by SIOGIFCONF to ensure correct alignment. 2000-02-07 01:15:52 +00:00
kleink
3e833f70b4 Need <sys/param.h> for MAXHOSTNAMELEN. 1999-09-26 10:40:32 +00:00
thorpej
56c5efa335 Use pidfile(3). 1999-06-06 02:52:16 +00:00
thorpej
db3ee29b72 Fix a logic error which would have caused a NULL pointer dereference
if the client's IP address wasn't found on the interface's network.
1999-02-13 19:58:29 +00:00
kleink
3ed4fcf61e In userland, pull in <errno.h> instead of <sys/errno.h> for the declaration
of errno.
1999-01-11 22:39:59 +00:00
fvdl
778592d8c3 Shut up gcc. 1998-10-06 15:50:30 +00:00
matt
224e79dde2 Teach rarpd about interface aliases. 1998-10-06 00:23:55 +00:00
mrg
35d49164e0 use daemon(). remove spurious \n from rarperr() call 1998-09-29 09:21:35 +00:00
fair
72dfb07bbe usage & comment string patch, per PR#5859 1998-07-29 07:26:29 +00:00
mrg
5c8240d257 KNF. be safe with buffers. use setsid(). 1998-07-13 06:31:31 +00:00
mrg
b7e46f9175 support /var/run/rarpd.pid 1998-04-23 02:48:33 +00:00
mrg
aebb3d6c08 add a -l (logging) switch. 1998-04-15 15:06:06 +00:00
fair
d0121866f7 These changes from PR#3190 (second set of diffs) deal with rarpd
refusing to work in "-a" mode on a host with more than one Ethernet,
and at least one non-ethernet device. Frankly, the interface
initialization loop is badly structured and should be rewritten,
and these changes do nothing to fix that. However, they oughta do
the requested job, quick & dirty.
1998-03-23 08:44:07 +00:00
christos
02f88f3555 PR/4835: Izumi Tsutsui: rarpd does not set the link level address length.
While there change "6" to "ETHER_ADDR_LEN"
1998-01-17 11:38:36 +00:00
is
d4fc5fab1b If we answer a RARP request, also add the mapping to the local arp cache.
[This was broken when the 4.4BSD ARP table changes were done, and never
repaired.]
Inspired by Jarle Greipsland, PR 4531; code stolen from arp.a and cleaned
up (mostly removing global variables).
XXX As pointed out in the PR, this should be in some library (libutil?),
to be usable by other servers like bootpd and dhcpd.
1997-11-24 18:43:12 +00:00
lukem
0a94f4f077 use CPPFLAGS instead of CFLAGS 1997-10-25 06:57:53 +00:00
lukem
a13f0387b9 use memcmp/memset/memmove instead of bcmp/bzero/bcopy 1997-10-18 11:18:39 +00:00
lukem
0a9c07ac82 getopt returns -1 not EOF 1997-10-17 12:52:25 +00:00
lukem
bffabae34b WARNSify 1997-10-17 12:40:03 +00:00
lukem
12c67164dc * use MAXHOSTNAMELEN+1 instead of 256
* don't use LOG_CONS - it's unnecessary and spams the console if syslogd
  fails (a bad thing, really)

From [misc/873] by Giles Lean <giles@nemeton.com.au>:
* explain why the name lookup failed
* always send debug() via syslog(3) (unlike the PR, which added a -s flag)
* enhance the man page a bit (even in the commented out section which
  is only relevant to the -DREQUIRE_TFTPBOOT case
1997-06-21 14:30:03 +00:00
lukem
885db8b7ed remove unnecessary CFLAGS+=-I${.CURDIR} and SRCS=rarpd.c 1997-06-21 14:23:57 +00:00
cgd
b241147c80 fix some u_long vs. u_int32_t bogons in uses of nameserver lookup results. 1997-03-23 00:48:15 +00:00
is
00cef679df New ARP system, supports IPv4 over any hardware link.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
1997-03-15 18:37:27 +00:00
is
4ce26afebe back out previoius commit---wasn't intended for The Trunk 1997-03-10 19:26:23 +00:00
is
0edaa1c1e5 adapt to new ARP code. still needs work for non-Ethernet. 1997-03-10 19:18:42 +00:00
mikel
c792bb5960 cast ether_ntohost() argument to proper type;
from Klaus Klein <kleink@layla.inka.de>
1997-01-18 02:22:21 +00:00
jtc
cac62b2d65 Be pedantic, main() returns int in C. 1996-03-21 17:56:15 +00:00
mycroft
cbbb28608c If __FreeBSD__, don't swap the type field in the Ethernet II header. 1996-02-01 21:57:00 +00:00
hpeyerl
a2db59e20a interface aliases don't count as individual interfaces and hence don't
need a seperate bpf. Someone should decide whether to tell netstat
about this.
1996-01-31 20:25:31 +00:00
thorpej
f90cf6bd46 New-style RCS id. 1995-11-17 09:49:19 +00:00
thorpej
c78a02a75a Make the "/tftpboot/<client-ip-address>" requirement conditional on
-DREQUIRE_TFTPBOOT and disable it by default.
1995-09-01 21:55:44 +00:00
cgd
d8806814a6 specify man pages the new way. 1994-12-22 11:32:57 +00:00
mycroft
c976295cf8 Look up the ether addresses of interfaces *correctly*, and just ditch
SIOCSARP altogether.
1994-05-25 20:01:15 +00:00
cgd
75f79c7821 rename constants 1994-05-14 21:57:56 +00:00
cgd
7a6e889600 kill bad casts 1994-03-30 02:28:43 +00:00
cgd
62a75460c6 put ar_hrd in network byte order. from
Christos Zoulas <christos@deshaw.com>
1994-03-01 06:46:42 +00:00
deraadt
0758ab6ba7 bpf writes for ethernet take a network byte order ether_type 1994-01-24 01:46:29 +00:00
jtc
2a4121e39d Fix spelling errors 1994-01-14 16:22:25 +00:00
deraadt
218153c3df remove the faster replacement for inet_ntoa because the stupid thing
is byte order dependent.
1994-01-12 19:01:00 +00:00
deraadt
e3b965f6db original from LBL (part of the tcpdump distrib)
SIOCGIFCONF fixup by Roland McGrath <roland@frob.com>
1993-12-16 05:31:05 +00:00