Lines Matching refs:ud
146 struct ud { struct
155 static struct ud *returned_ud; argument
163 struct ud *ud = (struct ud *)user_data; in test_ok() local
167 if (!ud) { in test_ok()
170 DBG("Test %s failed.", ud->test); in test_ok()
236 struct ud *ud, in send_ipv6_udp_msg() argument
271 if (ud != returned_ud && !expect_failure) { in send_ipv6_udp_msg()
273 returned_ud, ud); in send_ipv6_udp_msg()
285 struct ud *ud, in send_ipv6_udp_long_msg() argument
339 if (ud != returned_ud && !expect_failure) { in send_ipv6_udp_long_msg()
341 returned_ud, ud); in send_ipv6_udp_long_msg()
353 struct ud *ud, in send_ipv4_udp_msg() argument
388 if (ud != returned_ud && !expect_failure) { in send_ipv4_udp_msg()
390 returned_ud, ud); in send_ipv4_udp_msg()
436 struct ud *ud; in test_udp() local
498 static struct ud user_data; \ in test_udp()
538 #define UNREGISTER(ud) \ in test_udp() argument
539 ret = net_udp_unregister(ud->handle); \ in test_udp()
541 printk("UDP unregister %p failed (%d)\n", ud->handle, \ in test_udp()
546 #define TEST_IPV6_OK(ud, raddr, laddr, rport, lport) \ in test_udp() argument
547 st = send_ipv6_udp_msg(iface, raddr, laddr, rport, lport, ud, \ in test_udp()
551 ud->test); \ in test_udp()
555 #define TEST_IPV6_LONG_OK(ud, raddr, laddr, rport, lport) \ in test_udp() argument
556 st = send_ipv6_udp_long_msg(iface, raddr, laddr, rport, lport, ud, \ in test_udp()
560 ud->test); \ in test_udp()
564 #define TEST_IPV4_OK(ud, raddr, laddr, rport, lport) \ in test_udp() argument
565 st = send_ipv4_udp_msg(iface, raddr, laddr, rport, lport, ud, \ in test_udp()
569 ud->test); \ in test_udp()
573 #define TEST_IPV6_FAIL(ud, raddr, laddr, rport, lport) \ in test_udp() argument
574 st = send_ipv6_udp_msg(iface, raddr, laddr, rport, lport, ud, \ in test_udp()
578 ud->test); \ in test_udp()
582 #define TEST_IPV4_FAIL(ud, raddr, laddr, rport, lport) \ in test_udp() argument
583 st = send_ipv4_udp_msg(iface, raddr, laddr, rport, lport, ud, \ in test_udp()
587 ud->test); \ in test_udp()
591 ud = REGISTER(AF_INET6, &any_addr6, &any_addr6, 1234, 4242); in test_udp()
592 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
593 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
594 TEST_IPV6_LONG_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
595 TEST_IPV6_LONG_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
596 TEST_IPV6_FAIL(ud, &in6addr_peer, &in6addr_my, 1234, 61400); in test_udp()
597 TEST_IPV6_FAIL(ud, &in6addr_peer, &in6addr_my, 1234, 61400); in test_udp()
598 UNREGISTER(ud); in test_udp()
600 ud = REGISTER(AF_INET, &any_addr4, &any_addr4, 1234, 4242); in test_udp()
601 TEST_IPV4_OK(ud, &in4addr_peer, &in4addr_my, 1234, 4242); in test_udp()
602 TEST_IPV4_OK(ud, &in4addr_peer, &in4addr_my, 1234, 4242); in test_udp()
603 TEST_IPV4_FAIL(ud, &in4addr_peer, &in4addr_my, 1234, 4325); in test_udp()
604 TEST_IPV4_FAIL(ud, &in4addr_peer, &in4addr_my, 1234, 4325); in test_udp()
605 UNREGISTER(ud); in test_udp()
607 ud = REGISTER(AF_INET6, &any_addr6, NULL, 1234, 4242); in test_udp()
608 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
609 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
610 TEST_IPV6_FAIL(ud, &in6addr_peer, &in6addr_my, 1234, 61400); in test_udp()
611 TEST_IPV6_FAIL(ud, &in6addr_peer, &in6addr_my, 1234, 61400); in test_udp()
612 UNREGISTER(ud); in test_udp()
614 ud = REGISTER(AF_INET6, NULL, &any_addr6, 1234, 4242); in test_udp()
615 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
616 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
617 TEST_IPV6_LONG_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
618 TEST_IPV6_LONG_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
619 TEST_IPV6_FAIL(ud, &in6addr_peer, &in6addr_my, 1234, 61400); in test_udp()
620 TEST_IPV6_FAIL(ud, &in6addr_peer, &in6addr_my, 1234, 61400); in test_udp()
621 UNREGISTER(ud); in test_udp()
623 ud = REGISTER(AF_INET6, &peer_addr6, &my_addr6, 1234, 4242); in test_udp()
624 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 4242); in test_udp()
625 TEST_IPV6_FAIL(ud, &in6addr_peer, &in6addr_my, 1234, 4243); in test_udp()
627 ud = REGISTER(AF_INET, &peer_addr4, &my_addr4, 1234, 4242); in test_udp()
628 TEST_IPV4_OK(ud, &in4addr_peer, &in4addr_my, 1234, 4242); in test_udp()
629 TEST_IPV4_FAIL(ud, &in4addr_peer, &in4addr_my, 1234, 4243); in test_udp()
631 ud = REGISTER(AF_UNSPEC, NULL, NULL, 1234, 42423); in test_udp()
632 TEST_IPV4_OK(ud, &in4addr_peer, &in4addr_my, 1234, 42423); in test_udp()
633 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 42423); in test_udp()
635 ud = REGISTER(AF_UNSPEC, NULL, NULL, 1234, 0); in test_udp()
636 TEST_IPV4_OK(ud, &in4addr_peer, &in4addr_my, 1234, 42422); in test_udp()
637 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 42422); in test_udp()
638 TEST_IPV4_OK(ud, &in4addr_peer, &in4addr_my, 1234, 42422); in test_udp()
639 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 1234, 42422); in test_udp()
641 TEST_IPV4_FAIL(ud, &in4addr_peer, &in4addr_my, 12345, 42421); in test_udp()
642 TEST_IPV6_FAIL(ud, &in6addr_peer, &in6addr_my, 12345, 42421); in test_udp()
644 ud = REGISTER(AF_UNSPEC, NULL, NULL, 0, 0); in test_udp()
645 TEST_IPV4_OK(ud, &in4addr_peer, &in4addr_my, 12345, 42421); in test_udp()
646 TEST_IPV6_OK(ud, &in6addr_peer, &in6addr_my, 12345, 42421); in test_udp()
647 TEST_IPV6_LONG_OK(ud, &in6addr_peer, &in6addr_my, 12345, 42421); in test_udp()