Lines Matching refs:udp_sock
169 int udp_sock; member
201 if (sendto(iapp->udp_sock, buf, (char *) (add + 1) - buf, 0, in iapp_send_add()
315 len = recvfrom(iapp->udp_sock, buf, sizeof(buf), 0, in iapp_receive_udp()
389 iapp->udp_sock = iapp->packet_sock = -1; in iapp_init()
395 iapp->udp_sock = socket(PF_INET, SOCK_DGRAM, 0); in iapp_init()
396 if (iapp->udp_sock < 0) { in iapp_init()
405 if (ioctl(iapp->udp_sock, SIOCGIFINDEX, &ifr) != 0) { in iapp_init()
413 if (ioctl(iapp->udp_sock, SIOCGIFADDR, &ifr) != 0) { in iapp_init()
428 if (ioctl(iapp->udp_sock, SIOCGIFBRDADDR, &ifr) != 0) { in iapp_init()
446 if (bind(iapp->udp_sock, (struct sockaddr *) &uaddr, in iapp_init()
458 if (setsockopt(iapp->udp_sock, SOL_IP, IP_ADD_MEMBERSHIP, &mreq, in iapp_init()
485 if (eloop_register_read_sock(iapp->udp_sock, iapp_receive_udp, in iapp_init()
510 if (iapp->udp_sock >= 0) { in iapp_deinit()
515 if (setsockopt(iapp->udp_sock, SOL_IP, IP_DROP_MEMBERSHIP, in iapp_deinit()
521 eloop_unregister_read_sock(iapp->udp_sock); in iapp_deinit()
522 close(iapp->udp_sock); in iapp_deinit()