linux/net/ipv4/udp_bpf.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2020 Cloudflare Ltd https://cloudflare.com */

#include <linux/skmsg.h>
#include <net/sock.h>
#include <net/udp.h>
#include <net/inet_common.h>

#include "udp_impl.h"

static struct proto *udpv6_prot_saved __read_mostly;

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

static bool udp_sk_has_data(struct sock *sk)
{}

static bool psock_has_data(struct sk_psock *psock)
{}

#define udp_msg_has_data(__sk, __psock)

static int udp_msg_wait_data(struct sock *sk, struct sk_psock *psock,
			     long timeo)
{}

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

enum {};

static DEFINE_SPINLOCK(udpv6_prot_lock);
static struct proto udp_bpf_prots[UDP_BPF_NUM_PROTS];

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

static void udp_bpf_check_v6_needs_rebuild(struct proto *ops)
{}

static int __init udp_bpf_v4_build_proto(void)
{}
late_initcall(udp_bpf_v4_build_proto);

int udp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore)
{}
EXPORT_SYMBOL_GPL();