Lines Matching defs:udp_sock
173 int udp_sock;
205 if (sendto(iapp->udp_sock, buf, (char *) (add + 1) - buf, 0,
319 len = recvfrom(iapp->udp_sock, buf, sizeof(buf), 0,
393 iapp->udp_sock = iapp->packet_sock = -1;
399 iapp->udp_sock = socket(PF_INET, SOCK_DGRAM, 0);
400 if (iapp->udp_sock < 0) {
409 if (ioctl(iapp->udp_sock, SIOCGIFINDEX, &ifr) != 0) {
417 if (ioctl(iapp->udp_sock, SIOCGIFADDR, &ifr) != 0) {
432 if (ioctl(iapp->udp_sock, SIOCGIFBRDADDR, &ifr) != 0) {
450 if (bind(iapp->udp_sock, (struct sockaddr *) &uaddr,
462 if (setsockopt(iapp->udp_sock, SOL_IP, IP_ADD_MEMBERSHIP, &mreq,
489 if (eloop_register_read_sock(iapp->udp_sock, iapp_receive_udp,
514 if (iapp->udp_sock >= 0) {
519 if (setsockopt(iapp->udp_sock, SOL_IP, IP_DROP_MEMBERSHIP,
525 eloop_unregister_read_sock(iapp->udp_sock);
526 close(iapp->udp_sock);