/tools/testing/selftests/bpf/ |
D | test_tcp_check_syncookie_user.c | 204 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()
|
D | test_sock.c | 359 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()
|
D | test_sock_addr.c | 607 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()
|
D | test_flow_dissector.c | 83 #define INIT_ADDR4(name, addr4, port) \ argument 87 .sin_addr.s_addr = __constant_htonl(addr4), \
|
/tools/testing/selftests/bpf/prog_tests/ |
D | sk_assign.c | 219 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
|
D | cls_redirect.c | 141 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()
|
D | sockmap_listen.c | 234 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/ |
D | tcp_inq.c | 39 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()
|
D | reuseaddr_conflict.c | 36 struct sockaddr_in addr4 = { in open_port() local 47 addr = (struct sockaddr*)&addr4; in open_port() 48 addrlen = sizeof(addr4); in open_port()
|
D | reuseport_addr_any.c | 37 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()
|
D | reuseport_dualstack.c | 34 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()
|
D | reuseport_bpf_numa.c | 33 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()
|
D | tcp_fastopen_backup_key.c | 93 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()
|
D | so_txtime.c | 380 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()
|
D | reuseport_bpf_cpu.c | 37 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()
|
D | tcp_mmap.c | 285 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()
|
D | rxtimestamp.c | 282 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()
|
D | udpgso_bench_rx.c | 64 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()
|
D | reuseport_bpf.c | 48 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()
|
D | msg_zerocopy.c | 298 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()
|
D | udpgso.c | 73 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()
|
D | udpgso_bench_tx.c | 119 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()
|
D | ip_defrag.c | 26 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()
|