linux/net/vmw_vsock/vsock_bpf.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2022 Bobby Eshleman <[email protected]>
 *
 * Based off of net/unix/unix_bpf.c
 */

#include <linux/bpf.h>
#include <linux/module.h>
#include <linux/skmsg.h>
#include <linux/socket.h>
#include <linux/wait.h>
#include <net/af_vsock.h>
#include <net/sock.h>

#define vsock_sk_has_data(__sk, __psock)

static struct proto *vsock_prot_saved __read_mostly;
static DEFINE_SPINLOCK(vsock_prot_lock);
static struct proto vsock_bpf_prot;

static bool vsock_has_data(struct sock *sk, struct sk_psock *psock)
{}

static bool vsock_msg_wait_data(struct sock *sk, struct sk_psock *psock, long timeo)
{}

static int __vsock_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int flags)
{}

static int vsock_bpf_recvmsg(struct sock *sk, struct msghdr *msg,
			     size_t len, int flags, int *addr_len)
{}

/* Copy of original proto with updated sock_map methods */
static struct proto vsock_bpf_prot =;

static void vsock_bpf_rebuild_protos(struct proto *prot, const struct proto *base)
{}

static void vsock_bpf_check_needs_rebuild(struct proto *ops)
{}

int vsock_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore)
{}

void __init vsock_bpf_build_proto(void)
{}