Lines Matching refs:sk
137 static inline bool udp_hashed4(const struct sock *sk) in udp_hashed4() argument
180 static inline bool udp_hashed4(const struct sock *sk) in udp_hashed4() argument
182 return !hlist_nulls_unhashed(&udp_sk(sk)->udp_lrpa_node); in udp_hashed4()
239 static inline __wsum udp_csum_outgoing(struct sock *sk, struct sk_buff *skb) in udp_csum_outgoing() argument
243 skb_queue_walk(&sk->sk_write_queue, skb) { in udp_csum_outgoing()
287 static inline void udp_lib_init_sock(struct sock *sk) in udp_lib_init_sock() argument
289 struct udp_sock *up = udp_sk(sk); in udp_lib_init_sock()
293 up->forward_threshold = sk->sk_rcvbuf >> 2; in udp_lib_init_sock()
294 set_bit(SOCK_CUSTOM_SOCKOPT, &sk->sk_socket->flags); in udp_lib_init_sock()
298 static inline int udp_lib_hash(struct sock *sk) in udp_lib_hash() argument
304 void udp_lib_unhash(struct sock *sk);
305 void udp_lib_rehash(struct sock *sk, u16 new_hash, u16 new_hash4);
309 static inline void udp_lib_close(struct sock *sk, long timeout) in udp_lib_close() argument
311 sk_common_release(sk); in udp_lib_close()
316 static inline void udp_lib_hash4(struct sock *sk, u16 hash) in udp_lib_hash4() argument
320 static inline void udp4_hash4(struct sock *sk) in udp4_hash4() argument
324 void udp_lib_hash4(struct sock *sk, u16 hash);
325 void udp4_hash4(struct sock *sk);
328 int udp_lib_get_port(struct sock *sk, unsigned short snum,
369 static inline int udp_rqueue_get(struct sock *sk) in udp_rqueue_get() argument
371 return sk_rmem_alloc_get(sk) - READ_ONCE(udp_sk(sk)->forward_deficit); in udp_rqueue_get()
386 void udp_destruct_common(struct sock *sk);
387 void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len);
388 int __udp_enqueue_schedule_skb(struct sock *sk, struct sk_buff *skb);
389 void udp_skb_destructor(struct sock *sk, struct sk_buff *skb);
390 struct sk_buff *__skb_recv_udp(struct sock *sk, unsigned int flags, int *off,
392 static inline struct sk_buff *skb_recv_udp(struct sock *sk, unsigned int flags, in skb_recv_udp() argument
397 return __skb_recv_udp(sk, flags, &off, err); in skb_recv_udp()
401 bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst);
403 int udp_abort(struct sock *sk, int err);
404 int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len);
406 int udp_push_pending_frames(struct sock *sk);
407 void udp_flush_pending_frames(struct sock *sk);
408 int udp_cmsg_send(struct sock *sk, struct msghdr *msg, u16 *gso_size);
411 int udp_ioctl(struct sock *sk, int cmd, int *karg);
412 int udp_init_sock(struct sock *sk);
413 int udp_pre_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
414 int __udp_disconnect(struct sock *sk, int flags);
415 int udp_disconnect(struct sock *sk, int flags);
420 int udp_lib_getsockopt(struct sock *sk, int level, int optname,
422 int udp_lib_setsockopt(struct sock *sk, int level, int optname,
444 int udp_read_skb(struct sock *sk, skb_read_actor_t recv_actor);
532 #define __UDPX_MIB(sk, ipv4) \ argument
534 ipv4 ? (IS_UDPLITE(sk) ? sock_net(sk)->mib.udplite_statistics : \
535 sock_net(sk)->mib.udp_statistics) : \
536 (IS_UDPLITE(sk) ? sock_net(sk)->mib.udplite_stats_in6 : \
537 sock_net(sk)->mib.udp_stats_in6); \
540 #define __UDPX_MIB(sk, ipv4) \ argument
542 IS_UDPLITE(sk) ? sock_net(sk)->mib.udplite_statistics : \
543 sock_net(sk)->mib.udp_statistics; \
547 #define __UDPX_INC_STATS(sk, field) \ argument
548 __SNMP_INC_STATS(__UDPX_MIB(sk, (sk)->sk_family == AF_INET), field)
584 static inline struct sk_buff *udp_rcv_segment(struct sock *sk, in udp_rcv_segment() argument
603 if (!inet_get_convert_csum(sk)) in udp_rcv_segment()
630 atomic_add(drop_count, &sk->sk_drops); in udp_rcv_segment()
631 SNMP_ADD_STATS(__UDPX_MIB(sk, ipv4), UDP_MIB_INERRORS, drop_count); in udp_rcv_segment()
661 int udp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);