Home
last modified time | relevance | path

Searched refs:sa_kern (Results 1 – 7 of 7) sorted by relevance

/linux/tools/testing/selftests/bpf/progs/
H A Drecvmsg_unix_prog.c16 struct bpf_sock_addr_kern *sa_kern = bpf_cast_to_kern_ctx(ctx); in recvmsg_unix_prog() local
22 ret = bpf_sock_addr_set_sun_path(sa_kern, SERVUN_ADDRESS, in recvmsg_unix_prog()
27 if (sa_kern->uaddrlen != unaddrlen) in recvmsg_unix_prog()
30 sa_kern_unaddr = bpf_core_cast(sa_kern->uaddr, struct sockaddr_un); in recvmsg_unix_prog()
H A Dgetsockname_unix_prog.c16 struct bpf_sock_addr_kern *sa_kern = bpf_cast_to_kern_ctx(ctx); in getsockname_unix_prog() local
22 ret = bpf_sock_addr_set_sun_path(sa_kern, SERVUN_REWRITE_ADDRESS, in getsockname_unix_prog()
27 if (sa_kern->uaddrlen != unaddrlen) in getsockname_unix_prog()
30 sa_kern_unaddr = bpf_core_cast(sa_kern->uaddr, struct sockaddr_un); in getsockname_unix_prog()
H A Dgetpeername_unix_prog.c16 struct bpf_sock_addr_kern *sa_kern = bpf_cast_to_kern_ctx(ctx); in getpeername_unix_prog() local
22 ret = bpf_sock_addr_set_sun_path(sa_kern, SERVUN_REWRITE_ADDRESS, in getpeername_unix_prog()
27 if (sa_kern->uaddrlen != unaddrlen) in getpeername_unix_prog()
30 sa_kern_unaddr = bpf_core_cast(sa_kern->uaddr, struct sockaddr_un); in getpeername_unix_prog()
H A Dconnect_unix_prog.c16 struct bpf_sock_addr_kern *sa_kern = bpf_cast_to_kern_ctx(ctx); in connect_unix_prog() local
23 ret = bpf_sock_addr_set_sun_path(sa_kern, SERVUN_REWRITE_ADDRESS, in connect_unix_prog()
28 if (sa_kern->uaddrlen != unaddrlen) in connect_unix_prog()
31 sa_kern_unaddr = bpf_core_cast(sa_kern->uaddr, struct sockaddr_un); in connect_unix_prog()
H A Dsendmsg_unix_prog.c16 struct bpf_sock_addr_kern *sa_kern = bpf_cast_to_kern_ctx(ctx); in sendmsg_unix_prog() local
23 ret = bpf_sock_addr_set_sun_path(sa_kern, SERVUN_REWRITE_ADDRESS, in sendmsg_unix_prog()
28 if (sa_kern->uaddrlen != unaddrlen) in sendmsg_unix_prog()
31 sa_kern_unaddr = bpf_core_cast(sa_kern->uaddr, struct sockaddr_un); in sendmsg_unix_prog()
/linux/tools/testing/selftests/bpf/
H A Dbpf_kfuncs.h51 extern int bpf_sock_addr_set_sun_path(struct bpf_sock_addr_kern *sa_kern,
/linux/net/core/
H A Dfilter.c11941 __bpf_kfunc int bpf_sock_addr_set_sun_path(struct bpf_sock_addr_kern *sa_kern, in bpf_sock_addr_set_sun_path() argument
11946 if (sa_kern->sk->sk_family != AF_UNIX) in bpf_sock_addr_set_sun_path()
11955 un = (struct sockaddr_un *)sa_kern->uaddr; in bpf_sock_addr_set_sun_path()
11957 sa_kern->uaddrlen = offsetof(struct sockaddr_un, sun_path) + sun_path__sz; in bpf_sock_addr_set_sun_path()