freebsd-skq/lib/libc/net
Kristof Provost 36dcd97de3 libc: Shortcut if_indextoname() if index == 0
If the index we're trying to convert is 0 we can avoid a potentially
expensive call to getifaddrs(). No interface has an ifindex of zero, so
we can handle this as an error: set the errno to ENXIO and return NULL.

Submitted by:	Nick Rogers
Reviewed by:	lutz at donnerhacke.de
MFC after:	2 weeks
Sponsored by:	RG Nets
Differential Revision:	https://reviews.freebsd.org/D24524
2020-04-23 21:16:51 +00:00
..
base64.c
byteorder.3
ether_addr.c
ethers.3
eui64.3
eui64.c
gai_strerror.3
gai_strerror.c
getaddrinfo.3
getaddrinfo.c
gethostbydns.c
gethostbyht.c
gethostbyname.3
gethostbynis.c
gethostnamadr.c
getifaddrs.3
getifaddrs.c
getifmaddrs.3
getifmaddrs.c
getipnodebyname.3
getnameinfo.3
getnameinfo.c
getnetbydns.c
getnetbyht.c
getnetbynis.c
getnetent.3
getnetnamadr.c
getproto.c
getprotoent.3
getprotoent.c
getprotoname.c
getservent.3
getservent.c
hesiod.3
hesiod.c
hosts
hosts.equiv
if_indextoname.3
if_indextoname.c libc: Shortcut if_indextoname() if index == 0 2020-04-23 21:16:51 +00:00
if_nameindex.c
if_nametoindex.c
inet6_opt_init.3
inet6_option_space.3
inet6_rth_space.3
inet6_rthdr_space.3
inet_net.3
inet.3
ip6opt.c
linkaddr.3
linkaddr.c
Makefile.inc
map_v4v6.c
name6.c
netdb_private.h
networks
nscache.c
nscachedcli.c
nsdispatch.3
nsdispatch.c
nslexer.l
nsparser.y
nss_backends.h
nss_compat.c
nsswitch.conf
ntoh.c
protocols
rcmd.3
rcmd.c
rcmdsh.3
rcmdsh.c
recv.c
res_config.h
resolver.3
rthdr.c
sctp_bindx.3
sctp_connectx.3
sctp_freepaddrs.3
sctp_getaddrlen.3
sctp_getassocid.3
sctp_getpaddrs.3
sctp_opt_info.3
sctp_recvmsg.3
sctp_send.3
sctp_sendmsg.3
sctp_sys_calls.c
send.c
sockatmark.3
sockatmark.c
sourcefilter.3
sourcefilter.c
Symbol.map
vars.c