#include <linux/skmsg.h>
#include <linux/bpf.h>
#include <net/sock.h>
#include <net/af_unix.h>
#define unix_sk_has_data(__sk, __psock) …
static int unix_msg_wait_data(struct sock *sk, struct sk_psock *psock,
long timeo)
{ … }
static int __unix_recvmsg(struct sock *sk, struct msghdr *msg,
size_t len, int flags)
{ … }
static int unix_bpf_recvmsg(struct sock *sk, struct msghdr *msg,
size_t len, int flags, int *addr_len)
{ … }
static struct proto *unix_dgram_prot_saved __read_mostly;
static DEFINE_SPINLOCK(unix_dgram_prot_lock);
static struct proto unix_dgram_bpf_prot;
static struct proto *unix_stream_prot_saved __read_mostly;
static DEFINE_SPINLOCK(unix_stream_prot_lock);
static struct proto unix_stream_bpf_prot;
static void unix_dgram_bpf_rebuild_protos(struct proto *prot, const struct proto *base)
{ … }
static void unix_stream_bpf_rebuild_protos(struct proto *prot,
const struct proto *base)
{ … }
static void unix_dgram_bpf_check_needs_rebuild(struct proto *ops)
{ … }
static void unix_stream_bpf_check_needs_rebuild(struct proto *ops)
{ … }
int unix_dgram_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore)
{ … }
int unix_stream_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore)
{ … }
void __init unix_bpf_build_proto(void)
{ … }