Lines Matching defs:sock
1244 int sock;
1264 sock = socket(AF_INET, SOCK_DGRAM, 0);
1265 if (sock == -1) {
1274 if (ioctl(sock, SIOCGIFMEDIA, &req) < 0) {
1291 if (ioctl(sock, SIOCSIFMEDIA,
1300 close(sock);
2267 int sock;
2274 sock = socket(AF_INET, SOCK_DGRAM, 0);
2275 if (sock == -1) {
2287 if (ioctl(sock, SIOCGIFMEDIA, &req) < 0) {
2297 close(sock);
2304 close(sock);
2310 close(sock);
2318 close(sock);
2330 close(sock);
2334 if (ioctl(sock, SIOCGIFMEDIA, &req) < 0) {
2338 close(sock);
2363 close(sock);
2390 close(sock);
2397 if (ioctl(sock, SIOCSIFMEDIA, &ifr) == -1) {
2400 close(sock);