Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2004 10:23:59 -0800 (PST)
From:      "Aaron D. Gifford" <agifford@infowest.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/62798: PATCH: choparp: Add daemon ability  and correct man page typo
Message-ID:  <200402131823.i1DINxc4008070@www.freebsd.org>
Resent-Message-ID: <200402131830.i1DIURiF091212@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         62798
>Category:       ports
>Synopsis:       PATCH: choparp: Add daemon ability  and correct man page typo
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 13 10:30:27 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Aaron D. Gifford
>Release:        FreeBSD 4.9 and FreeBSD 5.1 and FreeBSD 5.2.1-RC2
>Organization:
>Environment:
This is irrelevant.
>Description:
I propose adding the following to tiny patches to the choparp port.

1) The first patch gives choparp the ability to run in the background as a daemon.  The man page claims "choparp is a easy-to-use proxy ARP daemon."  This isn't true.  Currently it only runs in the foreground.  This patch lets it run as a true daemon.

2) The second patch corrects a few typos in the man page, and corrects a very minor English grammar error, and adds a note that BPF(4) support is required for choparp to work.


>How-To-Repeat:
Not applicable.
>Fix:
PATCH #1:

--- choparp.c.orig      Fri Feb 13 10:55:01 2004
+++ choparp.c   Fri Feb 13 10:57:24 2004
@@ -437,6 +437,9 @@
 #endif
     if ((fd = openbpf(ifname, &buf, &buflen)) < 0)
        return(-1);
+#ifndef DEBUG
+    daemon(0, 0);
+#endif
     loop(fd, buf, buflen);
     return(-1);
 }




PATCH #2:

--- choparp.8.orig      Thu Nov  7 15:36:03 2002
+++ choparp.8   Fri Feb 13 11:17:00 2004
@@ -34,7 +34,7 @@
 .Nm choparp
 .Nd cheap and omitted proxy ARP
 .Sh SYNOPSIS
-.Nm chpoarp
+.Nm choparp
 .Ar if_name mac_addr
 .Oo Fl Oc Ns Ar net_addr Ns
 .Op / Ns Ar net_mask
@@ -42,7 +42,7 @@
 .Sh DESCRIPTION
 .Pp
 .Nm choparp
-is a easy-to-use proxy ARP daemon.
+is an easy-to-use proxy ARP daemon.
 It watches ARP request packets visible on the interface specified by argument
 .Ar if_name ,
 and sends proxy ARP reply to the sender if the ARP request queries the
@@ -52,7 +52,7 @@
 .Ar net_addr Ns / Ar net_mask .
 .Pp
 .Ar mac_addr
-is th MAC address to be published for the specified hosts.
+is the MAC address to be published for the specified hosts.
 It is normally the address of
 .Ar if_name .
 The format of
@@ -72,7 +72,7 @@
 .Dq 0x
 .Pq for example Ad 0x858a0186 .
 .Ar net_mask
-can likewise be speficied as a dotted quad or hexadecimal value,
+can likewise be specified as a dotted quad or hexadecimal value,
 or alternatively as a mask length. The following address specifications
 are therefore equivalent:
 .Bl -item -offset indent
@@ -89,6 +89,13 @@
 .Em excluded
 by preceding them with
 .Fl
+.Pp
+.Nm choparp
+uses the Berkeley Packet Filter
+.Nm BPF(4)
+and so the kernel must be compiled with support for the
+.Nm bpf
+device.
 .Sh EXAMPLES
 If you have network interface
 .Dq ne0

>Release-Note:
>Audit-Trail:
>Unformatted:



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