summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2004-03-13 02:31:40 +0000
committerbrooks <brooks@FreeBSD.org>2004-03-13 02:31:40 +0000
commitcb7aea29b8d913b12052d75a14a11b0ac819476c (patch)
tree181743a213c5e0bcd98374dcad08b06ccd7bdcd5 /sys/net/if.c
parent51a1098e943ef2673d4866a8d6a7d42df445d335 (diff)
downloadFreeBSD-src-cb7aea29b8d913b12052d75a14a11b0ac819476c.zip
FreeBSD-src-cb7aea29b8d913b12052d75a14a11b0ac819476c.tar.gz
Remove if_withname. It came in with the KAME import, but never got
used. Should someone need its functionality, it's a really expensive implementation of: ifnet_byindex(sdl->sdl_index) Reviewed by: bde, ume
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 1d412f9..43a8461 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1247,32 +1247,6 @@ ifunit(const char *name)
}
/*
- * Map interface name in a sockaddr_dl to
- * interface structure pointer.
- */
-struct ifnet *
-if_withname(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 NUL-terminated string. It may not be NUL-terminated
- * in the sockaddr, and we don't want to change the caller's sockaddr
- * (there might not be room to add the trailing NUL anyway), so we make
- * a local copy that we know we can NUL-terminate safely.
- */
-
- bcopy(sdl->sdl_data, ifname, sdl->sdl_nlen);
- ifname[sdl->sdl_nlen] = '\0';
- return ifunit(ifname);
-}
-
-/*
* Hardware specific interface ioctls.
*/
static int
OpenPOWER on IntegriCloud