Home
last modified time | relevance | path

Searched refs:AF_INET (Results 1 – 25 of 89) sorted by relevance

1234

/tools/testing/selftests/net/
Dreuseport_dualstack.c39 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 …]
Dreuseport_bpf.c55 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 …]
Dsocket.c28 { 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 },
Dreuseport_addr_any.c45 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()
Dfin_ack_lat.c42 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()
Dreuseport_bpf_numa.c39 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()
Dreuseport_bpf_cpu.c43 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()
Dso_netns_cookie.c30 sock1 = socket(AF_INET, SOCK_STREAM, 0); in main()
44 sock2 = socket(AF_INET, SOCK_STREAM, 0); in main()
Dreuseaddr_conflict.c29 int family = ipv6 ? AF_INET6 : AF_INET; in open_port()
37 .sin_family = AF_INET, in open_port()
Dudpgso.c385 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()
Dtcp_fastopen_backup_key.c101 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()
Dpsock_lib.h87 saddr.sin_family = AF_INET; in pair_udp_open()
92 daddr.sin_family = AF_INET; in pair_udp_open()
Dnettest.c215 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/
Dtest_lpm_map.c358 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 …]
Dtest_sock_addr.c114 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 …]
Dtest_sock.c124 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/
Dconnect_force_port.c19 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()
Dudp_limit.c34 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()
Dsk_assign.c133 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()
Dsockmap_ktls.c108 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()
Dbind_perm.c33 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()
Dcgroup_v1v2.c52 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()
Dxdp.c7 struct vip key4 = {.protocol = 6, .family = AF_INET}; in test_xdp()
9 struct iptnl_info value4 = {.family = AF_INET}; in test_xdp()
Dprobe_user.c40 in->sin_family = AF_INET; in test_probe_user()
45 sock_fd = socket(AF_INET, SOCK_STREAM, 0); in test_probe_user()
Dmigrate_reuseport.c64 .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()

1234