Lines Matching refs:sock
103 void SOCK_DEBUG(const struct sock *sk, const char *msg, ...) in SOCK_DEBUG()
127 struct sock;
301 struct sock { struct
429 void (*sk_state_change)(struct sock *sk); argument
430 void (*sk_data_ready)(struct sock *sk); argument
431 void (*sk_write_space)(struct sock *sk); argument
432 void (*sk_error_report)(struct sock *sk); argument
433 int (*sk_backlog_rcv)(struct sock *sk, argument
435 void (*sk_destruct)(struct sock *sk); argument
454 static inline int sk_peek_offset(struct sock *sk, int flags) in sk_peek_offset()
462 static inline void sk_peek_offset_bwd(struct sock *sk, int val) in sk_peek_offset_bwd()
472 static inline void sk_peek_offset_fwd(struct sock *sk, int val) in sk_peek_offset_fwd()
481 static inline struct sock *sk_entry(const struct hlist_node *node) in sk_entry()
483 return hlist_entry(node, struct sock, sk_node); in sk_entry()
486 static inline struct sock *__sk_head(const struct hlist_head *head) in __sk_head()
488 return hlist_entry(head->first, struct sock, sk_node); in __sk_head()
491 static inline struct sock *sk_head(const struct hlist_head *head) in sk_head()
496 static inline struct sock *__sk_nulls_head(const struct hlist_nulls_head *head) in __sk_nulls_head()
498 return hlist_nulls_entry(head->first, struct sock, sk_nulls_node); in __sk_nulls_head()
501 static inline struct sock *sk_nulls_head(const struct hlist_nulls_head *head) in sk_nulls_head()
506 static inline struct sock *sk_next(const struct sock *sk) in sk_next()
509 hlist_entry(sk->sk_node.next, struct sock, sk_node) : NULL; in sk_next()
512 static inline struct sock *sk_nulls_next(const struct sock *sk) in sk_nulls_next()
516 struct sock, sk_nulls_node) : in sk_nulls_next()
520 static inline bool sk_unhashed(const struct sock *sk) in sk_unhashed()
525 static inline bool sk_hashed(const struct sock *sk) in sk_hashed()
540 static inline void __sk_del_node(struct sock *sk) in __sk_del_node()
546 static inline bool __sk_del_node_init(struct sock *sk) in __sk_del_node_init()
562 static inline void sock_hold(struct sock *sk) in sock_hold()
570 static inline void __sock_put(struct sock *sk) in __sock_put()
575 static inline bool sk_del_node_init(struct sock *sk) in sk_del_node_init()
588 static inline bool __sk_nulls_del_node_init_rcu(struct sock *sk) in __sk_nulls_del_node_init_rcu()
597 static inline bool sk_nulls_del_node_init_rcu(struct sock *sk) in sk_nulls_del_node_init_rcu()
609 static inline void __sk_add_node(struct sock *sk, struct hlist_head *list) in __sk_add_node()
614 static inline void sk_add_node(struct sock *sk, struct hlist_head *list) in sk_add_node()
620 static inline void sk_add_node_rcu(struct sock *sk, struct hlist_head *list) in sk_add_node_rcu()
626 static inline void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) in __sk_nulls_add_node_rcu()
631 static inline void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) in sk_nulls_add_node_rcu()
637 static inline void __sk_del_bind_node(struct sock *sk) in __sk_del_bind_node()
642 static inline void sk_add_bind_node(struct sock *sk, in sk_add_bind_node()
680 static inline struct user_namespace *sk_user_ns(struct sock *sk) in sk_user_ns()
722 static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) in sock_copy_flags()
727 static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) in sock_set_flag()
732 static inline void sock_reset_flag(struct sock *sk, enum sock_flags flag) in sock_reset_flag()
737 static inline bool sock_flag(const struct sock *sk, enum sock_flags flag) in sock_flag()
757 static inline gfp_t sk_gfp_atomic(struct sock *sk, gfp_t gfp_mask) in sk_gfp_atomic()
762 static inline void sk_acceptq_removed(struct sock *sk) in sk_acceptq_removed()
767 static inline void sk_acceptq_added(struct sock *sk) in sk_acceptq_added()
772 static inline bool sk_acceptq_is_full(const struct sock *sk) in sk_acceptq_is_full()
780 static inline int sk_stream_min_wspace(const struct sock *sk) in sk_stream_min_wspace()
785 static inline int sk_stream_wspace(const struct sock *sk) in sk_stream_wspace()
790 void sk_stream_write_space(struct sock *sk);
793 static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) in __sk_add_backlog()
812 static inline bool sk_rcvqueues_full(const struct sock *sk, unsigned int limit) in sk_rcvqueues_full()
820 static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb, in sk_add_backlog()
839 int __sk_backlog_rcv(struct sock *sk, struct sk_buff *skb);
841 static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) in sk_backlog_rcv()
873 static inline void sock_rps_record_flow(const struct sock *sk) in sock_rps_record_flow()
880 static inline void sock_rps_reset_flow(const struct sock *sk) in sock_rps_reset_flow()
887 static inline void sock_rps_save_rxhash(struct sock *sk, in sock_rps_save_rxhash()
898 static inline void sock_rps_reset_rxhash(struct sock *sk) in sock_rps_reset_rxhash()
918 int sk_stream_wait_connect(struct sock *sk, long *timeo_p);
919 int sk_stream_wait_memory(struct sock *sk, long *timeo_p);
920 void sk_stream_wait_close(struct sock *sk, long timeo_p);
921 int sk_stream_error(struct sock *sk, int flags, int err);
922 void sk_stream_kill_queues(struct sock *sk);
923 void sk_set_memalloc(struct sock *sk);
924 void sk_clear_memalloc(struct sock *sk);
926 int sk_wait_data(struct sock *sk, long *timeo);
938 static inline void sk_prot_clear_nulls(struct sock *sk, int size) in sk_prot_clear_nulls()
940 if (offsetof(struct sock, sk_node.next) != 0) in sk_prot_clear_nulls()
941 memset(sk, 0, offsetof(struct sock, sk_node.next)); in sk_prot_clear_nulls()
943 size - offsetof(struct sock, sk_node.pprev)); in sk_prot_clear_nulls()
951 void (*close)(struct sock *sk,
953 int (*connect)(struct sock *sk,
956 int (*disconnect)(struct sock *sk, int flags);
958 struct sock * (*accept)(struct sock *sk, int flags, int *err);
960 int (*ioctl)(struct sock *sk, int cmd,
962 int (*init)(struct sock *sk);
963 void (*destroy)(struct sock *sk);
964 void (*shutdown)(struct sock *sk, int how);
965 int (*setsockopt)(struct sock *sk, int level,
968 int (*getsockopt)(struct sock *sk, int level,
972 int (*compat_setsockopt)(struct sock *sk,
976 int (*compat_getsockopt)(struct sock *sk,
980 int (*compat_ioctl)(struct sock *sk,
983 int (*sendmsg)(struct kiocb *iocb, struct sock *sk,
985 int (*recvmsg)(struct kiocb *iocb, struct sock *sk,
989 int (*sendpage)(struct sock *sk, struct page *page,
991 int (*bind)(struct sock *sk,
994 int (*backlog_rcv) (struct sock *sk,
997 void (*release_cb)(struct sock *sk);
1000 void (*hash)(struct sock *sk);
1001 void (*unhash)(struct sock *sk);
1002 void (*rehash)(struct sock *sk);
1003 int (*get_port)(struct sock *sk, unsigned short snum);
1004 void (*clear_sk)(struct sock *sk, int size);
1011 bool (*stream_memory_free)(const struct sock *sk);
1013 void (*enter_memory_pressure)(struct sock *sk);
1064 int (*diag_destroy)(struct sock *sk, int err);
1109 static inline void sk_refcnt_debug_inc(struct sock *sk) in sk_refcnt_debug_inc()
1114 static inline void sk_refcnt_debug_dec(struct sock *sk) in sk_refcnt_debug_dec()
1121 static inline void sk_refcnt_debug_release(const struct sock *sk) in sk_refcnt_debug_release()
1150 static inline bool sk_stream_memory_free(const struct sock *sk) in sk_stream_memory_free()
1159 static inline bool sk_stream_is_writeable(const struct sock *sk) in sk_stream_is_writeable()
1166 static inline bool sk_has_memory_pressure(const struct sock *sk) in sk_has_memory_pressure()
1171 static inline bool sk_under_memory_pressure(const struct sock *sk) in sk_under_memory_pressure()
1182 static inline void sk_leave_memory_pressure(struct sock *sk) in sk_leave_memory_pressure()
1202 static inline void sk_enter_memory_pressure(struct sock *sk) in sk_enter_memory_pressure()
1218 static inline long sk_prot_mem_limits(const struct sock *sk, int index) in sk_prot_mem_limits()
1253 sk_memory_allocated(const struct sock *sk) in sk_memory_allocated()
1263 sk_memory_allocated_add(struct sock *sk, int amt, int *parent_status) in sk_memory_allocated_add()
1278 sk_memory_allocated_sub(struct sock *sk, int amt) in sk_memory_allocated_sub()
1288 static inline void sk_sockets_allocated_dec(struct sock *sk) in sk_sockets_allocated_dec()
1302 static inline void sk_sockets_allocated_inc(struct sock *sk) in sk_sockets_allocated_inc()
1317 sk_sockets_allocated_read_positive(struct sock *sk) in sk_sockets_allocated_read_positive()
1363 static inline void __sk_prot_rehash(struct sock *sk) in __sk_prot_rehash()
1369 void sk_prot_clear_portaddr_nulls(struct sock *sk, int size);
1392 struct socket *sock; member
1393 struct sock *sk;
1427 int __sk_mem_schedule(struct sock *sk, int size, int kind);
1428 void __sk_mem_reclaim(struct sock *sk);
1440 static inline bool sk_has_account(struct sock *sk) in sk_has_account()
1446 static inline bool sk_wmem_schedule(struct sock *sk, int size) in sk_wmem_schedule()
1455 sk_rmem_schedule(struct sock *sk, struct sk_buff *skb, int size) in sk_rmem_schedule()
1464 static inline void sk_mem_reclaim(struct sock *sk) in sk_mem_reclaim()
1472 static inline void sk_mem_reclaim_partial(struct sock *sk) in sk_mem_reclaim_partial()
1480 static inline void sk_mem_charge(struct sock *sk, int size) in sk_mem_charge()
1487 static inline void sk_mem_uncharge(struct sock *sk, int size) in sk_mem_uncharge()
1494 static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb) in sk_wmem_free_skb()
1517 static inline void sock_release_ownership(struct sock *sk) in sock_release_ownership()
1541 void lock_sock_nested(struct sock *sk, int subclass);
1543 static inline void lock_sock(struct sock *sk) in lock_sock()
1548 void release_sock(struct sock *sk);
1557 bool lock_sock_fast(struct sock *sk);
1566 static inline void unlock_sock_fast(struct sock *sk, bool slow) in unlock_sock_fast()
1575 struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
1577 void sk_free(struct sock *sk);
1578 void sk_release_kernel(struct sock *sk);
1579 struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority);
1581 struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,
1593 int sock_setsockopt(struct socket *sock, int level, int op,
1596 int sock_getsockopt(struct socket *sock, int level, int op,
1598 struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size,
1600 struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
1603 void *sock_kmalloc(struct sock *sk, int size, gfp_t priority);
1604 void sock_kfree_s(struct sock *sk, void *mem, int size);
1605 void sk_send_sigurg(struct sock *sk);
1626 int sock_no_mmap(struct file *file, struct socket *sock,
1628 ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset,
1635 int sock_common_getsockopt(struct socket *sock, int level, int optname,
1637 int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock,
1639 int sock_common_setsockopt(struct socket *sock, int level, int optname,
1641 int compat_sock_common_getsockopt(struct socket *sock, int level,
1643 int compat_sock_common_setsockopt(struct socket *sock, int level,
1646 void sk_common_release(struct sock *sk);
1653 void sock_init_data(struct socket *sock, struct sock *sk);
1681 static inline void sock_put(struct sock *sk) in sock_put()
1689 void sock_gen_put(struct sock *sk);
1691 int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested);
1693 static inline void sk_tx_queue_set(struct sock *sk, int tx_queue) in sk_tx_queue_set()
1698 static inline void sk_tx_queue_clear(struct sock *sk) in sk_tx_queue_clear()
1703 static inline int sk_tx_queue_get(const struct sock *sk) in sk_tx_queue_get()
1708 static inline void sk_set_socket(struct sock *sk, struct socket *sock) in sk_set_socket() argument
1711 sk->sk_socket = sock; in sk_set_socket()
1714 static inline wait_queue_head_t *sk_sleep(struct sock *sk) in sk_sleep()
1726 static inline void sock_orphan(struct sock *sk) in sock_orphan()
1735 static inline void sock_graft(struct sock *sk, struct socket *parent) in sock_graft()
1746 kuid_t sock_i_uid(struct sock *sk);
1747 unsigned long sock_i_ino(struct sock *sk);
1749 static inline kuid_t sock_net_uid(const struct net *net, const struct sock *sk) in sock_net_uid()
1755 __sk_dst_get(struct sock *sk) in __sk_dst_get()
1762 sk_dst_get(struct sock *sk) in sk_dst_get()
1774 static inline void dst_negative_advice(struct sock *sk) in dst_negative_advice()
1789 __sk_dst_set(struct sock *sk, struct dst_entry *dst) in __sk_dst_set()
1804 sk_dst_set(struct sock *sk, struct dst_entry *dst) in sk_dst_set()
1814 __sk_dst_reset(struct sock *sk) in __sk_dst_reset()
1820 sk_dst_reset(struct sock *sk) in sk_dst_reset()
1825 struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie);
1827 struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie);
1829 bool sk_mc_loop(struct sock *sk);
1831 static inline bool sk_can_gso(const struct sock *sk) in sk_can_gso()
1836 void sk_setup_caps(struct sock *sk, struct dst_entry *dst);
1838 static inline void sk_nocaps_add(struct sock *sk, netdev_features_t flags) in sk_nocaps_add()
1844 static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb, in skb_do_copy_data_nocache()
1864 static inline int skb_add_data_nocache(struct sock *sk, struct sk_buff *skb, in skb_add_data_nocache()
1877 static inline int skb_copy_to_page_nocache(struct sock *sk, char __user *from, in skb_copy_to_page_nocache()
1897 static inline int skb_copy_to_page(struct sock *sk, char __user *from, in skb_copy_to_page()
1926 static inline int sk_wmem_alloc_get(const struct sock *sk) in sk_wmem_alloc_get()
1937 static inline int sk_rmem_alloc_get(const struct sock *sk) in sk_rmem_alloc_get()
1948 static inline bool sk_has_allocations(const struct sock *sk) in sk_has_allocations()
2018 static inline void skb_set_hash_from_sk(struct sk_buff *skb, struct sock *sk) in skb_set_hash_from_sk()
2035 static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) in skb_set_owner_w()
2049 static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) in skb_set_owner_r()
2058 void sk_reset_timer(struct sock *sk, struct timer_list *timer,
2061 void sk_stop_timer(struct sock *sk, struct timer_list *timer);
2063 int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
2065 int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb);
2066 struct sk_buff *sock_dequeue_err_skb(struct sock *sk);
2072 static inline int sock_error(struct sock *sk) in sock_error()
2081 static inline unsigned long sock_wspace(struct sock *sk) in sock_wspace()
2093 static inline void sk_wake_async(struct sock *sk, int how, int band) in sk_wake_async()
2109 static inline void sk_stream_moderate_sndbuf(struct sock *sk) in sk_stream_moderate_sndbuf()
2117 struct sk_buff *sk_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp);
2126 static inline struct page_frag *sk_page_frag(struct sock *sk) in sk_page_frag()
2134 bool sk_page_frag_refill(struct sock *sk, struct page_frag *pfrag);
2139 static inline bool sock_writeable(const struct sock *sk) in sock_writeable()
2149 static inline long sock_rcvtimeo(const struct sock *sk, bool noblock) in sock_rcvtimeo()
2154 static inline long sock_sndtimeo(const struct sock *sk, bool noblock) in sock_sndtimeo()
2159 static inline int sock_rcvlowat(const struct sock *sk, int waitall, int len) in sock_rcvlowat()
2172 void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
2174 void __sock_recv_wifi_status(struct msghdr *msg, struct sock *sk,
2178 sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) in sock_recv_timestamp()
2202 void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
2205 static inline void sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk, in sock_recv_ts_and_drops()
2219 void __sock_tx_timestamp(const struct sock *sk, __u8 *tx_flags);
2228 static inline void sock_tx_timestamp(const struct sock *sk, __u8 *tx_flags) in sock_tx_timestamp()
2244 static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb) in sk_eat_skb()
2251 struct net *sock_net(const struct sock *sk) in sock_net()
2257 void sock_net_set(struct sock *sk, struct net *net) in sock_net_set()
2268 static inline void sk_change_net(struct sock *sk, struct net *net) in sk_change_net()
2278 static inline struct sock *skb_steal_sock(struct sk_buff *skb) in skb_steal_sock()
2281 struct sock *sk = skb->sk; in skb_steal_sock()
2294 static inline bool sk_fullsock(const struct sock *sk) in sk_fullsock()
2299 void sock_enable_timestamp(struct sock *sk, int flag);
2300 int sock_get_timestamp(struct sock *, struct timeval __user *);
2301 int sock_get_timestampns(struct sock *, struct timespec __user *);
2302 int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len, int level,
2305 bool sk_ns_capable(const struct sock *sk,
2307 bool sk_capable(const struct sock *sk, int cap);
2308 bool sk_net_capable(const struct sock *sk, int cap);