Home
last modified time | relevance | path

Searched refs:ifc_ctl_sock (Results 1 – 1 of 1) sorted by relevance

/system/core/libnetutils/
Difc_utils.c53 static int ifc_ctl_sock = -1; variable
120 if (ifc_ctl_sock == -1) { in ifc_init()
121 ifc_ctl_sock = socket(AF_INET, SOCK_DGRAM, 0); in ifc_init()
122 if (ifc_ctl_sock < 0) { in ifc_init()
127 ret = ifc_ctl_sock < 0 ? -1 : 0; in ifc_init()
146 if (ifc_ctl_sock != -1) { in ifc_close()
147 (void)close(ifc_ctl_sock); in ifc_close()
148 ifc_ctl_sock = -1; in ifc_close()
173 r = ioctl(ifc_ctl_sock, SIOCGIFHWADDR, &ifr); in ifc_get_hwaddr()
186 r = ioctl(ifc_ctl_sock, SIOCGIFINDEX, &ifr); in ifc_get_ifindex()
[all …]