Lines Matching refs:sock
899 int sock = -1;907 sock = socket(AF_INET, SOCK_DGRAM, 0);908 if (sock < 0)912 if (ioctl(sock, SIOCGIFADDR, &req) < 0) {924 if (ioctl(sock, SIOCGIFHWADDR, &req) < 0) {939 close(sock);943 if (sock >= 0)944 close(sock);