Lines Matching full:sock_fd
177 static int sock_fd = -1; /* socket for doing interface ioctls */
313 sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
314 if (sock_fd < 0)
362 if (sock_fd >= 0)
363 close(sock_fd);
1166 if (ifunit >= 0 && ioctl(sock_fd, SIOCSIFMTU, (caddr_t) &ifr) < 0)
1181 if (ifunit >= 0 && ioctl(sock_fd, SIOCGIFMTU, (caddr_t) &ifr) < 0) {
1349 if (ioctl(sock_fd, SIOCGPPPSTATS, &req) < 0) {
1617 if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) {
1650 if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
1688 if (ioctl(sock_fd, SIOCSARP, (caddr_t)&arpreq) < 0) {
1729 if (ioctl(sock_fd, SIOCDARP, (caddr_t)&arpreq) < 0) {
1760 if (ioctl(sock_fd, SIOCGIFCONF, &ifc) < 0) {
1779 if (ioctl(sock_fd, SIOCGIFFLAGS, &ifreq) < 0)
1787 if (ioctl(sock_fd, SIOCGIFNETMASK, &ifreq) < 0)
1819 if (ioctl (sock_fd, SIOCGIFHWADDR, &bestifreq) < 0) {
1839 int ret, sock_fd;
1841 sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
1842 if (sock_fd < 0)
1846 ret = ioctl(sock_fd, SIOCGIFHWADDR, &ifreq);
1847 close(sock_fd);
1896 if (ioctl(sock_fd, SIOCGIFCONF, &ifc) < 0) {
1916 if (ioctl(sock_fd, SIOCGIFFLAGS, &ifreq) < 0)
1924 if (ioctl(sock_fd, SIOCGIFNETMASK, &ifreq) < 0)
2248 if (ioctl(sock_fd, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) {
2255 if (ioctl(sock_fd, SIOCSIFFLAGS, (caddr_t) &ifr) < 0) {
2280 if (ioctl(sock_fd, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) {
2288 if (ioctl(sock_fd, SIOCSIFFLAGS, (caddr_t) &ifr) < 0) {
2319 if (ioctl(sock_fd, SIOCSIFADDR, (caddr_t) &ifr) < 0) {
2333 if (ioctl(sock_fd, SIOCSIFDSTADDR, (caddr_t) &ifr) < 0) {
2346 if (ioctl(sock_fd, SIOCSIFNETMASK, (caddr_t) &ifr) < 0) {
2369 if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) {
2426 if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
2438 if (ioctl(sock_fd, SIOCSIFADDR, (caddr_t) &ifr) < 0) {