linux/include/linux/udp.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * INET		An implementation of the TCP/IP protocol suite for the LINUX
 *		operating system.  INET is implemented using the  BSD Socket
 *		interface as the means of communication with the user level.
 *
 *		Definitions for the UDP protocol.
 *
 * Version:	@(#)udp.h	1.0.2	04/28/93
 *
 * Author:	Fred N. van Kempen, <[email protected]>
 */
#ifndef _LINUX_UDP_H
#define _LINUX_UDP_H

#include <net/inet_sock.h>
#include <linux/skbuff.h>
#include <net/netns/hash.h>
#include <uapi/linux/udp.h>

static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
{}

#define UDP_HTABLE_SIZE_MIN_PERNET
#define UDP_HTABLE_SIZE_MIN
#define UDP_HTABLE_SIZE_MAX

static inline u32 udp_hashfn(const struct net *net, u32 num, u32 mask)
{}

enum {};

struct udp_sock {};

#define udp_test_bit(nr, sk)
#define udp_set_bit(nr, sk)
#define udp_test_and_set_bit(nr, sk)
#define udp_clear_bit(nr, sk)
#define udp_assign_bit(nr, sk, val)

#define UDP_MAX_SEGMENTS

#define udp_sk(ptr)

static inline int udp_set_peek_off(struct sock *sk, int val)
{}

static inline void udp_set_no_check6_tx(struct sock *sk, bool val)
{}

static inline void udp_set_no_check6_rx(struct sock *sk, bool val)
{}

static inline bool udp_get_no_check6_tx(const struct sock *sk)
{}

static inline bool udp_get_no_check6_rx(const struct sock *sk)
{}

static inline void udp_cmsg_recv(struct msghdr *msg, struct sock *sk,
				 struct sk_buff *skb)
{}

DECLARE_STATIC_KEY_FALSE(udp_encap_needed_key);
#if IS_ENABLED(CONFIG_IPV6)
DECLARE_STATIC_KEY_FALSE(udpv6_encap_needed_key);
#endif

static inline bool udp_encap_needed(void)
{}

static inline bool udp_unexpected_gso(struct sock *sk, struct sk_buff *skb)
{}

static inline void udp_allow_gso(struct sock *sk)
{}

#define udp_portaddr_for_each_entry(__sk, list)

#define udp_portaddr_for_each_entry_rcu(__sk, list)

#define IS_UDPLITE(__sk)

#endif	/* _LINUX_UDP_H */