Lines Matching full:sock

9  * Version:	@(#)sock.h	1.0.4	05/13/93
103 struct sock;
154 * for struct sock and struct inet_timewait_sock.
200 * offset(struct sock, sk_refcnt) == 128 on 64bit arches
206 struct sock *skc_listener; /* request_sock */
245 * struct sock - network layer representation of sockets
250 * @sk_kern_sock: True if sock is using kernel lock classes
252 * @sk_wq: sock wait queue and async head
287 * @sk_prot_creator: sk_prot of original sock creator (see ipv6_setsockopt,
312 * @sk_timer: sock cleanup timer
338 * @sk_disconnects: number of disconnect operations performed on this sock
339 * @sk_state_change: callback to indicate change in the state of the sock
345 * @sk_destruct: called at sock freeing time, i.e. when all refcnt == 0
365 struct sock { struct
453 void (*sk_data_ready)(struct sock *sk); argument
517 struct sk_buff* (*sk_validate_xmit_skb)(struct sock *sk, argument
580 void (*sk_state_change)(struct sock *sk); argument
581 void (*sk_write_space)(struct sock *sk); argument
582 void (*sk_error_report)(struct sock *sk); argument
583 int (*sk_backlog_rcv)(struct sock *sk, argument
585 void (*sk_destruct)(struct sock *sk); argument
608 struct sock *sock; argument
643 static inline bool sk_user_data_is_nocopy(const struct sock *sk) in sk_user_data_is_nocopy()
661 __locked_read_sk_user_data_with_flags(const struct sock *sk, in __locked_read_sk_user_data_with_flags()
684 __rcu_dereference_sk_user_data_with_flags(const struct sock *sk, in __rcu_dereference_sk_user_data_with_flags()
711 struct net *sock_net(const struct sock *sk) in sock_net()
717 void sock_net_set(struct sock *sk, struct net *net) in sock_net_set()
733 int sk_set_peek_off(struct sock *sk, int val);
735 static inline int sk_peek_offset(const struct sock *sk, int flags) in sk_peek_offset()
744 static inline void sk_peek_offset_bwd(struct sock *sk, int val) in sk_peek_offset_bwd()
754 static inline void sk_peek_offset_fwd(struct sock *sk, int val) in sk_peek_offset_fwd()
762 static inline struct sock *sk_entry(const struct hlist_node *node) in sk_entry()
764 return hlist_entry(node, struct sock, sk_node); in sk_entry()
767 static inline struct sock *__sk_head(const struct hlist_head *head) in __sk_head()
769 return hlist_entry(head->first, struct sock, sk_node); in __sk_head()
772 static inline struct sock *sk_head(const struct hlist_head *head) in sk_head()
777 static inline struct sock *__sk_nulls_head(const struct hlist_nulls_head *head) in __sk_nulls_head()
779 return hlist_nulls_entry(head->first, struct sock, sk_nulls_node); in __sk_nulls_head()
782 static inline struct sock *sk_nulls_head(const struct hlist_nulls_head *head) in sk_nulls_head()
787 static inline struct sock *sk_next(const struct sock *sk) in sk_next()
789 return hlist_entry_safe(sk->sk_node.next, struct sock, sk_node); in sk_next()
792 static inline struct sock *sk_nulls_next(const struct sock *sk) in sk_nulls_next()
796 struct sock, sk_nulls_node) : in sk_nulls_next()
800 static inline bool sk_unhashed(const struct sock *sk) in sk_unhashed()
805 static inline bool sk_hashed(const struct sock *sk) in sk_hashed()
815 static inline void __sk_del_node(struct sock *sk) in __sk_del_node()
821 static inline bool __sk_del_node_init(struct sock *sk) in __sk_del_node_init()
837 static __always_inline void sock_hold(struct sock *sk) in sock_hold()
845 static __always_inline void __sock_put(struct sock *sk) in __sock_put()
850 static inline bool sk_del_node_init(struct sock *sk) in sk_del_node_init()
861 static inline bool __sk_nulls_del_node_init_rcu(struct sock *sk) in __sk_nulls_del_node_init_rcu()
870 static inline bool sk_nulls_del_node_init_rcu(struct sock *sk) in sk_nulls_del_node_init_rcu()
880 static inline bool sk_nulls_replace_node_init_rcu(struct sock *old, in sk_nulls_replace_node_init_rcu()
881 struct sock *new) in sk_nulls_replace_node_init_rcu()
893 static inline void __sk_add_node(struct sock *sk, struct hlist_head *list) in __sk_add_node()
898 static inline void sk_add_node(struct sock *sk, struct hlist_head *list) in sk_add_node()
904 static inline void sk_add_node_rcu(struct sock *sk, struct hlist_head *list) in sk_add_node_rcu()
914 static inline void sk_add_node_tail_rcu(struct sock *sk, struct hlist_head *list) in sk_add_node_tail_rcu()
920 static inline void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) in __sk_nulls_add_node_rcu()
925 static inline void __sk_nulls_add_node_tail_rcu(struct sock *sk, struct hlist_nulls_head *list) in __sk_nulls_add_node_tail_rcu()
930 static inline void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) in sk_nulls_add_node_rcu()
936 static inline void __sk_del_bind_node(struct sock *sk) in __sk_del_bind_node()
941 static inline void sk_add_bind_node(struct sock *sk, in sk_add_bind_node()
981 static inline struct user_namespace *sk_user_ns(const struct sock *sk) in sk_user_ns()
990 /* Sock flags */
1030 * SOCKCM_FLAG_TS_OPT_ID. There is a check in core/sock.c to control that
1035 static inline void sock_copy_flags(struct sock *nsk, const struct sock *osk) in sock_copy_flags()
1040 static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) in sock_set_flag()
1045 static inline void sock_reset_flag(struct sock *sk, enum sock_flags flag) in sock_reset_flag()
1050 static inline void sock_valbool_flag(struct sock *sk, enum sock_flags bit, in sock_valbool_flag()
1059 static inline bool sock_flag(const struct sock *sk, enum sock_flags flag) in sock_flag()
1083 static inline gfp_t sk_gfp_mask(const struct sock *sk, gfp_t gfp_mask) in sk_gfp_mask()
1088 static inline void sk_acceptq_removed(struct sock *sk) in sk_acceptq_removed()
1093 static inline void sk_acceptq_added(struct sock *sk) in sk_acceptq_added()
1102 static inline bool sk_acceptq_is_full(const struct sock *sk) in sk_acceptq_is_full()
1110 static inline int sk_stream_min_wspace(const struct sock *sk) in sk_stream_min_wspace()
1115 static inline int sk_stream_wspace(const struct sock *sk) in sk_stream_wspace()
1120 static inline void sk_wmem_queued_add(struct sock *sk, int val) in sk_wmem_queued_add()
1125 static inline void sk_forward_alloc_add(struct sock *sk, int val) in sk_forward_alloc_add()
1131 void sk_stream_write_space(struct sock *sk);
1134 static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) in __sk_add_backlog()
1153 static inline bool sk_rcvqueues_full(const struct sock *sk, unsigned int limit) in sk_rcvqueues_full()
1161 static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb, in sk_add_backlog()
1180 int __sk_backlog_rcv(struct sock *sk, struct sk_buff *skb);
1182 INDIRECT_CALLABLE_DECLARE(int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb));
1183 INDIRECT_CALLABLE_DECLARE(int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb));
1185 static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) in sk_backlog_rcv()
1196 static inline void sk_incoming_cpu_update(struct sock *sk) in sk_incoming_cpu_update()
1205 static inline void sock_rps_save_rxhash(struct sock *sk, in sock_rps_save_rxhash()
1217 static inline void sock_rps_reset_rxhash(struct sock *sk) in sock_rps_reset_rxhash()
1240 int sk_stream_wait_connect(struct sock *sk, long *timeo_p);
1241 int sk_stream_wait_memory(struct sock *sk, long *timeo_p);
1242 void sk_stream_wait_close(struct sock *sk, long timeo_p);
1243 int sk_stream_error(struct sock *sk, int flags, int err);
1244 void sk_stream_kill_queues(struct sock *sk);
1245 void sk_set_memalloc(struct sock *sk);
1246 void sk_clear_memalloc(struct sock *sk);
1248 void __sk_flush_backlog(struct sock *sk);
1250 static inline bool sk_flush_backlog(struct sock *sk) in sk_flush_backlog()
1259 int sk_wait_data(struct sock *sk, long *timeo, const struct sk_buff *skb);
1273 static inline void sk_prot_clear_nulls(struct sock *sk, int size) in sk_prot_clear_nulls()
1275 if (offsetof(struct sock, sk_node.next) != 0) in sk_prot_clear_nulls()
1276 memset(sk, 0, offsetof(struct sock, sk_node.next)); in sk_prot_clear_nulls()
1278 size - offsetof(struct sock, sk_node.pprev)); in sk_prot_clear_nulls()
1292 void (*close)(struct sock *sk,
1294 int (*pre_connect)(struct sock *sk,
1297 int (*connect)(struct sock *sk,
1300 int (*disconnect)(struct sock *sk, int flags);
1302 struct sock * (*accept)(struct sock *sk,
1305 int (*ioctl)(struct sock *sk, int cmd,
1307 int (*init)(struct sock *sk);
1308 void (*destroy)(struct sock *sk);
1309 void (*shutdown)(struct sock *sk, int how);
1310 int (*setsockopt)(struct sock *sk, int level,
1313 int (*getsockopt)(struct sock *sk, int level,
1316 void (*keepalive)(struct sock *sk, int valbool);
1318 int (*compat_ioctl)(struct sock *sk,
1321 int (*sendmsg)(struct sock *sk, struct msghdr *msg,
1323 int (*recvmsg)(struct sock *sk, struct msghdr *msg,
1325 void (*splice_eof)(struct socket *sock);
1326 int (*bind)(struct sock *sk,
1328 int (*bind_add)(struct sock *sk,
1331 int (*backlog_rcv) (struct sock *sk,
1336 void (*release_cb)(struct sock *sk);
1339 int (*hash)(struct sock *sk);
1340 void (*unhash)(struct sock *sk);
1341 void (*rehash)(struct sock *sk);
1342 int (*get_port)(struct sock *sk, unsigned short snum);
1343 void (*put_port)(struct sock *sk);
1345 int (*psock_update_sk_prot)(struct sock *sk,
1355 bool (*stream_memory_free)(const struct sock *sk, int wake);
1356 bool (*sock_is_readable)(struct sock *sk);
1358 void (*enter_memory_pressure)(struct sock *sk);
1359 void (*leave_memory_pressure)(struct sock *sk);
1404 int (*diag_destroy)(struct sock *sk, int err);
1411 INDIRECT_CALLABLE_DECLARE(bool tcp_stream_memory_free(const struct sock *sk, int wake));
1413 static inline bool __sk_stream_memory_free(const struct sock *sk, int wake) in __sk_stream_memory_free()
1423 static inline bool sk_stream_memory_free(const struct sock *sk) in sk_stream_memory_free()
1428 static inline bool __sk_stream_is_writeable(const struct sock *sk, int wake) in __sk_stream_is_writeable()
1434 static inline bool sk_stream_is_writeable(const struct sock *sk) in sk_stream_is_writeable()
1439 static inline int sk_under_cgroup_hierarchy(struct sock *sk, in sk_under_cgroup_hierarchy()
1452 static inline void sk_sockets_allocated_dec(struct sock *sk) in sk_sockets_allocated_dec()
1458 static inline void sk_sockets_allocated_inc(struct sock *sk) in sk_sockets_allocated_inc()
1465 sk_sockets_allocated_read_positive(struct sock *sk) in sk_sockets_allocated_read_positive()
1511 static inline int __sk_prot_rehash(struct sock *sk) in __sk_prot_rehash()
1530 * define SOCK_CONNECT_BIND - &sock->sk_userlocks flag for auto-bind at connect() time
1552 int __sk_mem_raise_allocated(struct sock *sk, int size, int amt, int kind);
1553 int __sk_mem_schedule(struct sock *sk, int size, int kind);
1554 void __sk_mem_reduce_allocated(struct sock *sk, int amount);
1555 void __sk_mem_reclaim(struct sock *sk, int amount);
1561 static inline long sk_prot_mem_limits(const struct sock *sk, int index) in sk_prot_mem_limits()
1571 static inline bool sk_has_account(struct sock *sk) in sk_has_account()
1577 static inline bool sk_wmem_schedule(struct sock *sk, int size) in sk_wmem_schedule()
1588 __sk_rmem_schedule(struct sock *sk, int size, bool pfmemalloc) in __sk_rmem_schedule()
1600 sk_rmem_schedule(struct sock *sk, const struct sk_buff *skb, int size) in sk_rmem_schedule()
1605 static inline int sk_unused_reserved_mem(const struct sock *sk) in sk_unused_reserved_mem()
1618 static inline void sk_mem_reclaim(struct sock *sk) in sk_mem_reclaim()
1631 static inline void sk_mem_reclaim_final(struct sock *sk) in sk_mem_reclaim_final()
1637 static inline void sk_mem_charge(struct sock *sk, int size) in sk_mem_charge()
1644 static inline void sk_mem_uncharge(struct sock *sk, int size) in sk_mem_uncharge()
1652 void __sk_charge(struct sock *sk, gfp_t gfp);
1655 static inline void sk_owner_set(struct sock *sk, struct module *owner) in sk_owner_set()
1661 static inline void sk_owner_clear(struct sock *sk) in sk_owner_clear()
1666 static inline void sk_owner_put(struct sock *sk) in sk_owner_put()
1671 static inline void sk_owner_set(struct sock *sk, struct module *owner) in sk_owner_set()
1675 static inline void sk_owner_clear(struct sock *sk) in sk_owner_clear()
1679 static inline void sk_owner_put(struct sock *sk) in sk_owner_put()
1703 static inline bool lockdep_sock_is_held(const struct sock *sk) in lockdep_sock_is_held()
1709 void lock_sock_nested(struct sock *sk, int subclass);
1711 static inline void lock_sock(struct sock *sk) in lock_sock()
1716 void __release_sock(struct sock *sk);
1717 void release_sock(struct sock *sk);
1726 bool __lock_sock_fast(struct sock *sk) __acquires(&sk->sk_lock.slock);
1741 static inline bool lock_sock_fast(struct sock *sk) in lock_sock_fast()
1750 static inline bool lock_sock_fast_nested(struct sock *sk) in lock_sock_fast_nested()
1765 static inline void unlock_sock_fast(struct sock *sk, bool slow) in unlock_sock_fast()
1777 void sockopt_lock_sock(struct sock *sk);
1778 void sockopt_release_sock(struct sock *sk);
1796 static inline void sock_owned_by_me(const struct sock *sk) in sock_owned_by_me()
1803 static inline void sock_not_owned_by_me(const struct sock *sk) in sock_not_owned_by_me()
1810 static inline bool sock_owned_by_user(const struct sock *sk) in sock_owned_by_user()
1816 static inline bool sock_owned_by_user_nocheck(const struct sock *sk) in sock_owned_by_user_nocheck()
1821 static inline void sock_release_ownership(struct sock *sk) in sock_release_ownership()
1831 static inline bool sock_allow_reclassification(const struct sock *csk) in sock_allow_reclassification()
1833 struct sock *sk = (struct sock *)csk; in sock_allow_reclassification()
1839 struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
1841 void sk_free(struct sock *sk);
1842 void sk_net_refcnt_upgrade(struct sock *sk);
1843 void sk_destruct(struct sock *sk);
1844 struct sock *sk_clone(const struct sock *sk, const gfp_t priority, bool lock);
1846 static inline struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) in sk_clone_lock()
1851 struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,
1855 struct sk_buff *sock_omalloc(struct sock *sk, unsigned long size,
1864 static inline void skb_set_owner_edemux(struct sk_buff *skb, struct sock *sk) in skb_set_owner_edemux()
1876 int sk_setsockopt(struct sock *sk, int level, int optname,
1878 int sock_setsockopt(struct socket *sock, int level, int op,
1880 int do_sock_setsockopt(struct socket *sock, bool compat, int level,
1882 int do_sock_getsockopt(struct socket *sock, bool compat, int level,
1885 int sk_getsockopt(struct sock *sk, int level, int optname,
1887 int sock_gettstamp(struct socket *sock, void __user *userstamp,
1889 struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
1893 static inline struct sk_buff *sock_alloc_send_skb(struct sock *sk, in sock_alloc_send_skb()
1900 void *sock_kmalloc(struct sock *sk, int size, gfp_t priority);
1901 void *sock_kmemdup(struct sock *sk, const void *src,
1903 void sock_kfree_s(struct sock *sk, void *mem, int size);
1904 void sock_kzfree_s(struct sock *sk, void *mem, int size);
1905 void sk_send_sigurg(struct sock *sk);
1907 static inline void sock_replace_proto(struct sock *sk, struct proto *proto) in sock_replace_proto()
1924 const struct sock *sk) in sockcm_init()
1933 int __sock_cmsg_send(struct sock *sk, struct cmsghdr *cmsg,
1935 int sock_cmsg_send(struct sock *sk, struct msghdr *msg,
1942 int sock_no_bind(struct socket *sock, struct sockaddr_unsized *saddr, int len);
1943 int sock_no_connect(struct socket *sock, struct sockaddr_unsized *saddr, int len, int flags);
1951 int sock_no_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t len);
1953 int sock_no_mmap(struct file *file, struct socket *sock,
1960 int sock_common_getsockopt(struct socket *sock, int level, int optname,
1962 int sock_common_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1964 int sock_common_setsockopt(struct socket *sock, int level, int optname,
1967 void sk_common_release(struct sock *sk);
1974 void sock_init_data_uid(struct socket *sock, struct sock *sk, kuid_t uid);
1977 * Assumes struct socket *sock is embedded in a struct socket_alloc.
1979 void sock_init_data(struct socket *sock, struct sock *sk);
2007 static inline void sock_put(struct sock *sk) in sock_put()
2015 void sock_gen_put(struct sock *sk);
2017 int __sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested,
2019 static inline int sk_receive_skb(struct sock *sk, struct sk_buff *skb, in sk_receive_skb()
2025 static inline void sk_tx_queue_set(struct sock *sk, int tx_queue) in sk_tx_queue_set()
2046 static inline void sk_tx_queue_clear(struct sock *sk) in sk_tx_queue_clear()
2054 int sk_tx_queue_get(const struct sock *sk);
2056 static inline void __sk_rx_queue_set(struct sock *sk, in __sk_rx_queue_set()
2071 static inline void sk_rx_queue_set(struct sock *sk, const struct sk_buff *skb) in sk_rx_queue_set()
2076 static inline void sk_rx_queue_update(struct sock *sk, const struct sk_buff *skb) in sk_rx_queue_update()
2081 static inline void sk_rx_queue_clear(struct sock *sk) in sk_rx_queue_clear()
2088 static inline int sk_rx_queue_get(const struct sock *sk) in sk_rx_queue_get()
2102 static inline void sk_set_socket(struct sock *sk, struct socket *sock) in sk_set_socket() argument
2104 WRITE_ONCE(sk->sk_socket, sock); in sk_set_socket()
2105 if (sock) { in sk_set_socket()
2106 WRITE_ONCE(sk->sk_uid, SOCK_INODE(sock)->i_uid); in sk_set_socket()
2107 WRITE_ONCE(sk->sk_ino, SOCK_INODE(sock)->i_ino); in sk_set_socket()
2114 static inline wait_queue_head_t *sk_sleep(struct sock *sk) in sk_sleep()
2121 * Note that parent inode held reference count on this struct sock,
2126 static inline void sock_orphan(struct sock *sk) in sock_orphan()
2135 static inline void sock_graft(struct sock *sk, struct socket *parent) in sock_graft()
2146 static inline u64 sock_i_ino(const struct sock *sk) in sock_i_ino()
2152 static inline kuid_t sk_uid(const struct sock *sk) in sk_uid()
2158 static inline kuid_t sock_net_uid(const struct net *net, const struct sock *sk) in sock_net_uid()
2170 static inline void sk_set_txhash(struct sock *sk) in sk_set_txhash()
2176 static inline bool sk_rethink_txhash(struct sock *sk) in sk_rethink_txhash()
2186 __sk_dst_get(const struct sock *sk) in __sk_dst_get()
2193 sk_dst_get(const struct sock *sk) in sk_dst_get()
2205 static inline void __dst_negative_advice(struct sock *sk) in __dst_negative_advice()
2213 static inline void dst_negative_advice(struct sock *sk) in dst_negative_advice()
2220 __sk_dst_set(struct sock *sk, struct dst_entry *dst) in __sk_dst_set()
2233 sk_dst_set(struct sock *sk, struct dst_entry *dst) in sk_dst_set()
2244 __sk_dst_reset(struct sock *sk) in __sk_dst_reset()
2250 sk_dst_reset(struct sock *sk) in sk_dst_reset()
2255 struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie);
2257 struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie);
2259 static inline void sk_dst_confirm(struct sock *sk) in sk_dst_confirm()
2268 struct sock *sk = skb->sk; in sock_confirm_neigh()
2276 bool sk_mc_loop(const struct sock *sk);
2278 static inline bool sk_can_gso(const struct sock *sk) in sk_can_gso()
2283 void sk_setup_caps(struct sock *sk, struct dst_entry *dst);
2285 static inline void sk_gso_disable(struct sock *sk) in sk_gso_disable()
2291 static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb, in skb_do_copy_data_nocache()
2309 static inline int skb_add_data_nocache(struct sock *sk, struct sk_buff *skb, in skb_add_data_nocache()
2322 static inline int skb_copy_to_page_nocache(struct sock *sk, struct iov_iter *from, in skb_copy_to_page_nocache()
2347 static inline int sk_wmem_alloc_get(const struct sock *sk) in sk_wmem_alloc_get()
2358 static inline int sk_rmem_alloc_get(const struct sock *sk) in sk_rmem_alloc_get()
2369 static inline bool sk_has_allocations(const struct sock *sk) in sk_has_allocations()
2413 * @sock: socket to wait on
2418 static inline void sock_poll_wait(struct file *filp, struct socket *sock, in sock_poll_wait() argument
2426 poll_wait(filp, &sock->wq.wait, p); in sock_poll_wait()
2429 static inline void skb_set_hash_from_sk(struct sk_buff *skb, struct sock *sk) in skb_set_hash_from_sk()
2440 void skb_set_owner_w(struct sk_buff *skb, struct sock *sk);
2450 static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) in skb_set_owner_r()
2459 static inline __must_check bool skb_set_owner_sk_safe(struct sk_buff *skb, struct sock *sk) in skb_set_owner_sk_safe()
2470 static inline struct sk_buff *skb_clone_and_charge_r(struct sk_buff *skb, struct sock *sk) in skb_clone_and_charge_r()
2492 void sk_reset_timer(struct sock *sk, struct timer_list *timer,
2495 void sk_stop_timer(struct sock *sk, struct timer_list *timer);
2497 void sk_stop_timer_sync(struct sock *sk, struct timer_list *timer);
2499 int __sk_queue_drop_skb(struct sock *sk, struct sk_buff_head *sk_queue,
2501 void (*destructor)(struct sock *sk,
2503 int __sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
2506 sock_queue_rcv_skb_reason(struct sock *sk, struct sk_buff *skb);
2508 static inline int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) in sock_queue_rcv_skb()
2524 int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb);
2525 struct sk_buff *sock_dequeue_err_skb(struct sock *sk);
2531 static inline int sock_error(struct sock *sk) in sock_error()
2545 void sk_error_report(struct sock *sk);
2547 static inline unsigned long sock_wspace(struct sock *sk) in sock_wspace()
2563 static inline void sk_set_bit(int nr, struct sock *sk) in sk_set_bit()
2572 static inline void sk_clear_bit(int nr, struct sock *sk) in sk_clear_bit()
2581 static inline void sk_wake_async(const struct sock *sk, int how, int band) in sk_wake_async()
2590 static inline void sk_wake_async_rcu(const struct sock *sk, int how, int band) in sk_wake_async_rcu()
2606 static inline void sk_stream_moderate_sndbuf(struct sock *sk) in sk_stream_moderate_sndbuf()
2635 static inline struct page_frag *sk_page_frag(struct sock *sk) in sk_page_frag()
2643 bool sk_page_frag_refill(struct sock *sk, struct page_frag *pfrag);
2645 static inline bool __sock_writeable(const struct sock *sk, int wmem_alloc) in __sock_writeable()
2652 static inline bool sock_writeable(const struct sock *sk) in sock_writeable()
2668 static inline struct mem_cgroup *mem_cgroup_from_sk(const struct sock *sk) in mem_cgroup_from_sk()
2673 static inline bool mem_cgroup_sk_enabled(const struct sock *sk) in mem_cgroup_sk_enabled()
2678 static inline bool mem_cgroup_sk_under_memory_pressure(const struct sock *sk) in mem_cgroup_sk_under_memory_pressure()
2699 static inline struct mem_cgroup *mem_cgroup_from_sk(const struct sock *sk) in mem_cgroup_from_sk()
2704 static inline bool mem_cgroup_sk_enabled(const struct sock *sk) in mem_cgroup_sk_enabled()
2709 static inline bool mem_cgroup_sk_under_memory_pressure(const struct sock *sk) in mem_cgroup_sk_under_memory_pressure()
2715 static inline long sock_rcvtimeo(const struct sock *sk, bool noblock) in sock_rcvtimeo()
2720 static inline long sock_sndtimeo(const struct sock *sk, bool noblock) in sock_sndtimeo()
2725 static inline int sock_rcvlowat(const struct sock *sk, int waitall, int len) in sock_rcvlowat()
2757 static inline void sk_drops_add(struct sock *sk, int segs) in sk_drops_add()
2767 static inline void sk_drops_inc(struct sock *sk) in sk_drops_inc()
2772 static inline int sk_drops_read(const struct sock *sk) in sk_drops_read()
2783 static inline void sk_drops_reset(struct sock *sk) in sk_drops_reset()
2793 sock_skb_set_dropcount(const struct sock *sk, struct sk_buff *skb) in sock_skb_set_dropcount()
2799 static inline void sk_drops_skbadd(struct sock *sk, const struct sk_buff *skb) in sk_drops_skbadd()
2806 static inline ktime_t sock_read_timestamp(struct sock *sk) in sock_read_timestamp()
2823 static inline void sock_write_timestamp(struct sock *sk, ktime_t kt) in sock_write_timestamp()
2834 void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
2836 void __sock_recv_wifi_status(struct msghdr *msg, struct sock *sk,
2839 bool skb_has_tx_timestamp(struct sk_buff *skb, const struct sock *sk);
2840 int skb_get_tx_timestamp(struct sk_buff *skb, struct sock *sk,
2844 sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) in sock_recv_timestamp()
2868 void __sock_recv_cmsgs(struct msghdr *msg, struct sock *sk,
2872 static inline void sock_recv_cmsgs(struct msghdr *msg, struct sock *sk, in sock_recv_cmsgs()
2902 static inline void _sock_tx_timestamp(struct sock *sk, in _sock_tx_timestamp()
2920 static inline void sock_tx_timestamp(struct sock *sk, in sock_tx_timestamp()
2934 static inline bool sk_is_inet(const struct sock *sk) in sk_is_inet()
2941 static inline bool sk_is_tcp(const struct sock *sk) in sk_is_tcp()
2948 static inline bool sk_is_udp(const struct sock *sk) in sk_is_udp()
2955 static inline bool sk_is_unix(const struct sock *sk) in sk_is_unix()
2960 static inline bool sk_is_stream_unix(const struct sock *sk) in sk_is_stream_unix()
2965 static inline bool sk_is_vsock(const struct sock *sk) in sk_is_vsock()
2970 static inline bool sk_may_scm_recv(const struct sock *sk) in sk_may_scm_recv()
2985 static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb) in sk_eat_skb()
3004 static inline bool sk_fullsock(const struct sock *sk) in sk_fullsock()
3010 sk_is_refcounted(struct sock *sk) in sk_is_refcounted()
3017 sk_requests_wifi_status(struct sock *sk) in sk_requests_wifi_status()
3025 static inline bool sk_listener(const struct sock *sk) in sk_listener()
3034 static inline bool sk_listener_or_tw(const struct sock *sk) in sk_listener_or_tw()
3040 void sock_enable_timestamp(struct sock *sk, enum sock_flags flag);
3041 int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len, int level,
3044 bool sk_ns_capable(const struct sock *sk,
3046 bool sk_capable(const struct sock *sk, int cap);
3047 bool sk_net_capable(const struct sock *sk, int cap);
3049 void sk_get_meminfo(const struct sock *sk, u32 *meminfo);
3070 static inline int sk_get_wmem0(const struct sock *sk, const struct proto *proto) in sk_get_wmem0()
3079 static inline int sk_get_rmem0(const struct sock *sk, const struct proto *proto) in sk_get_rmem0()
3092 static inline void sk_pacing_shift_update(struct sock *sk, int val) in sk_pacing_shift_update()
3104 static inline bool sk_dev_equal_l3scope(struct sock *sk, int dif) in sk_dev_equal_l3scope()
3119 void sock_def_readable(struct sock *sk);
3121 int sock_bindtoindex(struct sock *sk, int ifindex, bool lock_sk);
3122 void sock_set_timestamp(struct sock *sk, int optname, bool valbool);
3123 int sock_set_timestamping(struct sock *sk, int optname,
3127 void bpf_skops_tx_timestamping(struct sock *sk, struct sk_buff *skb, int op);
3129 static inline void bpf_skops_tx_timestamping(struct sock *sk, struct sk_buff *skb, int op) in bpf_skops_tx_timestamping()
3133 void sock_no_linger(struct sock *sk);
3134 void sock_set_keepalive(struct sock *sk);
3135 void sock_set_priority(struct sock *sk, u32 priority);
3136 void sock_set_rcvbuf(struct sock *sk, int val);
3137 void sock_set_mark(struct sock *sk, u32 val);
3138 void sock_set_reuseaddr(struct sock *sk);
3139 void sock_set_reuseport(struct sock *sk);
3140 void sock_set_sndtimeo(struct sock *sk, s64 secs);
3142 int sock_bind_add(struct sock *sk, struct sockaddr_unsized *addr, int addr_len);
3148 int sock_ioctl_inout(struct sock *sk, unsigned int cmd,
3150 int sk_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
3151 static inline bool sk_is_readable(struct sock *sk) in sk_is_readable()