#ifndef _SOCK_H
#define _SOCK_H
#include <linux/hardirq.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/list_nulls.h>
#include <linux/timer.h>
#include <linux/cache.h>
#include <linux/bitops.h>
#include <linux/lockdep.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/mm.h>
#include <linux/security.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/page_counter.h>
#include <linux/memcontrol.h>
#include <linux/static_key.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/cgroup-defs.h>
#include <linux/rbtree.h>
#include <linux/rculist_nulls.h>
#include <linux/poll.h>
#include <linux/sockptr.h>
#include <linux/indirect_call_wrapper.h>
#include <linux/atomic.h>
#include <linux/refcount.h>
#include <linux/llist.h>
#include <net/dst.h>
#include <net/checksum.h>
#include <net/tcp_states.h>
#include <linux/net_tstamp.h>
#include <net/l3mdev.h>
#include <uapi/linux/socket.h>
socket_lock_t;
struct sock;
struct proto;
struct net;
__portpair;
__addrpair;
struct sock_common { … };
struct bpf_local_storage;
struct sk_filter;
struct sock { … };
struct sock_bh_locked { … };
enum sk_pacing { … };
#define SK_USER_DATA_NOCOPY …
#define SK_USER_DATA_BPF …
#define SK_USER_DATA_PSOCK …
#define SK_USER_DATA_PTRMASK …
static inline bool sk_user_data_is_nocopy(const struct sock *sk)
{ … }
#define __sk_user_data(sk) …
static inline void *
__locked_read_sk_user_data_with_flags(const struct sock *sk,
uintptr_t flags)
{ … }
static inline void *
__rcu_dereference_sk_user_data_with_flags(const struct sock *sk,
uintptr_t flags)
{ … }
#define rcu_dereference_sk_user_data(sk) …
#define __rcu_assign_sk_user_data_with_flags(sk, ptr, flags) …
#define rcu_assign_sk_user_data(sk, ptr) …
static inline
struct net *sock_net(const struct sock *sk)
{ … }
static inline
void sock_net_set(struct sock *sk, struct net *net)
{ … }
#define SK_NO_REUSE …
#define SK_CAN_REUSE …
#define SK_FORCE_REUSE …
int sk_set_peek_off(struct sock *sk, int val);
static inline int sk_peek_offset(const struct sock *sk, int flags)
{ … }
static inline void sk_peek_offset_bwd(struct sock *sk, int val)
{ … }
static inline void sk_peek_offset_fwd(struct sock *sk, int val)
{ … }
static inline struct sock *sk_entry(const struct hlist_node *node)
{ … }
static inline struct sock *__sk_head(const struct hlist_head *head)
{ … }
static inline struct sock *sk_head(const struct hlist_head *head)
{ … }
static inline struct sock *__sk_nulls_head(const struct hlist_nulls_head *head)
{ … }
static inline struct sock *sk_nulls_head(const struct hlist_nulls_head *head)
{ … }
static inline struct sock *sk_next(const struct sock *sk)
{ … }
static inline struct sock *sk_nulls_next(const struct sock *sk)
{ … }
static inline bool sk_unhashed(const struct sock *sk)
{ … }
static inline bool sk_hashed(const struct sock *sk)
{ … }
static inline void sk_node_init(struct hlist_node *node)
{ … }
static inline void __sk_del_node(struct sock *sk)
{ … }
static inline bool __sk_del_node_init(struct sock *sk)
{ … }
static __always_inline void sock_hold(struct sock *sk)
{ … }
static __always_inline void __sock_put(struct sock *sk)
{ … }
static inline bool sk_del_node_init(struct sock *sk)
{ … }
#define sk_del_node_init_rcu(sk) …
static inline bool __sk_nulls_del_node_init_rcu(struct sock *sk)
{ … }
static inline bool sk_nulls_del_node_init_rcu(struct sock *sk)
{ … }
static inline void __sk_add_node(struct sock *sk, struct hlist_head *list)
{ … }
static inline void sk_add_node(struct sock *sk, struct hlist_head *list)
{ … }
static inline void sk_add_node_rcu(struct sock *sk, struct hlist_head *list)
{ … }
static inline void sk_add_node_tail_rcu(struct sock *sk, struct hlist_head *list)
{ … }
static inline void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
{ … }
static inline void __sk_nulls_add_node_tail_rcu(struct sock *sk, struct hlist_nulls_head *list)
{ … }
static inline void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
{ … }
static inline void __sk_del_bind_node(struct sock *sk)
{ … }
static inline void sk_add_bind_node(struct sock *sk,
struct hlist_head *list)
{ … }
#define sk_for_each(__sk, list) …
#define sk_for_each_rcu(__sk, list) …
#define sk_nulls_for_each(__sk, node, list) …
#define sk_nulls_for_each_rcu(__sk, node, list) …
#define sk_for_each_from(__sk) …
#define sk_nulls_for_each_from(__sk, node) …
#define sk_for_each_safe(__sk, tmp, list) …
#define sk_for_each_bound(__sk, list) …
#define sk_for_each_bound_safe(__sk, tmp, list) …
#define sk_for_each_entry_offset_rcu(tpos, pos, head, offset) …
static inline struct user_namespace *sk_user_ns(const struct sock *sk)
{ … }
enum sock_flags { … };
#define SK_FLAGS_TIMESTAMP …
static inline void sock_copy_flags(struct sock *nsk, const struct sock *osk)
{ … }
static inline void sock_set_flag(struct sock *sk, enum sock_flags flag)
{ … }
static inline void sock_reset_flag(struct sock *sk, enum sock_flags flag)
{ … }
static inline void sock_valbool_flag(struct sock *sk, enum sock_flags bit,
int valbool)
{ … }
static inline bool sock_flag(const struct sock *sk, enum sock_flags flag)
{ … }
#ifdef CONFIG_NET
DECLARE_STATIC_KEY_FALSE(memalloc_socks_key);
static inline int sk_memalloc_socks(void)
{ … }
void __receive_sock(struct file *file);
#else
static inline int sk_memalloc_socks(void)
{
return 0;
}
static inline void __receive_sock(struct file *file)
{ }
#endif
static inline gfp_t sk_gfp_mask(const struct sock *sk, gfp_t gfp_mask)
{ … }
static inline void sk_acceptq_removed(struct sock *sk)
{ … }
static inline void sk_acceptq_added(struct sock *sk)
{ … }
static inline bool sk_acceptq_is_full(const struct sock *sk)
{ … }
static inline int sk_stream_min_wspace(const struct sock *sk)
{ … }
static inline int sk_stream_wspace(const struct sock *sk)
{ … }
static inline void sk_wmem_queued_add(struct sock *sk, int val)
{ … }
static inline void sk_forward_alloc_add(struct sock *sk, int val)
{ … }
void sk_stream_write_space(struct sock *sk);
static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb)
{ … }
static inline bool sk_rcvqueues_full(const struct sock *sk, unsigned int limit)
{ … }
static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb,
unsigned int limit)
{ … }
int __sk_backlog_rcv(struct sock *sk, struct sk_buff *skb);
INDIRECT_CALLABLE_DECLARE(…);
INDIRECT_CALLABLE_DECLARE(…);
static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
{ … }
static inline void sk_incoming_cpu_update(struct sock *sk)
{ … }
static inline void sock_rps_save_rxhash(struct sock *sk,
const struct sk_buff *skb)
{ … }
static inline void sock_rps_reset_rxhash(struct sock *sk)
{ … }
#define sk_wait_event(__sk, __timeo, __condition, __wait) …
int sk_stream_wait_connect(struct sock *sk, long *timeo_p);
int sk_stream_wait_memory(struct sock *sk, long *timeo_p);
void sk_stream_wait_close(struct sock *sk, long timeo_p);
int sk_stream_error(struct sock *sk, int flags, int err);
void sk_stream_kill_queues(struct sock *sk);
void sk_set_memalloc(struct sock *sk);
void sk_clear_memalloc(struct sock *sk);
void __sk_flush_backlog(struct sock *sk);
static inline bool sk_flush_backlog(struct sock *sk)
{ … }
int sk_wait_data(struct sock *sk, long *timeo, const struct sk_buff *skb);
struct request_sock_ops;
struct timewait_sock_ops;
struct inet_hashinfo;
struct raw_hashinfo;
struct smc_hashinfo;
struct module;
struct sk_psock;
static inline void sk_prot_clear_nulls(struct sock *sk, int size)
{ … }
struct proto_accept_arg { … };
struct proto { … } __randomize_layout;
int proto_register(struct proto *prot, int alloc_slab);
void proto_unregister(struct proto *prot);
int sock_load_diag_module(int family, int protocol);
INDIRECT_CALLABLE_DECLARE(…);
static inline int sk_forward_alloc_get(const struct sock *sk)
{ … }
static inline bool __sk_stream_memory_free(const struct sock *sk, int wake)
{ … }
static inline bool sk_stream_memory_free(const struct sock *sk)
{ … }
static inline bool __sk_stream_is_writeable(const struct sock *sk, int wake)
{ … }
static inline bool sk_stream_is_writeable(const struct sock *sk)
{ … }
static inline int sk_under_cgroup_hierarchy(struct sock *sk,
struct cgroup *ancestor)
{ … }
#define SK_ALLOC_PERCPU_COUNTER_BATCH …
static inline void sk_sockets_allocated_dec(struct sock *sk)
{ … }
static inline void sk_sockets_allocated_inc(struct sock *sk)
{ … }
static inline u64
sk_sockets_allocated_read_positive(struct sock *sk)
{ … }
static inline int
proto_sockets_allocated_sum_positive(struct proto *prot)
{ … }
#ifdef CONFIG_PROC_FS
#define PROTO_INUSE_NR …
struct prot_inuse { … };
static inline void sock_prot_inuse_add(const struct net *net,
const struct proto *prot, int val)
{ … }
static inline void sock_inuse_add(const struct net *net, int val)
{ … }
int sock_prot_inuse_get(struct net *net, struct proto *proto);
int sock_inuse_get(struct net *net);
#else
static inline void sock_prot_inuse_add(const struct net *net,
const struct proto *prot, int val)
{
}
static inline void sock_inuse_add(const struct net *net, int val)
{
}
#endif
static inline int __sk_prot_rehash(struct sock *sk)
{ … }
#define SOCK_DESTROY_TIME …
#define PROT_SOCK …
#define SHUTDOWN_MASK …
#define RCV_SHUTDOWN …
#define SEND_SHUTDOWN …
#define SOCK_BINDADDR_LOCK …
#define SOCK_BINDPORT_LOCK …
struct socket_alloc { … };
static inline struct socket *SOCKET_I(struct inode *inode)
{ … }
static inline struct inode *SOCK_INODE(struct socket *socket)
{ … }
int __sk_mem_raise_allocated(struct sock *sk, int size, int amt, int kind);
int __sk_mem_schedule(struct sock *sk, int size, int kind);
void __sk_mem_reduce_allocated(struct sock *sk, int amount);
void __sk_mem_reclaim(struct sock *sk, int amount);
#define SK_MEM_SEND …
#define SK_MEM_RECV …
static inline long sk_prot_mem_limits(const struct sock *sk, int index)
{ … }
static inline int sk_mem_pages(int amt)
{ … }
static inline bool sk_has_account(struct sock *sk)
{ … }
static inline bool sk_wmem_schedule(struct sock *sk, int size)
{ … }
static inline bool
sk_rmem_schedule(struct sock *sk, struct sk_buff *skb, int size)
{ … }
static inline int sk_unused_reserved_mem(const struct sock *sk)
{ … }
static inline void sk_mem_reclaim(struct sock *sk)
{ … }
static inline void sk_mem_reclaim_final(struct sock *sk)
{ … }
static inline void sk_mem_charge(struct sock *sk, int size)
{ … }
static inline void sk_mem_uncharge(struct sock *sk, int size)
{ … }
#define sock_lock_init_class_and_name(sk, sname, skey, name, key) …
static inline bool lockdep_sock_is_held(const struct sock *sk)
{ … }
void lock_sock_nested(struct sock *sk, int subclass);
static inline void lock_sock(struct sock *sk)
{ … }
void __lock_sock(struct sock *sk);
void __release_sock(struct sock *sk);
void release_sock(struct sock *sk);
#define bh_lock_sock(__sk) …
#define bh_lock_sock_nested(__sk) …
#define bh_unlock_sock(__sk) …
bool __lock_sock_fast(struct sock *sk) __acquires(…);
static inline bool lock_sock_fast(struct sock *sk)
{ … }
static inline bool lock_sock_fast_nested(struct sock *sk)
{ … }
static inline void unlock_sock_fast(struct sock *sk, bool slow)
__releases(&sk->sk_lock.slock)
{ … }
void sockopt_lock_sock(struct sock *sk);
void sockopt_release_sock(struct sock *sk);
bool sockopt_ns_capable(struct user_namespace *ns, int cap);
bool sockopt_capable(int cap);
static inline void sock_owned_by_me(const struct sock *sk)
{ … }
static inline void sock_not_owned_by_me(const struct sock *sk)
{ … }
static inline bool sock_owned_by_user(const struct sock *sk)
{ … }
static inline bool sock_owned_by_user_nocheck(const struct sock *sk)
{ … }
static inline void sock_release_ownership(struct sock *sk)
{ … }
static inline bool sock_allow_reclassification(const struct sock *csk)
{ … }
struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
struct proto *prot, int kern);
void sk_free(struct sock *sk);
void sk_destruct(struct sock *sk);
struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority);
void sk_free_unlock_clone(struct sock *sk);
struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,
gfp_t priority);
void __sock_wfree(struct sk_buff *skb);
void sock_wfree(struct sk_buff *skb);
struct sk_buff *sock_omalloc(struct sock *sk, unsigned long size,
gfp_t priority);
void skb_orphan_partial(struct sk_buff *skb);
void sock_rfree(struct sk_buff *skb);
void sock_efree(struct sk_buff *skb);
#ifdef CONFIG_INET
void sock_edemux(struct sk_buff *skb);
void sock_pfree(struct sk_buff *skb);
#else
#define sock_edemux …
#endif
int sk_setsockopt(struct sock *sk, int level, int optname,
sockptr_t optval, unsigned int optlen);
int sock_setsockopt(struct socket *sock, int level, int op,
sockptr_t optval, unsigned int optlen);
int do_sock_setsockopt(struct socket *sock, bool compat, int level,
int optname, sockptr_t optval, int optlen);
int do_sock_getsockopt(struct socket *sock, bool compat, int level,
int optname, sockptr_t optval, sockptr_t optlen);
int sk_getsockopt(struct sock *sk, int level, int optname,
sockptr_t optval, sockptr_t optlen);
int sock_gettstamp(struct socket *sock, void __user *userstamp,
bool timeval, bool time32);
struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
unsigned long data_len, int noblock,
int *errcode, int max_page_order);
static inline struct sk_buff *sock_alloc_send_skb(struct sock *sk,
unsigned long size,
int noblock, int *errcode)
{ … }
void *sock_kmalloc(struct sock *sk, int size, gfp_t priority);
void sock_kfree_s(struct sock *sk, void *mem, int size);
void sock_kzfree_s(struct sock *sk, void *mem, int size);
void sk_send_sigurg(struct sock *sk);
static inline void sock_replace_proto(struct sock *sk, struct proto *proto)
{ … }
struct sockcm_cookie { … };
static inline void sockcm_init(struct sockcm_cookie *sockc,
const struct sock *sk)
{ … }
int __sock_cmsg_send(struct sock *sk, struct cmsghdr *cmsg,
struct sockcm_cookie *sockc);
int sock_cmsg_send(struct sock *sk, struct msghdr *msg,
struct sockcm_cookie *sockc);
int sock_no_bind(struct socket *, struct sockaddr *, int);
int sock_no_connect(struct socket *, struct sockaddr *, int, int);
int sock_no_socketpair(struct socket *, struct socket *);
int sock_no_accept(struct socket *, struct socket *, struct proto_accept_arg *);
int sock_no_getname(struct socket *, struct sockaddr *, int);
int sock_no_ioctl(struct socket *, unsigned int, unsigned long);
int sock_no_listen(struct socket *, int);
int sock_no_shutdown(struct socket *, int);
int sock_no_sendmsg(struct socket *, struct msghdr *, size_t);
int sock_no_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t len);
int sock_no_recvmsg(struct socket *, struct msghdr *, size_t, int);
int sock_no_mmap(struct file *file, struct socket *sock,
struct vm_area_struct *vma);
int sock_common_getsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen);
int sock_common_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
int flags);
int sock_common_setsockopt(struct socket *sock, int level, int optname,
sockptr_t optval, unsigned int optlen);
void sk_common_release(struct sock *sk);
void sock_init_data_uid(struct socket *sock, struct sock *sk, kuid_t uid);
void sock_init_data(struct socket *sock, struct sock *sk);
static inline void sock_put(struct sock *sk)
{ … }
void sock_gen_put(struct sock *sk);
int __sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested,
unsigned int trim_cap, bool refcounted);
static inline int sk_receive_skb(struct sock *sk, struct sk_buff *skb,
const int nested)
{ … }
static inline void sk_tx_queue_set(struct sock *sk, int tx_queue)
{ … }
#define NO_QUEUE_MAPPING …
static inline void sk_tx_queue_clear(struct sock *sk)
{ … }
static inline int sk_tx_queue_get(const struct sock *sk)
{ … }
static inline void __sk_rx_queue_set(struct sock *sk,
const struct sk_buff *skb,
bool force_set)
{ … }
static inline void sk_rx_queue_set(struct sock *sk, const struct sk_buff *skb)
{ … }
static inline void sk_rx_queue_update(struct sock *sk, const struct sk_buff *skb)
{ … }
static inline void sk_rx_queue_clear(struct sock *sk)
{ … }
static inline int sk_rx_queue_get(const struct sock *sk)
{ … }
static inline void sk_set_socket(struct sock *sk, struct socket *sock)
{ … }
static inline wait_queue_head_t *sk_sleep(struct sock *sk)
{ … }
static inline void sock_orphan(struct sock *sk)
{ … }
static inline void sock_graft(struct sock *sk, struct socket *parent)
{ … }
kuid_t sock_i_uid(struct sock *sk);
unsigned long __sock_i_ino(struct sock *sk);
unsigned long sock_i_ino(struct sock *sk);
static inline kuid_t sock_net_uid(const struct net *net, const struct sock *sk)
{ … }
static inline u32 net_tx_rndhash(void)
{ … }
static inline void sk_set_txhash(struct sock *sk)
{ … }
static inline bool sk_rethink_txhash(struct sock *sk)
{ … }
static inline struct dst_entry *
__sk_dst_get(const struct sock *sk)
{ … }
static inline struct dst_entry *
sk_dst_get(const struct sock *sk)
{ … }
static inline void __dst_negative_advice(struct sock *sk)
{ … }
static inline void dst_negative_advice(struct sock *sk)
{ … }
static inline void
__sk_dst_set(struct sock *sk, struct dst_entry *dst)
{ … }
static inline void
sk_dst_set(struct sock *sk, struct dst_entry *dst)
{ … }
static inline void
__sk_dst_reset(struct sock *sk)
{ … }
static inline void
sk_dst_reset(struct sock *sk)
{ … }
struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie);
struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie);
static inline void sk_dst_confirm(struct sock *sk)
{ … }
static inline void sock_confirm_neigh(struct sk_buff *skb, struct neighbour *n)
{ … }
bool sk_mc_loop(const struct sock *sk);
static inline bool sk_can_gso(const struct sock *sk)
{ … }
void sk_setup_caps(struct sock *sk, struct dst_entry *dst);
static inline void sk_gso_disable(struct sock *sk)
{ … }
static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb,
struct iov_iter *from, char *to,
int copy, int offset)
{ … }
static inline int skb_add_data_nocache(struct sock *sk, struct sk_buff *skb,
struct iov_iter *from, int copy)
{ … }
static inline int skb_copy_to_page_nocache(struct sock *sk, struct iov_iter *from,
struct sk_buff *skb,
struct page *page,
int off, int copy)
{ … }
static inline int sk_wmem_alloc_get(const struct sock *sk)
{ … }
static inline int sk_rmem_alloc_get(const struct sock *sk)
{ … }
static inline bool sk_has_allocations(const struct sock *sk)
{ … }
static inline bool skwq_has_sleeper(struct socket_wq *wq)
{ … }
static inline void sock_poll_wait(struct file *filp, struct socket *sock,
poll_table *p)
{ … }
static inline void skb_set_hash_from_sk(struct sk_buff *skb, struct sock *sk)
{ … }
void skb_set_owner_w(struct sk_buff *skb, struct sock *sk);
static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
{ … }
static inline __must_check bool skb_set_owner_sk_safe(struct sk_buff *skb, struct sock *sk)
{ … }
static inline struct sk_buff *skb_clone_and_charge_r(struct sk_buff *skb, struct sock *sk)
{ … }
static inline void skb_prepare_for_gro(struct sk_buff *skb)
{ … }
void sk_reset_timer(struct sock *sk, struct timer_list *timer,
unsigned long expires);
void sk_stop_timer(struct sock *sk, struct timer_list *timer);
void sk_stop_timer_sync(struct sock *sk, struct timer_list *timer);
int __sk_queue_drop_skb(struct sock *sk, struct sk_buff_head *sk_queue,
struct sk_buff *skb, unsigned int flags,
void (*destructor)(struct sock *sk,
struct sk_buff *skb));
int __sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
int sock_queue_rcv_skb_reason(struct sock *sk, struct sk_buff *skb,
enum skb_drop_reason *reason);
static inline int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{ … }
int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb);
struct sk_buff *sock_dequeue_err_skb(struct sock *sk);
static inline int sock_error(struct sock *sk)
{ … }
void sk_error_report(struct sock *sk);
static inline unsigned long sock_wspace(struct sock *sk)
{ … }
static inline void sk_set_bit(int nr, struct sock *sk)
{ … }
static inline void sk_clear_bit(int nr, struct sock *sk)
{ … }
static inline void sk_wake_async(const struct sock *sk, int how, int band)
{ … }
static inline void sk_wake_async_rcu(const struct sock *sk, int how, int band)
{ … }
#define TCP_SKB_MIN_TRUESIZE …
#define SOCK_MIN_SNDBUF …
#define SOCK_MIN_RCVBUF …
static inline void sk_stream_moderate_sndbuf(struct sock *sk)
{ … }
static inline struct page_frag *sk_page_frag(struct sock *sk)
{ … }
bool sk_page_frag_refill(struct sock *sk, struct page_frag *pfrag);
static inline bool sock_writeable(const struct sock *sk)
{ … }
static inline gfp_t gfp_any(void)
{ … }
static inline gfp_t gfp_memcg_charge(void)
{ … }
static inline long sock_rcvtimeo(const struct sock *sk, bool noblock)
{ … }
static inline long sock_sndtimeo(const struct sock *sk, bool noblock)
{ … }
static inline int sock_rcvlowat(const struct sock *sk, int waitall, int len)
{ … }
static inline int sock_intr_errno(long timeo)
{ … }
struct sock_skb_cb { … };
#define SOCK_SKB_CB_OFFSET …
#define SOCK_SKB_CB(__skb) …
#define sock_skb_cb_check_size(size) …
static inline void
sock_skb_set_dropcount(const struct sock *sk, struct sk_buff *skb)
{ … }
static inline void sk_drops_add(struct sock *sk, const struct sk_buff *skb)
{ … }
static inline ktime_t sock_read_timestamp(struct sock *sk)
{ … }
static inline void sock_write_timestamp(struct sock *sk, ktime_t kt)
{ … }
void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
struct sk_buff *skb);
void __sock_recv_wifi_status(struct msghdr *msg, struct sock *sk,
struct sk_buff *skb);
static inline void
sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
{ … }
void __sock_recv_cmsgs(struct msghdr *msg, struct sock *sk,
struct sk_buff *skb);
#define SK_DEFAULT_STAMP …
static inline void sock_recv_cmsgs(struct msghdr *msg, struct sock *sk,
struct sk_buff *skb)
{ … }
void __sock_tx_timestamp(__u16 tsflags, __u8 *tx_flags);
static inline void _sock_tx_timestamp(struct sock *sk, __u16 tsflags,
__u8 *tx_flags, __u32 *tskey)
{ … }
static inline void sock_tx_timestamp(struct sock *sk, __u16 tsflags,
__u8 *tx_flags)
{ … }
static inline void skb_setup_tx_timestamp(struct sk_buff *skb, __u16 tsflags)
{ … }
static inline bool sk_is_inet(const struct sock *sk)
{ … }
static inline bool sk_is_tcp(const struct sock *sk)
{ … }
static inline bool sk_is_udp(const struct sock *sk)
{ … }
static inline bool sk_is_stream_unix(const struct sock *sk)
{ … }
static inline bool sk_is_vsock(const struct sock *sk)
{ … }
static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb)
{ … }
static inline bool
skb_sk_is_prefetched(struct sk_buff *skb)
{ … }
static inline bool sk_fullsock(const struct sock *sk)
{ … }
static inline bool
sk_is_refcounted(struct sock *sk)
{ … }
static inline struct sk_buff *sk_validate_xmit_skb(struct sk_buff *skb,
struct net_device *dev)
{ … }
static inline bool sk_listener(const struct sock *sk)
{ … }
void sock_enable_timestamp(struct sock *sk, enum sock_flags flag);
int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len, int level,
int type);
bool sk_ns_capable(const struct sock *sk,
struct user_namespace *user_ns, int cap);
bool sk_capable(const struct sock *sk, int cap);
bool sk_net_capable(const struct sock *sk, int cap);
void sk_get_meminfo(const struct sock *sk, u32 *meminfo);
#define _SK_MEM_PACKETS …
#define _SK_MEM_OVERHEAD …
#define SK_WMEM_MAX …
#define SK_RMEM_MAX …
extern __u32 sysctl_wmem_max;
extern __u32 sysctl_rmem_max;
extern int sysctl_tstamp_allow_data;
extern __u32 sysctl_wmem_default;
extern __u32 sysctl_rmem_default;
#define SKB_FRAG_PAGE_ORDER …
DECLARE_STATIC_KEY_FALSE(net_high_order_alloc_disable_key);
static inline int sk_get_wmem0(const struct sock *sk, const struct proto *proto)
{ … }
static inline int sk_get_rmem0(const struct sock *sk, const struct proto *proto)
{ … }
static inline void sk_pacing_shift_update(struct sock *sk, int val)
{ … }
static inline bool sk_dev_equal_l3scope(struct sock *sk, int dif)
{ … }
void sock_def_readable(struct sock *sk);
int sock_bindtoindex(struct sock *sk, int ifindex, bool lock_sk);
void sock_set_timestamp(struct sock *sk, int optname, bool valbool);
int sock_set_timestamping(struct sock *sk, int optname,
struct so_timestamping timestamping);
void sock_enable_timestamps(struct sock *sk);
void sock_no_linger(struct sock *sk);
void sock_set_keepalive(struct sock *sk);
void sock_set_priority(struct sock *sk, u32 priority);
void sock_set_rcvbuf(struct sock *sk, int val);
void sock_set_mark(struct sock *sk, u32 val);
void sock_set_reuseaddr(struct sock *sk);
void sock_set_reuseport(struct sock *sk);
void sock_set_sndtimeo(struct sock *sk, s64 secs);
int sock_bind_add(struct sock *sk, struct sockaddr *addr, int addr_len);
int sock_get_timeout(long timeo, void *optval, bool old_timeval);
int sock_copy_user_timeval(struct __kernel_sock_timeval *tv,
sockptr_t optval, int optlen, bool old_timeval);
int sock_ioctl_inout(struct sock *sk, unsigned int cmd,
void __user *arg, void *karg, size_t size);
int sk_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
static inline bool sk_is_readable(struct sock *sk)
{ … }
#endif