Bug 183333 - Misnamed constant in bpf(4)
Summary: Misnamed constant in bpf(4)
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2013-10-26 15:10 UTC by Mats Erik Andersson
Modified: 2018-04-10 23:00 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Mats Erik Andersson 2013-10-26 15:10:00 UTC
In section EXAMPLES of bpf(4), first example on Reverse ARP,
the macro REVARP_REQUEST does not exist. The code snippet
must be updated to use ARPOP_REVREQUEST instead. For verification
look in "/usr/include/net/if_arp.h".


Comment 1 pluknet 2013-10-26 17:49:50 UTC
The bpf(4) documentation states that the example is taken from the Reverse
ARP Daemon.  rarpd is tightly coupled with BPF.  This macro is actually
used there mapped to ARPOP_REVREQUEST.  From rarpd code snippet's p.o.v.
this EXAMPLES is correct, but is not compilable as is without adding this
mapping there.

The REVARP_REQUEST localism is probably came from SunOS? (and RFC1931).
This macro does not exist in net/if_arp.h (in any BSD except Solaris) and
is/was probably used for source compatibility with SunOS.
The ARPOP_REVREQUEST macro sits there since 1992 (4.4BSD).  SunOS took
if_arp.h from UCB on 1/24/86 and added REVARP_REQUEST on its own.  It seems

wpaul modified rarpd.c in r19859 to use REVARP_REQUEST (it was
ARPOP_REVREQUEST there originally r6823).  The bpf(4) man page came in with
r5882 from 1.1.5, and it was REVARP_REQUEST there.  It was REVARP_REQUEST
in rarpd as found in 4.3BSD-UWisc copyrighted by Sun Micro dated 86/02/05
which is before 1992.

Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:55 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped