Lines Matching refs:sock

62 #include <trace/events/sock.h>
66 #include <net/sock.h>
72 static bool sctp_writeable(const struct sock *sk);
76 static int sctp_wait_for_packet(struct sock *sk, int *err, long *timeo_p);
78 static int sctp_wait_for_accept(struct sock *sk, long timeo);
79 static void sctp_wait_for_close(struct sock *sk, long timeo);
80 static void sctp_destruct_sock(struct sock *sk);
83 static int sctp_bindx_add(struct sock *, struct sockaddr *, int);
84 static int sctp_bindx_rem(struct sock *, struct sockaddr *, int);
85 static int sctp_send_asconf_add_ip(struct sock *, struct sockaddr *, int);
86 static int sctp_send_asconf_del_ip(struct sock *, struct sockaddr *, int);
89 static int sctp_do_bind(struct sock *, union sctp_addr *, int);
90 static int sctp_autobind(struct sock *sk);
91 static int sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
100 static void sctp_enter_memory_pressure(struct sock *sk)
109 struct sock *sk = asoc->base.sk;
127 struct sock *sk = asoc->base.sk;
192 static void sctp_for_each_rx_skb(struct sctp_association *asoc, struct sock *sk,
193 void (*cb)(struct sk_buff *, struct sock *))
209 static inline int sctp_verify_addr(struct sock *sk, union sctp_addr *addr,
232 struct sctp_association *sctp_id2assoc(struct sock *sk, sctp_assoc_t id)
269 static struct sctp_transport *sctp_addr_id2transport(struct sock *sk,
308 static int sctp_bind(struct sock *sk, struct sockaddr *addr, int addr_len)
329 static int sctp_get_port_local(struct sock *, union sctp_addr *);
375 static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
504 static int sctp_bindx_add(struct sock *sk, struct sockaddr *addrs, int addrcnt)
554 static int sctp_send_asconf_add_ip(struct sock *sk,
677 static int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
756 static int sctp_send_asconf_del_ip(struct sock *sk,
910 struct sock *sk = sctp_opt2sk(sp);
998 static int sctp_setsockopt_bindx(struct sock *sk, struct sockaddr *addrs,
1055 static int sctp_bind_add(struct sock *sk, struct sockaddr *addrs,
1072 struct sock *sk = ep->base.sk;
1160 /* __sctp_connect(struct sock* sk, struct sockaddr *kaddrs, int addrs_size)
1165 static int __sctp_connect(struct sock *sk, struct sockaddr *kaddrs,
1310 static int __sctp_setsockopt_connectx(struct sock *sk, struct sockaddr *kaddrs,
1342 static int sctp_setsockopt_connectx_old(struct sock *sk,
1355 static int sctp_setsockopt_connectx(struct sock *sk,
1386 static int sctp_getsockopt_connectx3(struct sock *sk, int len,
1482 static void sctp_close(struct sock *sk, long timeout)
1545 /* Hold the sock, since sk_common_release() will put sock_put()
1556 SCTP_DBG_OBJCNT_DEC(sock);
1560 static int sctp_error(struct sock *sk, int flags, int err)
1595 static int sctp_sendmsg_parse(struct sock *sk, struct sctp_cmsgs *cmsgs,
1656 static int sctp_sendmsg_new_asoc(struct sock *sk, __u16 sflags,
1755 struct sock *sk = asoc->base.sk;
1794 struct sock *sk = asoc->base.sk;
1893 static union sctp_addr *sctp_sendmsg_get_daddr(struct sock *sk,
1942 static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
2089 static int sctp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
2210 static int sctp_setsockopt_disable_fragments(struct sock *sk, int *val,
2219 static int sctp_setsockopt_events(struct sock *sk, __u8 *sn_type,
2268 static int sctp_setsockopt_autoclose(struct sock *sk, u32 *optval,
2616 static int sctp_setsockopt_peer_addr_params(struct sock *sk,
2777 static int __sctp_setsockopt_delayed_ack(struct sock *sk,
2830 static int sctp_setsockopt_delayed_ack(struct sock *sk,
2868 static int sctp_setsockopt_initmsg(struct sock *sk, struct sctp_initmsg *sinit,
2902 static int sctp_setsockopt_default_send_param(struct sock *sk,
2960 static int sctp_setsockopt_default_sndinfo(struct sock *sk,
3018 static int sctp_setsockopt_primary_addr(struct sock *sk, struct sctp_prim *prim,
3056 static int sctp_setsockopt_nodelay(struct sock *sk, int *val,
3077 static int sctp_setsockopt_rtoinfo(struct sock *sk,
3141 static int sctp_setsockopt_associnfo(struct sock *sk,
3209 static int sctp_setsockopt_mappedv4(struct sock *sk, int *val,
3251 static int sctp_setsockopt_maxseg(struct sock *sk,
3311 static int sctp_setsockopt_peer_primary_addr(struct sock *sk,
3372 static int sctp_setsockopt_adaptation_layer(struct sock *sk,
3398 static int sctp_setsockopt_context(struct sock *sk,
3458 static int sctp_setsockopt_fragment_interleave(struct sock *sk, int *val,
3489 static int sctp_setsockopt_partial_delivery_point(struct sock *sk, u32 *val,
3517 static int sctp_setsockopt_maxburst(struct sock *sk,
3570 static int sctp_setsockopt_auth_chunk(struct sock *sk,
3600 static int sctp_setsockopt_hmac_ident(struct sock *sk,
3629 static int sctp_setsockopt_auth_key(struct sock *sk,
3690 static int sctp_setsockopt_active_key(struct sock *sk,
3738 static int sctp_setsockopt_del_key(struct sock *sk,
3786 static int sctp_setsockopt_deactivate_key(struct sock *sk,
3843 static int sctp_setsockopt_auto_asconf(struct sock *sk, int *val,
3875 static int sctp_setsockopt_paddr_thresholds(struct sock *sk,
3938 static int sctp_setsockopt_recvrcvinfo(struct sock *sk, int *val,
3949 static int sctp_setsockopt_recvnxtinfo(struct sock *sk, int *val,
3960 static int sctp_setsockopt_pr_supported(struct sock *sk,
3979 static int sctp_setsockopt_default_prinfo(struct sock *sk,
4031 static int sctp_setsockopt_reconfig_supported(struct sock *sk,
4054 static int sctp_setsockopt_enable_strreset(struct sock *sk,
4096 static int sctp_setsockopt_reset_streams(struct sock *sk,
4119 static int sctp_setsockopt_reset_assoc(struct sock *sk, sctp_assoc_t *associd,
4134 static int sctp_setsockopt_add_streams(struct sock *sk,
4150 static int sctp_setsockopt_scheduler(struct sock *sk,
4193 static int sctp_setsockopt_scheduler_value(struct sock *sk,
4228 static int sctp_setsockopt_interleaving_supported(struct sock *sk,
4250 static int sctp_setsockopt_reuse_port(struct sock *sk, int *val,
4288 static int sctp_setsockopt_event(struct sock *sk, struct sctp_event *param,
4331 static int sctp_setsockopt_asconf_supported(struct sock *sk,
4361 static int sctp_setsockopt_auth_supported(struct sock *sk,
4395 static int sctp_setsockopt_ecn_supported(struct sock *sk,
4417 static int sctp_setsockopt_pf_expose(struct sock *sk,
4445 static int sctp_setsockopt_encap_port(struct sock *sk,
4495 static int sctp_setsockopt_probe_interval(struct sock *sk,
4569 static int sctp_setsockopt(struct sock *sk, int level, int optname,
4805 static int sctp_connect(struct sock *sk, struct sockaddr *addr,
4824 int sctp_inet_connect(struct socket *sock, struct sockaddr *uaddr,
4833 return sctp_connect(sock->sk, uaddr, addr_len, flags);
4837 static int sctp_disconnect(struct sock *sk, int flags)
4849 static struct sock *sctp_accept(struct sock *sk, int flags, int *err, bool kern)
4853 struct sock *newsk = NULL;
4906 static int sctp_ioctl(struct sock *sk, int cmd, int *karg)
4945 * initialized the SCTP-specific portion of the sock.
4946 * The sock structure should already be zero-filled memory.
4948 static int sctp_init_sock(struct sock *sk)
5079 SCTP_DBG_OBJCNT_INC(sock);
5090 static void sctp_destroy_sock(struct sock *sk)
5114 static void sctp_destruct_common(struct sock *sk)
5122 static void sctp_destruct_sock(struct sock *sk)
5144 static void sctp_shutdown(struct sock *sk, int how)
5163 int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc,
5407 static int sctp_getsockopt_sctp_status(struct sock *sk, int len,
5487 static int sctp_getsockopt_peer_addr_info(struct sock *sk, int len,
5550 static int sctp_getsockopt_disable_fragments(struct sock *sk, int len,
5572 static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
5607 static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optval, int __user *optlen)
5623 int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
5627 struct socket *sock;
5644 err = sock_create(sk->sk_family, SOCK_SEQPACKET, IPPROTO_SCTP, &sock);
5648 sctp_copy_sock(sock->sk, sk, asoc);
5654 sp->pf->to_sk_daddr(&asoc->peer.primary_addr, sock->sk);
5655 sp->pf->copy_ip_options(sk, sock->sk);
5660 err = sctp_sock_migrate(sk, sock->sk, asoc,
5663 sock_release(sock);
5664 sock = NULL;
5667 *sockp = sock;
5673 static int sctp_getsockopt_peeloff_common(struct sock *sk, sctp_peeloff_arg_t *peeloff,
5709 static int sctp_getsockopt_peeloff(struct sock *sk, int len, char __user *optval, int __user *optlen)
5742 static int sctp_getsockopt_peeloff_flags(struct sock *sk, int len,
5909 static int sctp_getsockopt_peer_addr_params(struct sock *sk, int len,
6052 static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
6126 static int sctp_getsockopt_initmsg(struct sock *sk, int len, char __user *optval, int __user *optlen)
6139 static int sctp_getsockopt_peer_addrs(struct sock *sk, int len,
6190 static int sctp_copy_laddrs(struct sock *sk, __u16 port, void *to,
6235 static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
6343 static int sctp_getsockopt_primary_addr(struct sock *sk, int len,
6385 static int sctp_getsockopt_adaptation_layer(struct sock *sk, int len,
6424 static int sctp_getsockopt_default_send_param(struct sock *sk,
6470 static int sctp_getsockopt_default_sndinfo(struct sock *sk, int len,
6521 static int sctp_getsockopt_nodelay(struct sock *sk, int len,
6550 static int sctp_getsockopt_rtoinfo(struct sock *sk, int len,
6604 static int sctp_getsockopt_associnfo(struct sock *sk, int len,
6673 static int sctp_getsockopt_mappedv4(struct sock *sk, int len,
6696 static int sctp_getsockopt_context(struct sock *sk, int len,
6753 static int sctp_getsockopt_maxseg(struct sock *sk, int len,
6800 static int sctp_getsockopt_fragment_interleave(struct sock *sk, int len,
6823 static int sctp_getsockopt_partial_delivery_point(struct sock *sk, int len,
6847 static int sctp_getsockopt_maxburst(struct sock *sk, int len,
6887 static int sctp_getsockopt_hmac_ident(struct sock *sk, int len,
6923 static int sctp_getsockopt_active_key(struct sock *sk, int len,
6959 static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
7003 static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
7059 static int sctp_getsockopt_assoc_number(struct sock *sk, int len,
7090 static int sctp_getsockopt_auto_asconf(struct sock *sk, int len,
7115 static int sctp_getsockopt_assoc_ids(struct sock *sk, int len,
7164 static int sctp_getsockopt_paddr_thresholds(struct sock *sk,
7223 static int sctp_getsockopt_assoc_stats(struct sock *sk, int len,
7281 static int sctp_getsockopt_recvrcvinfo(struct sock *sk, int len,
7301 static int sctp_getsockopt_recvnxtinfo(struct sock *sk, int len,
7321 static int sctp_getsockopt_pr_supported(struct sock *sk, int len,
7360 static int sctp_getsockopt_default_prinfo(struct sock *sk, int len,
7406 static int sctp_getsockopt_pr_assocstatus(struct sock *sk, int len,
7465 static int sctp_getsockopt_pr_streamstatus(struct sock *sk, int len,
7529 static int sctp_getsockopt_reconfig_supported(struct sock *sk, int len,
7568 static int sctp_getsockopt_enable_strreset(struct sock *sk, int len,
7607 static int sctp_getsockopt_scheduler(struct sock *sk, int len,
7646 static int sctp_getsockopt_scheduler_value(struct sock *sk, int len,
7688 static int sctp_getsockopt_interleaving_supported(struct sock *sk, int len,
7727 static int sctp_getsockopt_reuse_port(struct sock *sk, int len,
7747 static int sctp_getsockopt_event(struct sock *sk, int len, char __user *optval,
7782 static int sctp_getsockopt_asconf_supported(struct sock *sk, int len,
7821 static int sctp_getsockopt_auth_supported(struct sock *sk, int len,
7860 static int sctp_getsockopt_ecn_supported(struct sock *sk, int len,
7899 static int sctp_getsockopt_pf_expose(struct sock *sk, int len,
7938 static int sctp_getsockopt_encap_port(struct sock *sk, int len,
7997 static int sctp_getsockopt_probe_interval(struct sock *sk, int len,
8057 static int sctp_getsockopt(struct sock *sk, int level, int optname,
8308 static int sctp_hash(struct sock *sk)
8314 static void sctp_unhash(struct sock *sk)
8328 * link to the socket (struct sock) that uses it, the port number and
8334 static int sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
8410 struct sock *sk2;
8422 * bind_pprev in the struct sock *sk2 (pp->sk)]. On each one,
8505 static int sctp_get_port(struct sock *sk, unsigned short snum)
8521 static int sctp_listen_start(struct sock *sk, int backlog)
8580 int sctp_inet_listen(struct socket *sock, int backlog)
8582 struct sock *sk = sock->sk;
8595 if (sock->state != SS_UNCONNECTED)
8642 __poll_t sctp_poll(struct file *file, struct socket *sock, poll_table *wait)
8644 struct sock *sk = sock->sk;
8729 static inline void __sctp_put_port(struct sock *sk)
8745 void sctp_put_port(struct sock *sk)
8758 static int sctp_autobind(struct sock *sk)
8957 static int sctp_wait_for_packet(struct sock *sk, int *err, long *timeo_p)
9015 struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags, int *err)
9070 struct sock *sk = asoc->base.sk;
9098 static void sctp_wake_up_waiters(struct sock *sk,
9146 struct sock *sk = asoc->base.sk;
9187 struct sock *sk = skb->sk;
9203 struct sock *sk = asoc->base.sk;
9267 void sctp_data_ready(struct sock *sk)
9283 void sctp_write_space(struct sock *sk)
9304 static bool sctp_writeable(const struct sock *sk)
9314 struct sock *sk = asoc->base.sk;
9374 static int sctp_wait_for_accept(struct sock *sk, long timeo)
9415 static void sctp_wait_for_close(struct sock *sk, long timeout)
9431 static void sctp_skb_set_owner_r_frag(struct sk_buff *skb, struct sock *sk)
9446 void sctp_copy_sock(struct sock *newsk, struct sock *sk,
9501 static inline void sctp_copy_descendant(struct sock *sk_to,
9502 const struct sock *sk_from)
9514 static int sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
9699 static void sctp_v6_destruct_sock(struct sock *sk)
9705 static int sctp_v6_init_sock(struct sock *sk)