aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rarpd
Commit message (Collapse)AuthorAgeFilesLines
* Remove incorrect section name. Incomplete -Wall cleaning.Philippe Charnier1999-11-272-1/+2
| | | | Notes: svn path=/head/; revision=53766
* Fix warning: return type of `main' is not `int'Peter Wemm1999-09-151-1/+1
| | | | Notes: svn path=/head/; revision=51287
* $Id$ -> $FreeBSD$Peter Wemm1999-08-283-3/+3
| | | | Notes: svn path=/head/; revision=50479
* Sync usage string with reality: removed -n, added -s.Alexander Langer1998-12-061-2/+2
| | | | Notes: svn path=/head/; revision=41561
* Fix bug in rarpd:Ollivier Robert1998-04-021-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | Explanation of the bug: when processing its first request, rarpd opens a routing socket to send requests to the arp table. It keeps that socket open afterwards, while waiting for new RARP requests. Meanwhile, the data received on the routing socket fill up until they are about 8Kbytes in size. Any additional data is lost. When rarpd receives its next RARP request, it tries to access the ARP table via a routing socket call, then waits for the answer to its own request. This answer is lost because the received data is already filled: when looking for the reply, rarpd receives only 8kbytes worth of data, then loops waiting forever. Someone please test it on -STABLE and commit it. We can close the PR when testing on STABLE is done. PR: bin/5669 Submitted by: Pierre Beyssac <pb@fasterix.freenix.org> Notes: svn path=/head/; revision=35003
* Removed most unused includes of <net/if_var.h> outside the kernel.Bruce Evans1998-01-161-2/+1
| | | | Notes: svn path=/head/; revision=32570
* Mdoc'ify man page.Philippe Charnier1997-10-132-65/+75
| | | | Notes: svn path=/head/; revision=30372
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-311-2/+2
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24428
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-222-2/+2
| | | | Notes: svn path=/head/; revision=22997
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-142-2/+2
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Update to match changes in <net/if.h>.Garrett Wollman1997-01-031-14/+2
| | | | Notes: svn path=/head/; revision=21264
* Add -s flag to always supply mapping if known, ignoring theBill Fenner1996-11-272-6/+20
| | | | | | | presence or absence of files in /tftpboot. Notes: svn path=/head/; revision=19986
* Make the man page reflect reality. Add BUGS section about DNS.Bill Fenner1996-11-272-16/+28
| | | | | | | | Logging cleanups (including logging the requestor's MAC address instead of the server's). Notes: svn path=/head/; revision=19985
* Although I got rarpd to work, it was largely through kludgery. BillBill Paul1996-11-192-48/+55
| | | | | | | | | | | | | | | | | | | | | | | | | Fenner was kind enough to point out the error of my ways. This incorporates diffs from him which: - Keep everything in network order. - Log the booted ether & ip address, instead of my address on that net - change several exit()'s to return()'s, so that rarpd continues running even if it thinks it's in a weird state. One small tweak by me: in rarp_bootable(), we have to make sure to construct 'ipname' in host byte order (if we don't, we have to specify /tftpboot/<remote IP in hex> with <remote IP in hex> in network byte order, which is confusing). Also restored use of <dirent.h> rather than <sys/dir.h> as pointed out by bde. Also updated the man page so that the -v flag is documented. With any luck, I won't have to touch this thing again. Notes: svn path=/head/; revision=19889
* Dohw! Left out one important htonl() in update_arptab().Bill Paul1996-11-181-3/+3
| | | | | | | Pointed out by: Bill Fenner Notes: svn path=/head/; revision=19863
* Fix up new rarpd.Bill Paul1996-11-184-723/+534
| | | | | | | | | | | | | | | | | | | | | This includes the following changes: - Support for poking ARP entries into the local table is now built in, so the arptab.c module I hacked together is no longer needed. - rarp_process() and rarp_reply() now accept a len argument which is passed down from rarp_loop() which tells rarp_reply() exactly how long the original RARP frame was. (Usually, it's 60 bytes, which is the minimum.) Previously, the length was calculated using the sum of sizeof(struct ether_header) + sizeof(struct ether_arp) (plus the ethernet frame header, I think). The result was a total packet length of 42 bytes. Now, rarp_reply() sends out packets that are the same size as those it recieves (60 bytes). This agrees with the behavior of rarpd on SunOS (as observed with tcpdump). The unused extra bytes are zeroed. Notes: svn path=/head/; revision=19859
* This commit was generated by cvs2svn to compensate for changes in r19855,Bill Paul1996-11-181-0/+224
|\ | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=19856
| * Import new version of rarpd from the BPF 1.1 distribution from LBL.vendor/rarpdBill Paul1996-11-184-282/+783
| | | | | | | | | | | | | | Obtained from: LBL, BPF 1.1 distribution Notes: svn path=/cvs2svn/branches/LBL/; revision=19855
* | Eliminated includes of the "temporary" backwards compatibility headerBruce Evans1996-09-241-3/+7
| | | | | | | | | | | | | | | | | | <sys/dir.h> in applications. Maintained existing (inadequate) ifdefs for dir.h vs dirent.h in libdialog, amd and rarpd, but didn't add any new ones. Notes: svn path=/head/; revision=18485
* | It appears that with FreeBSD-current, we need to set the ethernetBill Paul1996-08-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | frame type in network byte order. The htons() that wasn't needed in 2.1 is now required in 2.2. Ultimately, this rarpd should be replaced with the more recent one supplied with the new BPF distribution. Notes: svn path=/head/; revision=17817
* | Fix a bunch of spelling errors in a bunch of man pages.Mike Pritchard1996-01-301-2/+2
| | | | | | | | Notes: svn path=/head/; revision=13744
* | recording cvs-1.6 file deathPeter Wemm1995-12-301-201/+0
| | | | | | | | Notes: svn path=/cvs2svn/branches/ATT/; revision=13122
* | Use daemon() to deamonify ourselves.Bill Paul1995-07-181-9/+4
| | | | | | | | Notes: svn path=/head/; revision=9577
* | Remove trailing whitespace.Rodney W. Grimes1995-05-302-23/+23
| | | | | | | | Notes: svn path=/head/; revision=8857
* | Get rid of ether_addr.c: it's been moved to libc. Also add properBill Paul1995-04-022-4/+5
| | | | | | | | | | | | | | | | | | declaration for ether_ntohost(). (Does anyone know what header file is supposed to contain the declarations for the ether_addr functions? I can't them in the SunOS includes anywhere.) Notes: svn path=/head/; revision=7577
* | Make sure we free() the result returned to us by yp_match().Bill Paul1995-03-261-5/+15
| | | | | | | | Notes: svn path=/head/; revision=7382
* | ether_addr.c:Bill Paul1995-03-052-55/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implement ether_hostton() - Implement ether_aton() - Modify ether_aton() and ether_ntoa() to match the semantics of the SunOS versions of these functions. - Neaten up ether_hostton() and ether_ntohost() a little. - Get rid of ether_print() since it isn't needed for rarpd and it isn't documented as a standard ethers(5) function. rarpd.8: - Make it clear that the 'ipaddr' that rarpd looks for in /tftpboot is actually in hexadecimal (as in /tftpboot/803B4032) since those who are not versed in the black art of system administration are not likely to know this. Notes: svn path=/head/; revision=6910
* | Don't depend on <stdio.h> bogusly including <sys/types.h>.Bruce Evans1995-03-051-4/+3
| | | | | | | | Notes: svn path=/head/; revision=6898
* | Gave rarpd back the ability to poke temporary entries into the arpBill Paul1995-03-034-8/+252
|/ | | | | | | | | | | | | | | | | | | table; arptab.c is really a hacked up version of arp.c that only supports adding temporary entries. (This stuff is nasty -- I wish I knew what was so wrong with SIOCSARP/SIOCGARP/etc... that made the BSD developers decide to take it out.) The idea here is that the client issuing the rarp is expected to be in the middle of booting and would therefore be unable to answer arp queries from other machines on the wire. Having rarpd stuff a temporary entry for the booting host into the local arp table helps keep arp requests from going unanswered. Also added ether_print() and ether_ntoa() to the ether_addr.c module. Eventually I'll get ether_aton() and ether_hostton() written and then this file can be dropped straight into libc. (Assuming no one objects, of course. :) Notes: svn path=/head/; revision=6866
* Obtained from: An old BPF release packaged with the tcpdump-2.0 source code.vendor/rarpd/1.0Bill Paul1995-03-024-0/+957
"Yes Virginia, there is a rarpd." (Before anyone asks, this *not* the rarpd from NetBSD. It did come from the same place as theirs, however.) This is a port of the rarpd program included with the tcpdump-2.0 source code (which I finally unearthed after scrounging around some of the darker corners of the Internet). It's as close to the original as I could keep it except for the following changes: - The original program was based on an older version of the Berkeley Packet Filter which used different filter programming instructions. Fortunately, an updated RARP packet filter is available right in the BPF man page so this was easy to fix. - The old code didn't know how to deal with variable length addresses in ifreq buffers. This has been fixed. - Some byte order weirdness had to be fixed. The sanity checks in rarp_check() needed some htons()es, and the rarp_reply() function needed to properly set the ether_type field in the ethernet header to ETHERTYPE_REVARP before transmitting the packet, otherwise the bytes in ether_type would wind up reversed. It is important to note that using htons(ETHERTYPE_REVARP) will not work. This is odd, because the NetBSD rarpd uses htons(ETHERTYPE_REVARP). (Praise be to tcpdump: I would never have been able to track this silliness down without it.) - The update_arptab() function has been castrated. It depends on SIOCSARP which has been deprecated in 4.4BSD. The NetBSD people don't seem to be using this function either. It wouldn't be too hard to replace this with equivalent code from arp.c, but it might not be necessary. - I put together an ether_ntohost() support function that allows both local (/etc/ethers) and NIS lookups. This stuff should go in libc at some point, but nothing else seems to need it for now, so it can wait a while. As you may have guessed, you need to have the Berkeley Packet Filter in your kernel in order to use this program. The good news is that together with the recently added bootparamd, you can use finally use a FreeBSD box to boot Sun boxes over the network. (This was my whole motivation for getting this stuff to work: I have this one subnet that has a whole bunch of Sun3 X-terminals on it with only two Sun4 workstations, both of which are locked in peoples' offices. If those two machines crash (and they do every so often) then none of the X-terms will boot. Now I can use a spare PC that I have as a boot server. :) Notes: svn path=/cvs2svn/branches/LBL/; revision=6823 svn path=/cvs2svn/tags/rarpd-orig/; revision=6825; tag=vendor/rarpd/1.0