aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Eckenfels <net-tools@lina.inka.de>2005-05-16 04:30:17 +0000
committerBernd Eckenfels <net-tools@lina.inka.de>2005-05-16 04:30:17 +0000
commit501fb4863b544a3b6514a0145788ea7a61865c4b (patch)
tree31849666d9c14ef9408694ef381c3bee4af481bc
parentupdated pot file and use msgmerge instead of tupdate (Debian Bug #271426) (diff)
downloadnet-tools-501fb4863b544a3b6514a0145788ea7a61865c4b.tar.gz
net-tools-501fb4863b544a3b6514a0145788ea7a61865c4b.tar.bz2
net-tools-501fb4863b544a3b6514a0145788ea7a61865c4b.zip
desupport dontpub in arp.8 and arp -? (Debian Bug #203396)
-rw-r--r--arp.c32
-rw-r--r--man/en_US/arp.815
2 files changed, 25 insertions, 22 deletions
diff --git a/arp.c b/arp.c
index 5c20449..b02c74b 100644
--- a/arp.c
+++ b/arp.c
@@ -8,7 +8,7 @@
* NET-3 Networking Distribution for the LINUX operating
* system.
*
- * Version: $Id: arp.c,v 1.23 2003/02/08 19:56:25 ecki Exp $
+ * Version: $Id: arp.c,v 1.24 2005/05/16 04:30:17 ecki Exp $
*
* Maintainer: Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
*
@@ -148,7 +148,7 @@ static int arp_del(char **args)
continue;
}
if (!strcmp(*args, "dontpub")) {
-#ifdef HAVE_ATF_DONTPUB
+#ifdef ATF_DONTPUB
req.arp_flags |= ATF_DONTPUB;
#else
ENOSUPP("arp", "ATF_DONTPUB");
@@ -157,7 +157,7 @@ static int arp_del(char **args)
continue;
}
if (!strcmp(*args, "auto")) {
-#ifdef HAVE_ATF_MAGIC
+#ifdef ATF_MAGIC
req.arp_flags |= ATF_MAGIC;
#else
ENOSUPP("arp", "ATF_MAGIC");
@@ -205,21 +205,21 @@ static int arp_del(char **args)
/* Call the kernel. */
if (flags & 2) {
if (opt_v)
- fprintf(stderr, "arp: SIOCDARP(nopub)\n");
+ fprintf(stderr, "arp: SIOCDARP(dontpub)\n");
if (ioctl(sockfd, SIOCDARP, &req) < 0) {
if ((errno == ENXIO) || (errno == ENOENT)) {
if (flags & 1)
- goto nopub;
+ goto dontpub;
printf(_("No ARP entry for %s\n"), host);
return (-1);
}
- perror("SIOCDARP(nopub)");
+ perror("SIOCDARP(dontpub)");
return (-1);
} else
deleted = 1;
}
if (!deleted && (flags & 1)) {
- nopub:
+ dontpub:
req.arp_flags |= ATF_PUBL;
if (opt_v)
fprintf(stderr, "arp: SIOCDARP(pub)\n");
@@ -323,7 +323,7 @@ static int arp_set(char **args)
continue;
}
if (!strcmp(*args, "dontpub")) {
-#ifdef HAVE_ATF_DONTPUB
+#ifdef ATF_DONTPUB
flags |= ATF_DONTPUB;
#else
ENOSUPP("arp", "ATF_DONTPUB");
@@ -332,7 +332,7 @@ static int arp_set(char **args)
continue;
}
if (!strcmp(*args, "auto")) {
-#ifdef HAVE_ATF_MAGIC
+#ifdef ATF_MAGIC
flags |= ATF_MAGIC;
#else
ENOSUPP("arp", "ATF_MAGIC");
@@ -451,11 +451,11 @@ static void arp_disp_2(char *name, int type, int arp_flags, char *hwa, char *mas
strcat(flags, "M");
if (arp_flags & ATF_PUBL)
strcat(flags, "P");
-#ifdef HAVE_ATF_MAGIC
+#ifdef ATF_MAGIC
if (arp_flags & ATF_MAGIC)
strcat(flags, "A");
#endif
-#ifdef HAVE_ATF_DONTPUB
+#ifdef ATF_DONTPUB
if (arp_flags & ATF_DONTPUB)
strcat(flags, "!");
#endif
@@ -506,11 +506,11 @@ static void arp_disp(char *name, char *ip, int type, int arp_flags, char *hwa, c
printf("PERM ");
if (arp_flags & ATF_PUBL)
printf("PUB ");
-#ifdef HAVE_ATF_MAGIC
+#ifdef ATF_MAGIC
if (arp_flags & ATF_MAGIC)
printf("AUTO ");
#endif
-#ifdef HAVE_ATF_DONTPUB
+#ifdef ATF_DONTPUB
if (arp_flags & ATF_DONTPUB)
printf("DONTPUB ");
#endif
@@ -618,10 +618,10 @@ static void version(void)
static void usage(void)
{
fprintf(stderr, _("Usage:\n arp [-vn] [<HW>] [-i <if>] [-a] [<hostname>] <-Display ARP cache\n"));
- fprintf(stderr, _(" arp [-v] [-i <if>] -d <hostname> [pub][nopub] <-Delete ARP entry\n"));
+ fprintf(stderr, _(" arp [-v] [-i <if>] -d <host> [pub] <-Delete ARP entry\n"));
fprintf(stderr, _(" arp [-vnD] [<HW>] [-i <if>] -f [<filename>] <-Add entry from file\n"));
- fprintf(stderr, _(" arp [-v] [<HW>] [-i <if>] -s <hostname> <hwaddr> [temp][nopub] <-Add entry\n"));
- fprintf(stderr, _(" arp [-v] [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub <-''-\n\n"));
+ fprintf(stderr, _(" arp [-v] [<HW>] [-i <if>] -s <host> <hwaddr> [temp] <-Add entry\n"));
+ fprintf(stderr, _(" arp [-v] [<HW>] [-i <if>] -Ds <host> <if> [netmask <nm>] pub <-''-\n\n"));
fprintf(stderr, _(" -a display (all) hosts in alternative (BSD) style\n"));
fprintf(stderr, _(" -s, --set set a new ARP entry\n"));
diff --git a/man/en_US/arp.8 b/man/en_US/arp.8
index ff840a4..3709cf6 100644
--- a/man/en_US/arp.8
+++ b/man/en_US/arp.8
@@ -1,4 +1,4 @@
-.TH ARP 8 "5 Jan 1999" "net-tools" "Linux Programmer's Manual"
+.TH ARP 8 "2005-05-16" "net-tools" "Linux Programmer's Manual"
.SH NAME
arp \- manipulate the system ARP cache
.SH SYNOPSIS
@@ -111,8 +111,8 @@ datagrams will be routed.
Manually create an ARP address mapping entry for host
.B hostname
with hardware address set to
-.BR hw_addr .
-The format of the hardware address is dependent on the hardware
+.B hw_addr
+. The format of the hardware address is dependent on the hardware
class, but for most classes one can assume that the usual presentation
can be used. For the Ethernet class, this is 6 bytes in hexadecimal,
separated by colons. When adding proxy arp entries (that is those with
@@ -132,14 +132,17 @@ As of kernel 2.2.0 it is no longer possible to set an ARP entry for an
entire subnet. Linux instead does automagic proxy arp when a route
exists and it is forwarding. See
.BR arp (7)
-for details.
+for details. Also the
+.B dontpub
+option which is available for delete and set operations cannot be
+used with 2.4 and newer kernels.
.TP
.B "\-f filename, \-\-file filename"
Similar to the
.B \-s
option, only this time the address info is taken from file
-.BR filename .
-This can be used if ARP entries for a lot of hosts have to be
+.B filename
+. This can be used if ARP entries for a lot of hosts have to be
set up. The name of the data file is very often
.IR /etc/ethers ,
but this is not official. If no filename is specified /etc/ethers