summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
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