Searched refs:ctl_sock (Results 1 – 2 of 2) sorted by relevance
43 int ctl_sock; in if_nametoindex() local51 if ((ctl_sock = socket(AF_INET, SOCK_DGRAM, 0)) >= 0) { in if_nametoindex()52 if (ioctl(ctl_sock, SIOCGIFINDEX, &ifr) >= 0) { in if_nametoindex()55 close(ctl_sock); in if_nametoindex()
44 int ctl_sock; in if_indextoname() local51 if ((ctl_sock = socket(AF_INET, SOCK_DGRAM, 0)) >= 0) { in if_indextoname()52 if (ioctl(ctl_sock, SIOCGIFNAME, &ifr) >= 0) { in if_indextoname()59 close(ctl_sock); in if_indextoname()