remove the references to OLD_SIOC[SD]ARP ... this was really pre-historic
authorJes Sorensen <jes.sorensen@cern.ch>
Fri, 8 May 1998 14:44:00 +0000 (14:44 +0000)
committerJes Sorensen <jes.sorensen@cern.ch>
Fri, 8 May 1998 14:44:00 +0000 (14:44 +0000)
arp.c
lib/net-features.h

diff --git a/arp.c b/arp.c
index 0128719..585bc51 100644 (file)
--- a/arp.c
+++ b/arp.c
@@ -193,25 +193,12 @@ arp_del(char **args)
   if (flags == 0)
        flags = 3;
        
-#if HAVE_NEW_SIOCSARP
   strcpy(req.arp_dev,device);
 
   /* Call the kernel. */
   if (flags & 2) {
        if (opt_v)  fprintf(stderr,"arp: SIOCDARP(nopub)\n");
        if (ioctl(sockfd, SIOCDARP, &req) < 0) {
-               if (errno == EINVAL) {
-                       if (opt_v)  fprintf(stderr,"arp: OLD_SIOCDARP(priv)\n");
-                       memcpy((char *)&old_req,(char *)&req,sizeof(old_req));
-                       if (ioctl(sockfd, OLD_SIOCDARP, &old_req) < 0) {
-                               if (errno != ENXIO) {
-                                       perror("OLD_SIOCSARP(priv)");
-                                       return(-1);
-                               }
-                       } else {
-                               return(0);
-                       }
-               }
                if (errno == ENXIO) {
                        if (flags & 1)
                                goto nopub;
@@ -228,18 +215,6 @@ nopub:
        req.arp_flags |= ATF_PUBL;
        if (opt_v)  fprintf(stderr,"arp: SIOCDARP(pub)\n");
        if (ioctl(sockfd, SIOCDARP, &req) < 0) {
-               if (errno == EINVAL) {
-                       if (opt_v)  fprintf(stderr,"arp: OLD_SIOCDARP(pub)\n");
-                       memcpy((char *)&old_req,(char *)&req,sizeof(old_req));
-                       if (ioctl(sockfd, OLD_SIOCDARP, &old_req) < 0) {
-                               if (errno != ENXIO) {
-                                       perror("OLD_SIOCSARP(pub)");
-                                       return(-1);
-                               }
-                       } else {
-                               return(0);
-                       }
-               }
                if (errno == ENXIO) {
                        printf(NLS_CATGETS(catfd, arpSet, arp_no_arp, 
                                "No ARP entry for %s\n"), host);
@@ -249,14 +224,6 @@ nopub:
                return(-1);
        }
   }
-#else
-  /* Call the kernel. */
-  if (opt_v)  fprintf(stderr,"arp: old_SIOCDARP()\n");
-  if (ioctl(sockfd, SIOCDARP, &req) < 0) {
-       perror("SIOCDARP");
-       return(-1);
-  }
-#endif
 
   return(0);
 }
index 707633d..fd38669 100644 (file)
 
 /* detect the present features */
 
-#ifdef OLD_SIOCSARP /* arp */
-#  define HAVE_NEW_SIOCSARP 1
-#endif
-
 #if defined (SIOCADDRTOLD) || defined (RTF_IRTT) /* route */
 #  define HAVE_NEW_ADDRT 1
 #endif