Commit a716f9b4 authored by Jes Sorensen's avatar Jes Sorensen

remove the references to OLD_SIOC[SD]ARP ... this was really pre-historic

parent 69b8ec07
......@@ -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);
}
......
......@@ -30,10 +30,6 @@
/* 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment