Home
last modified time | relevance | path

Searched refs:udp_sock (Results 1 – 4 of 4) sorted by relevance

/external/wpa_supplicant_8/src/ap/
Diapp.c169 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()
390 iapp->udp_sock = iapp->packet_sock = -1; in iapp_init()
396 iapp->udp_sock = socket(PF_INET, SOCK_DGRAM, 0); in iapp_init()
397 if (iapp->udp_sock < 0) { in iapp_init()
406 if (ioctl(iapp->udp_sock, SIOCGIFINDEX, &ifr) != 0) { in iapp_init()
414 if (ioctl(iapp->udp_sock, SIOCGIFADDR, &ifr) != 0) { in iapp_init()
429 if (ioctl(iapp->udp_sock, SIOCGIFBRDADDR, &ifr) != 0) { in iapp_init()
448 if (setsockopt(iapp->udp_sock, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, in iapp_init()
[all …]
/external/honggfuzz/examples/linux_kernel_ip/
Dtun.c88 int udp_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in main() local
89 if (udp_sock == -1) { in main()
106 if (setsockopt(udp_sock, SOL_SOCKET, SO_NO_CHECK, (void*)&disable, sizeof(disable)) == -1) { in main()
149 if (bind(udp_sock, (struct sockaddr*)&addr, sizeof(addr)) == -1) { in main()
164 if (fcntl(udp_sock, F_SETFL, O_NONBLOCK | O_RDWR) == -1) { in main()
228 … if (recvfrom(udp_sock, b, sizeof(b), MSG_DONTWAIT, (struct sockaddr*)&addr, &slen) > 0) { in main()
229 sendto(udp_sock, b, 1, MSG_NOSIGNAL | MSG_DONTWAIT, (struct sockaddr*)&addr, slen); in main()
/external/iproute2/misc/
Darpd.c62 int udp_sock = -1; variable
196 if (ioctl(udp_sock, SIOCGIFNAME, &ifr)) in send_probe()
198 if (ioctl(udp_sock, SIOCGIFHWADDR, &ifr)) in send_probe()
202 if (setsockopt(udp_sock, SOL_SOCKET, SO_BINDTODEVICE, ifr.ifr_name, strlen(ifr.ifr_name)+1) < 0) in send_probe()
205 if (connect(udp_sock, (struct sockaddr *)&dst, sizeof(dst)) < 0) in send_probe()
208 if (getsockname(udp_sock, (struct sockaddr *)&dst, &len) < 0) in send_probe()
655 if ((udp_sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { in main()
667 if (ioctl(udp_sock, SIOCGIFINDEX, &ifr)) { in main()
/external/linux-kselftest/tools/testing/selftests/net/
Dpsock_tpacket.c240 int udp_sock[2]; in walk_v1_v2_rx() local
246 pair_udp_open(udp_sock, PORT_BASE); in walk_v1_v2_rx()
253 pair_udp_send(udp_sock, NUM_PACKETS); in walk_v1_v2_rx()
285 pair_udp_close(udp_sock); in walk_v1_v2_rx()
604 int udp_sock[2]; in walk_v3_rx() local
608 pair_udp_open(udp_sock, PORT_BASE); in walk_v3_rx()
615 pair_udp_send(udp_sock, NUM_PACKETS); in walk_v3_rx()
629 pair_udp_close(udp_sock); in walk_v3_rx()