Lines Matching refs:probe_fd
319 int probe_fd = socket(AF_INET, SOCK_DGRAM, 0); in main() local
321 if (probe_fd < 0) { in main()
333 rc = setsockopt(probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device, strlen(device)+1); in main()
339 if (ioctl(probe_fd, SIOCGIFINDEX, &ifr) < 0) { in main()
345 if (setsockopt(probe_fd, SOL_IP, IP_MULTICAST_IF, &imr, sizeof(imr)) == -1) { in main()
357 setsockopt(probe_fd, IPPROTO_IP, IP_TOS, (char *)&settos, sizeof(int)) < 0) in main()
364 sock_setmark(probe_fd); in main()
366 if (connect(probe_fd, (struct sockaddr*)&dst, sizeof(dst)) == -1) { in main()
373 if (setsockopt(probe_fd, SOL_SOCKET, SO_BROADCAST, in main()
378 if (connect(probe_fd, (struct sockaddr*)&dst, sizeof(dst)) == -1) { in main()
388 if (getsockname(probe_fd, (struct sockaddr*)&source, &alen) == -1) { in main()
417 close(probe_fd); in main()