/tools/testing/selftests/net/ |
D | reuseport_dualstack.c | 39 case AF_INET: in build_rcv_fd() 41 addr4->sin_family = AF_INET; in build_rcv_fd() 78 saddr.sin_family = AF_INET; in send_from_v4() 82 daddr.sin_family = AF_INET; in send_from_v4() 86 fd = socket(AF_INET, proto, 0); in send_from_v4() 152 if (test_family != AF_INET) in test() 164 build_rcv_fd(AF_INET, SOCK_DGRAM, rcv_fds, 5); in main() 172 build_rcv_fd(AF_INET, SOCK_DGRAM, &(rcv_fds[5]), 5); in main() 181 build_rcv_fd(AF_INET, SOCK_DGRAM, rcv_fds, 16); in main() 189 build_rcv_fd(AF_INET, SOCK_DGRAM, &(rcv_fds[16]), 16); in main() [all …]
|
D | reuseport_bpf.c | 55 case AF_INET: in new_any_sockaddr() 57 addr4->sin_family = AF_INET; in new_any_sockaddr() 80 case AF_INET: in new_loopback_sockaddr() 395 fd1 = socket(AF_INET, SOCK_DGRAM, 0); in test_filter_without_bind() 398 fd2 = socket(AF_INET, SOCK_DGRAM, 0); in test_filter_without_bind() 467 .recv_family = AF_INET, in main() 468 .send_family = AF_INET, in main() 474 .recv_family = AF_INET, in main() 475 .send_family = AF_INET, in main() 481 .recv_family = AF_INET, in main() [all …]
|
D | socket.c | 28 { AF_INET, SOCK_STREAM, IPPROTO_TCP, 0, 1 }, 29 { AF_INET, SOCK_DGRAM, IPPROTO_TCP, -EPROTONOSUPPORT, 1 }, 30 { AF_INET, SOCK_DGRAM, IPPROTO_UDP, 0, 1 }, 31 { AF_INET, SOCK_STREAM, IPPROTO_UDP, -EPROTONOSUPPORT, 1 },
|
D | reuseport_addr_any.c | 45 case AF_INET: in build_rcv_fd() 111 case AF_INET: in connect_and_send() 112 saddr4.sin_family = AF_INET; in connect_and_send() 116 daddr4.sin_family = AF_INET; in connect_and_send() 233 build_rcv_fd(AF_INET, proto, rcv_fds, 2, NULL); in run_one_test() 236 build_rcv_fd(AF_INET, proto, rcv_fds + 5, 2, NULL); in run_one_test() 249 test_fd = socket(AF_INET, proto, 0); in test_proto() 261 run_one_test(AF_INET, AF_INET, proto, IP4_ADDR); in test_proto() 267 run_one_test(AF_INET, AF_INET6, proto, IP4_MAPPED6); in test_proto()
|
D | fin_ack_lat.c | 42 sock = socket(AF_INET, SOCK_STREAM, 0); in client() 55 addr.sin_family = AF_INET; in client() 58 if (inet_pton(AF_INET, "127.0.0.1", &addr.sin_addr) <= 0) in client() 121 sock = socket(AF_INET, SOCK_STREAM, 0); in main() 129 address.sin_family = AF_INET; in main()
|
D | reuseport_bpf_numa.c | 39 case AF_INET: in build_rcv_group() 41 addr4->sin_family = AF_INET; in build_rcv_group() 115 case AF_INET: in send_from_node() 117 saddr4->sin_family = AF_INET; in send_from_node() 122 daddr4->sin_family = AF_INET; in send_from_node() 243 test(rcv_fd, nodes, AF_INET, SOCK_DGRAM); in main() 249 test(rcv_fd, nodes, AF_INET, SOCK_STREAM); in main()
|
D | reuseport_bpf_cpu.c | 43 case AF_INET: in build_rcv_group() 45 addr4->sin_family = AF_INET; in build_rcv_group() 103 case AF_INET: in send_from_cpu() 105 saddr4->sin_family = AF_INET; in send_from_cpu() 110 daddr4->sin_family = AF_INET; in send_from_cpu() 244 test(rcv_fd, cpus, AF_INET, SOCK_DGRAM); in main() 250 test(rcv_fd, cpus, AF_INET, SOCK_STREAM); in main()
|
D | so_netns_cookie.c | 30 sock1 = socket(AF_INET, SOCK_STREAM, 0); in main() 44 sock2 = socket(AF_INET, SOCK_STREAM, 0); in main()
|
D | reuseaddr_conflict.c | 29 int family = ipv6 ? AF_INET6 : AF_INET; in open_port() 37 .sin_family = AF_INET, in open_port()
|
D | udpgso.c | 385 rt->rtm_family = is_ipv4 ? AF_INET : AF_INET6; in set_route_mtu() 512 addr->sa_family == AF_INET ? 4 : 6, in run_one() 533 mss = addr->sa_family == AF_INET ? CONST_MSS_V4 : CONST_MSS_V6; in run_one() 561 tests = addr->sa_family == AF_INET ? testcases_v4 : testcases_v6; in run_all() 592 set_pmtu_discover(fdt, addr->sa_family == AF_INET); in run_test() 601 set_route_mtu(CONST_MTU_TEST, addr->sa_family == AF_INET); in run_test() 606 val = get_path_mtu(fdt, addr->sa_family == AF_INET); in run_test() 623 addr.sin_family = AF_INET; in run_test_v4()
|
D | tcp_fastopen_backup_key.c | 101 case AF_INET: in build_rcv_fd() 154 case AF_INET: in connect_and_send() 155 saddr4.sin_family = AF_INET; in connect_and_send() 159 daddr4.sin_family = AF_INET; in connect_and_send() 331 run_one_test(AF_INET); in main()
|
D | psock_lib.h | 87 saddr.sin_family = AF_INET; in pair_udp_open() 92 daddr.sin_family = AF_INET; in pair_udp_open()
|
D | nettest.c | 215 if (sa->sa_family == AF_INET) { in log_address() 220 inet_ntop(AF_INET, &s->sin_addr, addrstr, in log_address() 302 .sin_family = AF_INET, in tcp_md5_remote() 311 case AF_INET: in tcp_md5_remote() 609 if (sa->sa_family == AF_INET) { in expected_addr_match() 616 inet_ntop(AF_INET, exp_in, in expected_addr_match() 728 if (family == AF_INET) { in convert_addr() 729 args->md5_prefix.v4.sin_family = AF_INET; in convert_addr() 756 case AF_INET: in convert_addr() 759 if (inet_pton(AF_INET, str, in) == 0) { in convert_addr() [all …]
|
/tools/testing/selftests/bpf/ |
D | test_lpm_map.c | 358 inet_pton(AF_INET, "192.168.0.0", key_ipv4->data); in test_lpm_ipaddr() 363 inet_pton(AF_INET, "192.168.0.0", key_ipv4->data); in test_lpm_ipaddr() 368 inet_pton(AF_INET, "192.168.128.0", key_ipv4->data); in test_lpm_ipaddr() 373 inet_pton(AF_INET, "192.168.1.0", key_ipv4->data); in test_lpm_ipaddr() 378 inet_pton(AF_INET, "192.168.0.0", key_ipv4->data); in test_lpm_ipaddr() 391 inet_pton(AF_INET, "192.168.128.23", key_ipv4->data); in test_lpm_ipaddr() 395 inet_pton(AF_INET, "192.168.0.1", key_ipv4->data); in test_lpm_ipaddr() 408 inet_pton(AF_INET, "10.0.0.1", key_ipv4->data); in test_lpm_ipaddr() 412 inet_pton(AF_INET, "11.11.11.11", key_ipv4->data); in test_lpm_ipaddr() 453 inet_pton(AF_INET, "192.168.0.0", key->data); in test_lpm_delete() [all …]
|
D | test_sock_addr.c | 114 AF_INET, 128 AF_INET, 142 AF_INET, 156 AF_INET, 184 AF_INET, 228 AF_INET, 242 AF_INET, 256 AF_INET, 270 AF_INET, 298 AF_INET, [all …]
|
D | test_sock.c | 124 AF_INET, 138 AF_INET, 208 AF_INET, 282 AF_INET, 296 AF_INET, 370 if (domain == AF_INET) { in bind_sock()
|
/tools/testing/selftests/bpf/prog_tests/ |
D | connect_force_port.c | 19 if (family == AF_INET) in verify_ports() 35 if (family == AF_INET) in verify_ports() 51 bool v4 = family == AF_INET; in run_test() 140 server_fd = start_server(AF_INET, SOCK_STREAM, NULL, 60123, 0); in test_connect_force_port() 143 CHECK_FAIL(run_test(cgroup_fd, server_fd, AF_INET, SOCK_STREAM)); in test_connect_force_port() 152 server_fd = start_server(AF_INET, SOCK_DGRAM, NULL, 60123, 0); in test_connect_force_port() 155 CHECK_FAIL(run_test(cgroup_fd, server_fd, AF_INET, SOCK_DGRAM)); in test_connect_force_port()
|
D | udp_limit.c | 34 fd1 = socket(AF_INET, SOCK_DGRAM, 0); in test_udp_limit() 38 fd2 = socket(AF_INET, SOCK_DGRAM, 0); in test_udp_limit() 46 fd1 = socket(AF_INET, SOCK_DGRAM, 0); in test_udp_limit()
|
D | sk_assign.c | 133 case AF_INET: in get_port() 223 case AF_INET: in prepare_addr() 260 .addr = (FAMILY == AF_INET) ? (struct sockaddr *)&addr4 \ 262 .len = (FAMILY == AF_INET) ? sizeof(addr4) : sizeof(addr6), \ 272 TEST("ipv4 tcp port redir", AF_INET, SOCK_STREAM, false), in test_sk_assign() 273 TEST("ipv4 tcp addr redir", AF_INET, SOCK_STREAM, true), in test_sk_assign() 276 TEST("ipv4 udp port redir", AF_INET, SOCK_DGRAM, false), in test_sk_assign() 277 TEST("ipv4 udp addr redir", AF_INET, SOCK_DGRAM, true), in test_sk_assign()
|
D | sockmap_ktls.c | 108 family == AF_INET ? "IPv4" : "IPv6", in run_tests() 120 run_tests(AF_INET, BPF_MAP_TYPE_SOCKMAP); in test_sockmap_ktls() 121 run_tests(AF_INET, BPF_MAP_TYPE_SOCKHASH); in test_sockmap_ktls()
|
D | bind_perm.c | 33 if (family == AF_INET) { in try_bind() 110 try_bind(AF_INET, 110, EACCES); in test_bind_perm() 113 try_bind(AF_INET, 111, 0); in test_bind_perm()
|
D | cgroup_v1v2.c | 52 server_fd = start_server(AF_INET, SOCK_STREAM, NULL, port, 0); in test_cgroup_v1v2() 67 server_fd = start_server(AF_INET, SOCK_STREAM, NULL, port, 0); in test_cgroup_v1v2()
|
D | xdp.c | 7 struct vip key4 = {.protocol = 6, .family = AF_INET}; in test_xdp() 9 struct iptnl_info value4 = {.family = AF_INET}; in test_xdp()
|
D | probe_user.c | 40 in->sin_family = AF_INET; in test_probe_user() 45 sock_fd = socket(AF_INET, SOCK_STREAM, 0); in test_probe_user()
|
D | migrate_reuseport.c | 64 .family = AF_INET, 72 .family = AF_INET, 80 .family = AF_INET, 88 .family = AF_INET, 188 if (test_case->family == AF_INET) in drop_ack() 224 test_case->family == AF_INET ? "127.0.0.1" : "::1", 0, in start_servers()
|