summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-03-22 11:28:43 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-03-22 11:28:43 +0000
commitab7ae007f073cba924c76c622e2c5af6ae712624 (patch)
tree95ed4730810a0fa96b83d421d92f9aec93e75bd0
parent58a68fe83467bee018df0408ee71bd632553d50d (diff)
remove if_withname(), which was imported during KAME merge by mistake.
-rw-r--r--sys/net/if.c31
-rw-r--r--sys/net/if.h3
2 files changed, 2 insertions, 32 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index f1e8c498d04..49fafcc6d7d 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.29 2000/03/21 23:31:26 mickey Exp $ */
+/* $OpenBSD: if.c,v 1.30 2000/03/22 11:28:42 itojun Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -632,35 +632,6 @@ ifunit(name)
return (NULL);
}
-
-/*
- * Map interface name in a sockaddr_dl to
- * interface structure pointer.
- */
-struct ifnet *
-if_withname(sa)
- struct sockaddr *sa;
-{
- char ifname[IFNAMSIZ+1];
- struct sockaddr_dl *sdl = (struct sockaddr_dl *)sa;
-
- if ( (sa->sa_family != AF_LINK) || (sdl->sdl_nlen == 0) ||
- (sdl->sdl_nlen > IFNAMSIZ) )
- return NULL;
-
- /*
- * ifunit wants a null-terminated name. It may not be null-terminated
- * in the sockaddr. We don't want to change the caller's sockaddr,
- * and there might not be room to put the trailing null anyway, so we
- * make a local copy that we know we can null terminate safely.
- */
-
- bcopy(sdl->sdl_data, ifname, sdl->sdl_nlen);
- ifname[sdl->sdl_nlen] = '\0';
- return ifunit(ifname);
-}
-
-
/*
* Interface ioctls.
*/
diff --git a/sys/net/if.h b/sys/net/if.h
index 9aac27e49e8..f9ec5377e43 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.16 2000/03/21 23:31:26 mickey Exp $ */
+/* $OpenBSD: if.h,v 1.17 2000/03/22 11:28:42 itojun Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -413,7 +413,6 @@ void ifinit __P((void));
int ifioctl __P((struct socket *, u_long, caddr_t, struct proc *));
int ifpromisc __P((struct ifnet *, int));
struct ifnet *ifunit __P((char *));
-struct ifnet *if_withname __P((struct sockaddr *));
struct ifaddr *ifa_ifwithaddr __P((struct sockaddr *));
struct ifaddr *ifa_ifwithaf __P((int));