diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-03-22 11:28:43 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-03-22 11:28:43 +0000 |
commit | ab7ae007f073cba924c76c622e2c5af6ae712624 (patch) | |
tree | 95ed4730810a0fa96b83d421d92f9aec93e75bd0 /sys/net/if.c | |
parent | 58a68fe83467bee018df0408ee71bd632553d50d (diff) |
remove if_withname(), which was imported during KAME merge by mistake.
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 31 |
1 files changed, 1 insertions, 30 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. */ |