From nobody@FreeBSD.org  Sat Oct 26 14:00:11 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id B1E1851B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Oct 2013 14:00:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 86B072EE7
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Oct 2013 14:00:11 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9QE0A65011224
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Oct 2013 14:00:10 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9QE0Ac3011118;
	Sat, 26 Oct 2013 14:00:10 GMT
	(envelope-from nobody)
Message-Id: <201310261400.r9QE0Ac3011118@oldred.freebsd.org>
Date: Sat, 26 Oct 2013 14:00:10 GMT
From: Mats Erik Andersson <bsd@gisladisker.se>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Misnamed constant in bpf(4)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183333
>Category:       docs
>Synopsis:       Misnamed constant in bpf(4)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 26 14:10:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sat Oct 26 16:50:00 UTC 2013
>Originator:     Mats Erik Andersson
>Release:        9.1-RELEASE
>Organization:
>Environment:
9.1-REALEASE-p7 i386
>Description:
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".
>How-To-Repeat:

>Fix:
Use macro ARPOP_REVREQUEST.

>Release-Note:
>Audit-Trail:

From: Sergey Kandaurov <pluknet@gmail.com>
To: Mats Erik Andersson <bsd@gisladisker.se>
Cc: bug-followup@FreeBSD.org
Subject: Re: docs/183333: Misnamed constant in bpf(4)
Date: Sat, 26 Oct 2013 20:49:50 +0400

 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
 to not have ARPOP_REVREQUEST.
 
 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.
 
 
 -- 
 wbr,
 pluknet
>Unformatted:
