From 501fb4863b544a3b6514a0145788ea7a61865c4b Mon Sep 17 00:00:00 2001 From: Bernd Eckenfels Date: Mon, 16 May 2005 04:30:17 +0000 Subject: desupport dontpub in arp.8 and arp -? (Debian Bug #203396) --- arp.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'arp.c') 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, * @@ -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] [] [-i ] [-a] [] <-Display ARP cache\n")); - fprintf(stderr, _(" arp [-v] [-i ] -d [pub][nopub] <-Delete ARP entry\n")); + fprintf(stderr, _(" arp [-v] [-i ] -d [pub] <-Delete ARP entry\n")); fprintf(stderr, _(" arp [-vnD] [] [-i ] -f [] <-Add entry from file\n")); - fprintf(stderr, _(" arp [-v] [] [-i ] -s [temp][nopub] <-Add entry\n")); - fprintf(stderr, _(" arp [-v] [] [-i ] -Ds [netmask ] pub <-''-\n\n")); + fprintf(stderr, _(" arp [-v] [] [-i ] -s [temp] <-Add entry\n")); + fprintf(stderr, _(" arp [-v] [] [-i ] -Ds [netmask ] pub <-''-\n\n")); fprintf(stderr, _(" -a display (all) hosts in alternative (BSD) style\n")); fprintf(stderr, _(" -s, --set set a new ARP entry\n")); -- cgit v1.2.3-65-gdbad