Lines Matching refs:sock

159 bool sk_ns_capable(const struct sock *sk,  in sk_ns_capable()
176 bool sk_capable(const struct sock *sk, int cap) in sk_capable()
191 bool sk_net_capable(const struct sock *sk, int cap) in sk_net_capable()
342 void sk_set_memalloc(struct sock *sk) in sk_set_memalloc()
350 void sk_clear_memalloc(struct sock *sk) in sk_clear_memalloc()
367 int __sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) in __sk_backlog_rcv()
425 static bool sock_needs_netstamp(const struct sock *sk) in sock_needs_netstamp()
436 static void sock_disable_timestamp(struct sock *sk, unsigned long flags) in sock_disable_timestamp()
447 int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) in sock_queue_rcv_skb()
487 int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested) in sk_receive_skb()
529 struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie) in __sk_dst_check()
544 struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie) in sk_dst_check()
558 static int sock_setbindtodevice(struct sock *sk, char __user *optval, in sock_setbindtodevice()
616 static int sock_getbindtodevice(struct sock *sk, char __user *optval, in sock_getbindtodevice()
656 static inline void sock_valbool_flag(struct sock *sk, int bit, int valbool) in sock_valbool_flag()
664 bool sk_mc_loop(struct sock *sk) in sk_mc_loop()
688 int sock_setsockopt(struct socket *sock, int level, int optname, in sock_setsockopt() argument
691 struct sock *sk = sock->sk; in sock_setsockopt()
847 set_bit(SOCK_PASSCRED, &sock->flags); in sock_setsockopt()
849 clear_bit(SOCK_PASSCRED, &sock->flags); in sock_setsockopt()
948 set_bit(SOCK_PASSSEC, &sock->flags); in sock_setsockopt()
950 clear_bit(SOCK_PASSSEC, &sock->flags); in sock_setsockopt()
968 if (sock->ops->set_peek_off) in sock_setsockopt()
969 ret = sock->ops->set_peek_off(sk, val); in sock_setsockopt()
1029 int sock_getsockopt(struct socket *sock, int level, int optname, in sock_getsockopt() argument
1032 struct sock *sk = sock->sk; in sock_getsockopt()
1167 v.val = !!test_bit(SOCK_PASSCRED, &sock->flags); in sock_getsockopt()
1185 if (sock->ops->getname(sock, (struct sockaddr *)address, &lv, 2)) in sock_getsockopt()
1202 v.val = !!test_bit(SOCK_PASSSEC, &sock->flags); in sock_getsockopt()
1206 return security_socket_getpeersec_stream(sock, optval, optlen, len); in sock_getsockopt()
1221 if (!sock->ops->set_peek_off) in sock_getsockopt()
1288 static inline void sock_lock_init(struct sock *sk) in sock_lock_init()
1302 static void sock_copy(struct sock *nsk, const struct sock *osk) in sock_copy()
1307 memcpy(nsk, osk, offsetof(struct sock, sk_dontcopy_begin)); in sock_copy()
1310 osk->sk_prot->obj_size - offsetof(struct sock, sk_dontcopy_end)); in sock_copy()
1318 void sk_prot_clear_portaddr_nulls(struct sock *sk, int size) in sk_prot_clear_portaddr_nulls()
1322 nulls1 = offsetof(struct sock, __sk_common.skc_node.next); in sk_prot_clear_portaddr_nulls()
1323 nulls2 = offsetof(struct sock, __sk_common.skc_portaddr_node.next); in sk_prot_clear_portaddr_nulls()
1336 static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, in sk_prot_alloc()
1339 struct sock *sk; in sk_prot_alloc()
1379 static void sk_prot_free(struct proto *prot, struct sock *sk) in sk_prot_free()
1396 void sock_update_netprioidx(struct sock *sk) in sock_update_netprioidx()
1414 struct sock *sk_alloc(struct net *net, int family, gfp_t priority, in sk_alloc()
1417 struct sock *sk; in sk_alloc()
1442 void sk_destruct(struct sock *sk) in sk_destruct()
1470 static void __sk_free(struct sock *sk) in __sk_free()
1478 void sk_free(struct sock *sk) in sk_free()
1490 static void sk_update_clone(const struct sock *sk, struct sock *newsk) in sk_update_clone()
1503 struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) in sk_clone_lock()
1505 struct sock *newsk; in sk_clone_lock()
1604 void sk_setup_caps(struct sock *sk, struct dst_entry *dst) in sk_setup_caps()
1636 struct sock *sk = skb->sk; in sock_wfree()
1657 void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) in skb_set_owner_w()
1703 struct sock *sk = skb->sk; in sock_rfree()
1721 kuid_t sock_i_uid(struct sock *sk) in sock_i_uid()
1732 unsigned long sock_i_ino(struct sock *sk) in sock_i_ino()
1746 struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, in sock_wmalloc()
1763 void *sock_kmalloc(struct sock *sk, int size, gfp_t priority) in sock_kmalloc()
1785 static inline void __sock_kfree_s(struct sock *sk, void *mem, int size, in __sock_kfree_s()
1797 void sock_kfree_s(struct sock *sk, void *mem, int size) in sock_kfree_s()
1803 void sock_kzfree_s(struct sock *sk, void *mem, int size) in sock_kzfree_s()
1812 static long sock_wait_for_wmem(struct sock *sk, long timeo) in sock_wait_for_wmem()
1841 struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len, in sock_alloc_send_pskb()
1885 struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, in sock_alloc_send_skb()
1892 int sock_cmsg_send(struct sock *sk, struct msghdr *msg, in sock_cmsg_send()
1964 bool sk_page_frag_refill(struct sock *sk, struct page_frag *pfrag) in sk_page_frag_refill()
1975 static void __lock_sock(struct sock *sk) in __lock_sock()
1993 static void __release_sock(struct sock *sk) in __release_sock()
2043 int sk_wait_data(struct sock *sk, long *timeo, const struct sk_buff *skb) in sk_wait_data()
2067 int __sk_mem_schedule(struct sock *sk, int size, int kind) in __sk_mem_schedule()
2150 void __sk_mem_reclaim(struct sock *sk, int amount) in __sk_mem_reclaim()
2170 int sock_no_bind(struct socket *sock, struct sockaddr *saddr, int len) in sock_no_bind() argument
2176 int sock_no_connect(struct socket *sock, struct sockaddr *saddr, in sock_no_connect() argument
2189 int sock_no_accept(struct socket *sock, struct socket *newsock, int flags) in sock_no_accept() argument
2195 int sock_no_getname(struct socket *sock, struct sockaddr *saddr, in sock_no_getname() argument
2202 unsigned int sock_no_poll(struct file *file, struct socket *sock, poll_table *pt) in sock_no_poll() argument
2208 int sock_no_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in sock_no_ioctl() argument
2214 int sock_no_listen(struct socket *sock, int backlog) in sock_no_listen() argument
2220 int sock_no_shutdown(struct socket *sock, int how) in sock_no_shutdown() argument
2226 int sock_no_setsockopt(struct socket *sock, int level, int optname, in sock_no_setsockopt() argument
2233 int sock_no_getsockopt(struct socket *sock, int level, int optname, in sock_no_getsockopt() argument
2240 int sock_no_sendmsg(struct socket *sock, struct msghdr *m, size_t len) in sock_no_sendmsg() argument
2246 int sock_no_recvmsg(struct socket *sock, struct msghdr *m, size_t len, in sock_no_recvmsg() argument
2253 int sock_no_mmap(struct file *file, struct socket *sock, struct vm_area_struct *vma) in sock_no_mmap() argument
2260 ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags) in sock_no_sendpage() argument
2268 res = kernel_sendmsg(sock, &msg, &iov, 1, size); in sock_no_sendpage()
2278 static void sock_def_wakeup(struct sock *sk) in sock_def_wakeup()
2289 static void sock_def_error_report(struct sock *sk) in sock_def_error_report()
2301 static void sock_def_readable(struct sock *sk) in sock_def_readable()
2314 static void sock_def_write_space(struct sock *sk) in sock_def_write_space()
2337 static void sock_def_destruct(struct sock *sk) in sock_def_destruct()
2341 void sk_send_sigurg(struct sock *sk) in sk_send_sigurg()
2349 void sk_reset_timer(struct sock *sk, struct timer_list* timer, in sk_reset_timer()
2357 void sk_stop_timer(struct sock *sk, struct timer_list* timer) in sk_stop_timer()
2364 void sock_init_data(struct socket *sock, struct sock *sk) in sock_init_data() argument
2378 sk_set_socket(sk, sock); in sock_init_data()
2382 if (sock) { in sock_init_data()
2383 sk->sk_type = sock->type; in sock_init_data()
2384 sk->sk_wq = sock->wq; in sock_init_data()
2385 sock->sk = sk; in sock_init_data()
2431 void lock_sock_nested(struct sock *sk, int subclass) in lock_sock_nested()
2447 void release_sock(struct sock *sk) in release_sock()
2481 bool lock_sock_fast(struct sock *sk) in lock_sock_fast()
2504 int sock_get_timestamp(struct sock *sk, struct timeval __user *userstamp) in sock_get_timestamp()
2520 int sock_get_timestampns(struct sock *sk, struct timespec __user *userstamp) in sock_get_timestampns()
2536 void sock_enable_timestamp(struct sock *sk, int flag) in sock_enable_timestamp()
2553 int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len, in sock_recv_errqueue()
2596 int sock_common_getsockopt(struct socket *sock, int level, int optname, in sock_common_getsockopt() argument
2599 struct sock *sk = sock->sk; in sock_common_getsockopt()
2606 int compat_sock_common_getsockopt(struct socket *sock, int level, int optname, in compat_sock_common_getsockopt() argument
2609 struct sock *sk = sock->sk; in compat_sock_common_getsockopt()
2619 int sock_common_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, in sock_common_recvmsg() argument
2622 struct sock *sk = sock->sk; in sock_common_recvmsg()
2637 int sock_common_setsockopt(struct socket *sock, int level, int optname, in sock_common_setsockopt() argument
2640 struct sock *sk = sock->sk; in sock_common_setsockopt()
2647 int compat_sock_common_setsockopt(struct socket *sock, int level, int optname, in compat_sock_common_setsockopt() argument
2650 struct sock *sk = sock->sk; in compat_sock_common_setsockopt()
2660 void sk_common_release(struct sock *sk) in sk_common_release()