Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 1995 22:41:40 -0800
From:      Bill Paul <wpaul>
To:        CVS-commiters, cvs-usrsbin
Subject:   cvs commit: src/usr.sbin/rarpd - Imported sources
Message-ID:  <199503020641.WAA22350@freefall.cdrom.com>

next in thread | raw e-mail | index | archive | help
wpaul       95/03/01 22:41:39

  Log:
  Obtained from: An old BPF release packaged with the tcpdump-2.0 source code.
  
  "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. :)
  
  Status:
  
  Vendor Tag:	LBL
  Release Tags:	rarpd-orig
  
  N src/usr.sbin/rarpd/Makefile
  N src/usr.sbin/rarpd/rarpd.c
  N src/usr.sbin/rarpd/rarpd.8
  N src/usr.sbin/rarpd/ether_addr.c
  
  No conflicts created by this import



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503020641.WAA22350>