Home
last modified time | relevance | path

Searched refs:addr4 (Results 1 – 23 of 23) sorted by relevance

/tools/testing/selftests/bpf/
Dtest_tcp_check_syncookie_user.c204 struct sockaddr_in addr4; in main() local
223 memset(&addr4, 0, sizeof(addr4)); in main()
224 addr4.sin_family = AF_INET; in main()
225 addr4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); in main()
226 addr4.sin_port = 0; in main()
233 server = start_server((const struct sockaddr *)&addr4, sizeof(addr4)); in main()
Dtest_sock.c359 struct sockaddr_in *addr4; in bind_sock() local
372 addr4 = (struct sockaddr_in *)&addr; in bind_sock()
373 addr4->sin_family = domain; in bind_sock()
374 addr4->sin_port = htons(port); in bind_sock()
375 if (inet_pton(domain, ip, (void *)&addr4->sin_addr) != 1) in bind_sock()
Dtest_sock_addr.c607 struct sockaddr_in *addr4; in mk_sockaddr() local
619 addr4 = (struct sockaddr_in *)addr; in mk_sockaddr()
620 addr4->sin_family = domain; in mk_sockaddr()
621 addr4->sin_port = htons(port); in mk_sockaddr()
622 if (inet_pton(domain, ip, (void *)&addr4->sin_addr) != 1) { in mk_sockaddr()
Dtest_flow_dissector.c83 #define INIT_ADDR4(name, addr4, port) \ argument
87 .sin_addr.s_addr = __constant_htonl(addr4), \
/tools/testing/selftests/bpf/prog_tests/
Dsk_assign.c219 struct sockaddr_in *addr4; in prepare_addr() local
224 addr4 = (struct sockaddr_in *)addr; in prepare_addr()
225 memset(addr4, 0, sizeof(*addr4)); in prepare_addr()
226 addr4->sin_family = family; in prepare_addr()
227 addr4->sin_port = htons(port); in prepare_addr()
229 addr4->sin_addr.s_addr = htonl(TEST_DADDR); in prepare_addr()
231 addr4->sin_addr.s_addr = htonl(INADDR_LOOPBACK); in prepare_addr()
260 .addr = (FAMILY == AF_INET) ? (struct sockaddr *)&addr4 \
262 .len = (FAMILY == AF_INET) ? sizeof(addr4) : sizeof(addr6), \
269 struct sockaddr_in addr4; in test_sk_assign() local
Dcls_redirect.c141 struct sockaddr_in *addr4; in prepare_addr() local
146 addr4 = (struct sockaddr_in *)addr; in prepare_addr()
147 memset(addr4, 0, sizeof(*addr4)); in prepare_addr()
148 addr4->sin_family = family; in prepare_addr()
149 addr4->sin_addr.s_addr = htonl(INADDR_LOOPBACK); in prepare_addr()
150 return sizeof(*addr4); in prepare_addr()
Dsockmap_listen.c234 struct sockaddr_in *addr4 = memset(ss, 0, sizeof(*ss)); in init_addr_loopback4() local
236 addr4->sin_family = AF_INET; in init_addr_loopback4()
237 addr4->sin_port = 0; in init_addr_loopback4()
238 addr4->sin_addr.s_addr = htonl(INADDR_LOOPBACK); in init_addr_loopback4()
239 *len = sizeof(*addr4); in init_addr_loopback4()
/tools/testing/selftests/net/
Dtcp_inq.c39 struct sockaddr_in *addr4 = (void *) sockaddr; in setup_loopback_addr() local
43 memset(addr4, 0, sizeof(*addr4)); in setup_loopback_addr()
44 addr4->sin_family = AF_INET; in setup_loopback_addr()
45 addr4->sin_addr.s_addr = htonl(INADDR_LOOPBACK); in setup_loopback_addr()
46 addr4->sin_port = htons(port); in setup_loopback_addr()
Dreuseaddr_conflict.c36 struct sockaddr_in addr4 = { in open_port() local
47 addr = (struct sockaddr*)&addr4; in open_port()
48 addrlen = sizeof(addr4); in open_port()
Dreuseport_addr_any.c37 struct sockaddr_in addr4 = {0}; in build_rcv_fd() local
46 addr4.sin_family = family; in build_rcv_fd()
48 addr4.sin_addr.s_addr = htonl(INADDR_ANY); in build_rcv_fd()
49 else if (!inet_pton(family, addr_str, &addr4.sin_addr.s_addr)) in build_rcv_fd()
51 addr4.sin_port = htons(PORT); in build_rcv_fd()
52 sz = sizeof(addr4); in build_rcv_fd()
53 addr = (struct sockaddr *)&addr4; in build_rcv_fd()
Dreuseport_dualstack.c34 struct sockaddr_in *addr4; in build_rcv_fd() local
40 addr4 = (struct sockaddr_in *)&addr; in build_rcv_fd()
41 addr4->sin_family = AF_INET; in build_rcv_fd()
42 addr4->sin_addr.s_addr = htonl(INADDR_ANY); in build_rcv_fd()
43 addr4->sin_port = htons(PORT); in build_rcv_fd()
Dreuseport_bpf_numa.c33 struct sockaddr_in *addr4; in build_rcv_group() local
40 addr4 = (struct sockaddr_in *)&addr; in build_rcv_group()
41 addr4->sin_family = AF_INET; in build_rcv_group()
42 addr4->sin_addr.s_addr = htonl(INADDR_ANY); in build_rcv_group()
43 addr4->sin_port = htons(PORT); in build_rcv_group()
Dtcp_fastopen_backup_key.c93 struct sockaddr_in addr4 = {0}; in build_rcv_fd() local
102 addr4.sin_family = family; in build_rcv_fd()
103 addr4.sin_addr.s_addr = htonl(INADDR_ANY); in build_rcv_fd()
104 addr4.sin_port = htons(PORT); in build_rcv_fd()
105 sz = sizeof(addr4); in build_rcv_fd()
106 addr = (struct sockaddr *)&addr4; in build_rcv_fd()
Dso_txtime.c380 struct sockaddr_in addr4 = {0}; in main() local
382 addr4.sin_family = AF_INET; in main()
383 addr4.sin_port = htons(cfg_port); in main()
384 addr4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); in main()
389 do_test((void *)&addr4, sizeof(addr4)); in main()
Dreuseport_bpf_cpu.c37 struct sockaddr_in *addr4; in build_rcv_group() local
44 addr4 = (struct sockaddr_in *)&addr; in build_rcv_group()
45 addr4->sin_family = AF_INET; in build_rcv_group()
46 addr4->sin_addr.s_addr = htonl(INADDR_ANY); in build_rcv_group()
47 addr4->sin_port = htons(PORT); in build_rcv_group()
Dtcp_mmap.c285 struct sockaddr_in *addr4 = (void *) sockaddr; in setup_sockaddr() local
289 memset(addr4, 0, sizeof(*addr4)); in setup_sockaddr()
290 addr4->sin_family = AF_INET; in setup_sockaddr()
291 addr4->sin_port = htons(cfg_port); in setup_sockaddr()
293 inet_pton(AF_INET, str_addr, &(addr4->sin_addr)) != 1) in setup_sockaddr()
Drxtimestamp.c282 struct sockaddr_in addr4; in run_test_case() member
293 addr.addr4.sin_family = AF_INET; in run_test_case()
294 addr.addr4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); in run_test_case()
295 addr.addr4.sin_port = htons(port); in run_test_case()
296 addr_size = sizeof(addr.addr4); in run_test_case()
Dudpgso_bench_rx.c64 struct sockaddr_in *addr4 = (void *) sockaddr; in setup_sockaddr() local
68 addr4->sin_family = AF_INET; in setup_sockaddr()
69 addr4->sin_port = htons(cfg_port); in setup_sockaddr()
70 if (inet_pton(AF_INET, str_addr, &(addr4->sin_addr)) != 1) in setup_sockaddr()
Dreuseport_bpf.c48 struct sockaddr_in *addr4; in new_any_sockaddr() local
56 addr4 = (struct sockaddr_in *)addr; in new_any_sockaddr()
57 addr4->sin_family = AF_INET; in new_any_sockaddr()
58 addr4->sin_addr.s_addr = htonl(INADDR_ANY); in new_any_sockaddr()
59 addr4->sin_port = htons(port); in new_any_sockaddr()
76 struct sockaddr_in *addr4; in new_loopback_sockaddr() local
81 addr4 = (struct sockaddr_in *)addr; in new_loopback_sockaddr()
82 addr4->sin_addr.s_addr = htonl(INADDR_LOOPBACK); in new_loopback_sockaddr()
Dmsg_zerocopy.c298 struct sockaddr_in *addr4 = (void *) sockaddr; in setup_sockaddr() local
302 memset(addr4, 0, sizeof(*addr4)); in setup_sockaddr()
303 addr4->sin_family = AF_INET; in setup_sockaddr()
304 addr4->sin_port = htons(cfg_port); in setup_sockaddr()
306 inet_pton(AF_INET, str_addr, &(addr4->sin_addr)) != 1) in setup_sockaddr()
Dudpgso.c73 const struct in_addr addr4 = { .s_addr = __constant_htonl(INADDR_LOOPBACK + 2) }; variable
371 alen = is_ipv4 ? sizeof(addr4) : sizeof(addr6); in set_route_mtu()
397 memcpy(RTA_DATA(rta), &addr4, alen); in set_route_mtu()
625 addr.sin_addr = addr4; in run_test_v4()
Dudpgso_bench_tx.c119 struct sockaddr_in *addr4 = (void *) sockaddr; in setup_sockaddr() local
123 addr4->sin_family = AF_INET; in setup_sockaddr()
124 addr4->sin_port = htons(cfg_port); in setup_sockaddr()
125 if (inet_pton(AF_INET, str_addr, &(addr4->sin_addr)) != 1) in setup_sockaddr()
Dip_defrag.c26 const struct in_addr addr4 = { .s_addr = __constant_htonl(INADDR_LOOPBACK + 2) }; variable
240 iphdr->ip_dst = addr4; in send_udp_frags()
415 addr.sin_addr = addr4; in run_test_v4()