Home
last modified time | relevance | path

Searched refs:sockaddr (Results 1 – 25 of 77) sorted by relevance

1234

/tools/perf/trace/beauty/
Dsockaddr.c13 static size_t af_inet__scnprintf(struct sockaddr *sa, char *bf, size_t size) in af_inet__scnprintf()
21 static size_t af_inet6__scnprintf(struct sockaddr *sa, char *bf, size_t size) in af_inet6__scnprintf()
36 static size_t af_local__scnprintf(struct sockaddr *sa, char *bf, size_t size) in af_local__scnprintf()
42 static size_t (*af_scnprintfs[])(struct sockaddr *sa, char *bf, size_t size) = {
50 struct sockaddr *sa = (struct sockaddr *)arg->augmented.args; in syscall_arg__scnprintf_augmented_sockaddr()
DBuild16 perf-y += sockaddr.o
/tools/perf/trace/beauty/include/linux/
Dsocket.h32 struct sockaddr { struct
403 struct sockaddr __user *uaddr,
410 struct sockaddr __user **uaddr,
414 struct sockaddr __user **save_addr,
419 unsigned int flags, struct sockaddr __user *addr,
422 unsigned int flags, struct sockaddr __user *addr,
425 struct sockaddr __user *upeer_sockaddr,
429 struct sockaddr __user *upeer_sockaddr,
431 extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
434 extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen);
[all …]
/tools/testing/selftests/bpf/
Dnetwork_helpers.c69 static int __start_server(int type, const struct sockaddr *addr, in __start_server()
118 return __start_server(type, (struct sockaddr *)&addr, in start_server()
140 fds[0] = __start_server(type, (struct sockaddr *)&addr, addrlen, in start_reuseport_server()
146 if (getsockname(fds[0], (struct sockaddr *)&addr, &addrlen)) in start_reuseport_server()
150 fds[nr_fds] = __start_server(type, (struct sockaddr *)&addr, in start_reuseport_server()
180 if (getsockname(server_fd, (struct sockaddr *)&addr, &addrlen)) { in fastopen_connect()
195 ret = sendto(fd, data, data_len, MSG_FASTOPEN, (struct sockaddr *)&addr, in fastopen_connect()
216 ret = connect(fd, (const struct sockaddr *)addr, addrlen); in connect_fd_to_addr()
255 if (getsockname(server_fd, (struct sockaddr *)&addr, &addrlen)) { in connect_to_fd_opts()
302 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_fd_to_fd()
Dtest_tcp_check_syncookie_user.c21 static int start_server(const struct sockaddr *addr, socklen_t len) in start_server()
56 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_to_server()
67 if (connect(fd, (const struct sockaddr *)&addr, len) == -1) { in connect_to_server()
233 server = start_server((const struct sockaddr *)&addr4, sizeof(addr4)); in main()
237 server_v6 = start_server((const struct sockaddr *)&addr6, in main()
Dtest_sock_addr.c60 typedef int (*info_fn)(int, struct sockaddr *, socklen_t *);
608 struct sockaddr *addr, socklen_t addr_len) in mk_sockaddr()
750 (struct sockaddr *)&dst4_rw_addr, in sendmsg4_rw_asm_prog_load()
813 (struct sockaddr *)&dst6_rw_addr, in sendmsg6_rw_dst_asm_prog_load()
911 if (fn(sock1, (struct sockaddr *)&addr1, (socklen_t *)&len1) != 0) in cmp_sock_addr()
943 if (bind(fd, (const struct sockaddr *)addr, addr_len) == -1) { in start_server()
982 if (connect(fd, (const struct sockaddr *)addr, addr_len) == -1) { in connect_to_server()
1142 (struct sockaddr *)expected_addr, addr_len) == -1) in init_addrs()
1146 (struct sockaddr *)requested_addr, addr_len) == -1) in init_addrs()
1151 (struct sockaddr *)expected_src_addr, addr_len) == -1) in init_addrs()
/tools/testing/selftests/bpf/prog_tests/
Dsk_assign.c77 start_server(const struct sockaddr *addr, socklen_t len, int type) in start_server()
101 connect_to_server(const struct sockaddr *addr, socklen_t len, int type) in connect_to_server()
129 if (CHECK_FAIL(getsockname(fd, (struct sockaddr *)&ss, &slen))) in get_port()
157 run_test(int server_fd, const struct sockaddr *addr, socklen_t len, int type) in run_test()
217 prepare_addr(struct sockaddr *addr, int family, __u16 port, bool rewrite_addr) in prepare_addr()
250 struct sockaddr *addr;
260 .addr = (FAMILY == AF_INET) ? (struct sockaddr *)&addr4 \
261 : (struct sockaddr *)&addr6, \
305 const struct sockaddr *addr; in test_sk_assign()
312 addr = (const struct sockaddr *)test->addr; in test_sk_assign()
Dsockmap_ktls.c33 struct sockaddr unspec = { AF_UNSPEC }; in disconnect()
49 err = getsockname(srv, (struct sockaddr *)&addr, &len); in test_sockmap_ktls_disconnect_after_delete()
61 err = connect(cli, (struct sockaddr *)&addr, len); in test_sockmap_ktls_disconnect_after_delete()
Dsockmap_listen.c214 static int accept_timeout(int fd, struct sockaddr *addr, socklen_t *len, in accept_timeout()
267 static inline struct sockaddr *sockaddr(struct sockaddr_storage *ss) in sockaddr() function
269 return (struct sockaddr *)ss; in sockaddr()
302 err = xbind(s, sockaddr(&addr), len); in socket_loopback_reuseport()
376 err = xbind(s, sockaddr(&addr), len); in test_insert_bound()
567 err = xgetsockname(s, sockaddr(&addr), &len); in test_destroy_orphan_child()
579 xconnect(c, sockaddr(&addr), len); in test_destroy_orphan_child()
601 err = xgetsockname(s, sockaddr(&addr), &len); in test_clone_after_delete()
614 xconnect(c, sockaddr(&addr), len); in test_clone_after_delete()
637 err = xgetsockname(s, sockaddr(&addr), &len); in test_accept_after_delete()
[all …]
Dsockopt_inherit.c22 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_to_server()
27 if (connect(fd, (const struct sockaddr *)&addr, len) < 0) { in connect_to_server()
88 client_fd = accept(fd, (struct sockaddr *)&addr, &len); in server_thread()
130 if (bind(fd, (const struct sockaddr *)&addr, sizeof(addr)) < 0) { in start_server()
Dcls_redirect.c37 static int start_server(const struct sockaddr *addr, socklen_t len, int type) in start_server()
54 static int connect_to_server(const struct sockaddr *addr, socklen_t len, in connect_to_server()
70 static bool fill_addr_port(const struct sockaddr *sa, struct addr_port *ap) in fill_addr_port()
93 static bool set_up_conn(const struct sockaddr *addr, socklen_t len, int type, in set_up_conn()
98 struct sockaddr *sa = (struct sockaddr *)&ss; in set_up_conn()
373 struct sockaddr *addr; in test_cls_redirect_common()
380 addr = (struct sockaddr *)&ss; in test_cls_redirect_common()
Dconnect_force_port.c14 if (getsockname(fd, (struct sockaddr *)&addr, &len)) { in verify_ports()
30 if (getpeername(fd, (struct sockaddr *)&addr, &len)) { in verify_ports()
/tools/testing/selftests/net/
Dtcp_inq.c36 static void setup_loopback_addr(int family, struct sockaddr_storage *sockaddr) in setup_loopback_addr() argument
38 struct sockaddr_in6 *addr6 = (void *) sockaddr; in setup_loopback_addr()
39 struct sockaddr_in *addr4 = (void *) sockaddr; in setup_loopback_addr()
71 fd = accept(server_fd, (struct sockaddr *)&addr, &addrlen); in start_server()
131 if (bind(server_fd, (const struct sockaddr *)&listen_addr, in main()
144 if (connect(fd, (const struct sockaddr *)&addr, addr_len) == -1) in main()
Dfin_ack_lat.c61 if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) in client()
75 if (getsockname(sock, (struct sockaddr *)&laddr, &len) == -1) in client()
93 accepted = accept(sock, (struct sockaddr *)&address, in server()
134 if (bind(sock, (struct sockaddr *)&address, sizeof(address)) < 0) in main()
140 if (getsockname(sock, (struct sockaddr *)&laddr, &len) == -1) in main()
Dreuseport_addr_any.c39 struct sockaddr *addr; in build_rcv_fd()
53 addr = (struct sockaddr *)&addr4; in build_rcv_fd()
63 addr = (struct sockaddr *)&addr6; in build_rcv_fd()
107 struct sockaddr *saddr, *daddr; in connect_and_send()
122 saddr = (struct sockaddr *)&saddr4; in connect_and_send()
123 daddr = (struct sockaddr *)&daddr4; in connect_and_send()
135 saddr = (struct sockaddr *)&saddr6; in connect_and_send()
136 daddr = (struct sockaddr *)&daddr6; in connect_and_send()
Dreuseaddr_conflict.c28 struct sockaddr *addr; in open_port()
44 addr = (struct sockaddr*)&addr6; in open_port()
47 addr = (struct sockaddr*)&addr4; in open_port()
Dtcp_fastopen_backup_key.c95 struct sockaddr *addr; in build_rcv_fd()
106 addr = (struct sockaddr *)&addr4; in build_rcv_fd()
113 addr = (struct sockaddr *)&addr6; in build_rcv_fd()
149 struct sockaddr *saddr, *daddr; in connect_and_send()
165 saddr = (struct sockaddr *)&saddr4; in connect_and_send()
166 daddr = (struct sockaddr *)&daddr4; in connect_and_send()
178 saddr = (struct sockaddr *)&saddr6; in connect_and_send()
179 daddr = (struct sockaddr *)&daddr6; in connect_and_send()
Dso_txtime.c87 msg.msg_name = (struct sockaddr *)&cfg_dst_addr; in do_send_one()
284 static int setup_tx(struct sockaddr *addr, socklen_t alen) in setup_tx()
304 static int setup_rx(struct sockaddr *addr, socklen_t alen) in setup_rx()
322 static void do_test_tx(struct sockaddr *addr, socklen_t alen) in do_test_tx()
344 static void do_test_rx(struct sockaddr *addr, socklen_t alen) in do_test_rx()
363 struct sockaddr_storage *sockaddr) in setup_sockaddr() argument
365 struct sockaddr_in6 *addr6 = (void *) sockaddr; in setup_sockaddr()
366 struct sockaddr_in *addr4 = (void *) sockaddr; in setup_sockaddr()
Dtcp_mmap.c282 struct sockaddr_storage *sockaddr) in setup_sockaddr() argument
284 struct sockaddr_in6 *addr6 = (void *) sockaddr; in setup_sockaddr()
285 struct sockaddr_in *addr4 = (void *) sockaddr; in setup_sockaddr()
331 fd = accept(fdlisten, (struct sockaddr *)&addr, &addrlen); in do_accept()
458 if (bind(fdlisten, (const struct sockaddr *)&listenaddr, cfg_alen) == -1) { in main()
489 if (connect(fd, (const struct sockaddr *)&addr, cfg_alen) == -1) { in main()
Dreuseport_bpf.c45 static struct sockaddr *new_any_sockaddr(int family, uint16_t port) in new_any_sockaddr()
70 return (struct sockaddr *)addr; in new_any_sockaddr()
73 static struct sockaddr *new_loopback_sockaddr(int family, uint16_t port) in new_loopback_sockaddr()
75 struct sockaddr *addr = new_any_sockaddr(family, port); in new_loopback_sockaddr()
155 struct sockaddr * const addr = in build_recv_group()
191 struct sockaddr * const saddr = new_any_sockaddr(p.send_family, sport); in send_from()
192 struct sockaddr * const daddr = in send_from()
309 struct sockaddr * const addr = in test_extra_filter()
341 struct sockaddr * const addr = in test_filter_no_reuseport()
Dreuseport_dualstack.c65 if (bind(rcv_fds[i], (struct sockaddr *)&addr, sizeof(addr))) in build_rcv_fd()
90 if (bind(fd, (struct sockaddr *)&saddr, sizeof(saddr))) in send_from_v4()
93 if (connect(fd, (struct sockaddr *)&daddr, sizeof(daddr))) in send_from_v4()
Dreuseport_bpf_numa.c65 if (bind(rcv_fd[i], (struct sockaddr *)&addr, sizeof(addr))) in build_rcv_group()
148 if (bind(fd, (struct sockaddr *)&saddr, sizeof(saddr))) in send_from_node()
151 if (connect(fd, (struct sockaddr *)&daddr, sizeof(daddr))) in send_from_node()
/tools/perf/examples/bpf/
Daugmented_syscalls.c134 struct sockaddr;
140 struct sockaddr *addr_ptr;
150 struct sockaddr *addr_ptr;
163 struct sockaddr *addr_ptr;
/tools/testing/selftests/bpf/progs/
Dfreplace_connect4.c14 bpf_bind(ctx, (struct sockaddr *)&sa, sizeof(sa)); in new_do_bind()
/tools/perf/include/bpf/linux/
Dsocket.h9 #define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))

1234