Lines Matching refs:sock
65 #include <net/sock.h>
71 static bool sctp_writeable(const struct sock *sk);
75 static int sctp_wait_for_packet(struct sock *sk, int *err, long *timeo_p);
77 static int sctp_wait_for_accept(struct sock *sk, long timeo);
78 static void sctp_wait_for_close(struct sock *sk, long timeo);
79 static void sctp_destruct_sock(struct sock *sk);
82 static int sctp_bindx_add(struct sock *, struct sockaddr *, int);
83 static int sctp_bindx_rem(struct sock *, struct sockaddr *, int);
84 static int sctp_send_asconf_add_ip(struct sock *, struct sockaddr *, int);
85 static int sctp_send_asconf_del_ip(struct sock *, struct sockaddr *, int);
88 static int sctp_do_bind(struct sock *, union sctp_addr *, int);
89 static int sctp_autobind(struct sock *sk);
90 static int sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
98 static void sctp_enter_memory_pressure(struct sock *sk)
107 struct sock *sk = asoc->base.sk;
125 struct sock *sk = asoc->base.sk;
190 static void sctp_for_each_rx_skb(struct sctp_association *asoc, struct sock *sk,
191 void (*cb)(struct sk_buff *, struct sock *))
207 static inline int sctp_verify_addr(struct sock *sk, union sctp_addr *addr,
230 struct sctp_association *sctp_id2assoc(struct sock *sk, sctp_assoc_t id)
267 static struct sctp_transport *sctp_addr_id2transport(struct sock *sk,
306 static int sctp_bind(struct sock *sk, struct sockaddr *addr, int addr_len)
327 static int sctp_get_port_local(struct sock *, union sctp_addr *);
373 static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
502 static int sctp_bindx_add(struct sock *sk, struct sockaddr *addrs, int addrcnt)
552 static int sctp_send_asconf_add_ip(struct sock *sk,
675 static int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
754 static int sctp_send_asconf_del_ip(struct sock *sk,
908 struct sock *sk = sctp_opt2sk(sp);
996 static int sctp_setsockopt_bindx(struct sock *sk, struct sockaddr *addrs,
1053 static int sctp_bind_add(struct sock *sk, struct sockaddr *addrs,
1070 struct sock *sk = ep->base.sk;
1158 /* __sctp_connect(struct sock* sk, struct sockaddr *kaddrs, int addrs_size)
1163 static int __sctp_connect(struct sock *sk, struct sockaddr *kaddrs,
1308 static int __sctp_setsockopt_connectx(struct sock *sk, struct sockaddr *kaddrs,
1340 static int sctp_setsockopt_connectx_old(struct sock *sk,
1353 static int sctp_setsockopt_connectx(struct sock *sk,
1384 static int sctp_getsockopt_connectx3(struct sock *sk, int len,
1480 static void sctp_close(struct sock *sk, long timeout)
1543 /* Hold the sock, since sk_common_release() will put sock_put()
1554 SCTP_DBG_OBJCNT_DEC(sock);
1558 static int sctp_error(struct sock *sk, int flags, int err)
1593 static int sctp_sendmsg_parse(struct sock *sk, struct sctp_cmsgs *cmsgs,
1654 static int sctp_sendmsg_new_asoc(struct sock *sk, __u16 sflags,
1753 struct sock *sk = asoc->base.sk;
1792 struct sock *sk = asoc->base.sk;
1894 static union sctp_addr *sctp_sendmsg_get_daddr(struct sock *sk,
1943 static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
2090 static int sctp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
2205 static int sctp_setsockopt_disable_fragments(struct sock *sk, int *val,
2214 static int sctp_setsockopt_events(struct sock *sk, __u8 *sn_type,
2263 static int sctp_setsockopt_autoclose(struct sock *sk, u32 *optval,
2610 static int sctp_setsockopt_peer_addr_params(struct sock *sk,
2771 static int __sctp_setsockopt_delayed_ack(struct sock *sk,
2824 static int sctp_setsockopt_delayed_ack(struct sock *sk,
2862 static int sctp_setsockopt_initmsg(struct sock *sk, struct sctp_initmsg *sinit,
2896 static int sctp_setsockopt_default_send_param(struct sock *sk,
2954 static int sctp_setsockopt_default_sndinfo(struct sock *sk,
3012 static int sctp_setsockopt_primary_addr(struct sock *sk, struct sctp_prim *prim,
3050 static int sctp_setsockopt_nodelay(struct sock *sk, int *val,
3071 static int sctp_setsockopt_rtoinfo(struct sock *sk,
3135 static int sctp_setsockopt_associnfo(struct sock *sk,
3203 static int sctp_setsockopt_mappedv4(struct sock *sk, int *val,
3245 static int sctp_setsockopt_maxseg(struct sock *sk,
3305 static int sctp_setsockopt_peer_primary_addr(struct sock *sk,
3366 static int sctp_setsockopt_adaptation_layer(struct sock *sk,
3392 static int sctp_setsockopt_context(struct sock *sk,
3452 static int sctp_setsockopt_fragment_interleave(struct sock *sk, int *val,
3483 static int sctp_setsockopt_partial_delivery_point(struct sock *sk, u32 *val,
3511 static int sctp_setsockopt_maxburst(struct sock *sk,
3564 static int sctp_setsockopt_auth_chunk(struct sock *sk,
3594 static int sctp_setsockopt_hmac_ident(struct sock *sk,
3623 static int sctp_setsockopt_auth_key(struct sock *sk,
3684 static int sctp_setsockopt_active_key(struct sock *sk,
3732 static int sctp_setsockopt_del_key(struct sock *sk,
3780 static int sctp_setsockopt_deactivate_key(struct sock *sk,
3837 static int sctp_setsockopt_auto_asconf(struct sock *sk, int *val,
3869 static int sctp_setsockopt_paddr_thresholds(struct sock *sk,
3932 static int sctp_setsockopt_recvrcvinfo(struct sock *sk, int *val,
3943 static int sctp_setsockopt_recvnxtinfo(struct sock *sk, int *val,
3954 static int sctp_setsockopt_pr_supported(struct sock *sk,
3973 static int sctp_setsockopt_default_prinfo(struct sock *sk,
4025 static int sctp_setsockopt_reconfig_supported(struct sock *sk,
4048 static int sctp_setsockopt_enable_strreset(struct sock *sk,
4090 static int sctp_setsockopt_reset_streams(struct sock *sk,
4113 static int sctp_setsockopt_reset_assoc(struct sock *sk, sctp_assoc_t *associd,
4128 static int sctp_setsockopt_add_streams(struct sock *sk,
4144 static int sctp_setsockopt_scheduler(struct sock *sk,
4187 static int sctp_setsockopt_scheduler_value(struct sock *sk,
4222 static int sctp_setsockopt_interleaving_supported(struct sock *sk,
4244 static int sctp_setsockopt_reuse_port(struct sock *sk, int *val,
4282 static int sctp_setsockopt_event(struct sock *sk, struct sctp_event *param,
4325 static int sctp_setsockopt_asconf_supported(struct sock *sk,
4355 static int sctp_setsockopt_auth_supported(struct sock *sk,
4389 static int sctp_setsockopt_ecn_supported(struct sock *sk,
4411 static int sctp_setsockopt_pf_expose(struct sock *sk,
4458 static int sctp_setsockopt(struct sock *sk, int level, int optname,
4688 static int sctp_connect(struct sock *sk, struct sockaddr *addr,
4707 int sctp_inet_connect(struct socket *sock, struct sockaddr *uaddr,
4716 return sctp_connect(sock->sk, uaddr, addr_len, flags);
4720 static int sctp_disconnect(struct sock *sk, int flags)
4732 static struct sock *sctp_accept(struct sock *sk, int flags, int *err, bool kern)
4736 struct sock *newsk = NULL;
4789 static int sctp_ioctl(struct sock *sk, int cmd, unsigned long arg)
4828 * initialized the SCTP-specific portion of the sock.
4829 * The sock structure should already be zero-filled memory.
4831 static int sctp_init_sock(struct sock *sk)
4959 SCTP_DBG_OBJCNT_INC(sock);
4973 static void sctp_destroy_sock(struct sock *sk)
4999 static void sctp_destruct_common(struct sock *sk)
5007 static void sctp_destruct_sock(struct sock *sk)
5029 static void sctp_shutdown(struct sock *sk, int how)
5048 int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc,
5283 static int sctp_getsockopt_sctp_status(struct sock *sk, int len,
5363 static int sctp_getsockopt_peer_addr_info(struct sock *sk, int len,
5426 static int sctp_getsockopt_disable_fragments(struct sock *sk, int len,
5448 static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
5483 static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optval, int __user *optlen)
5499 int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
5503 struct socket *sock;
5520 err = sock_create(sk->sk_family, SOCK_SEQPACKET, IPPROTO_SCTP, &sock);
5524 sctp_copy_sock(sock->sk, sk, asoc);
5530 sp->pf->to_sk_daddr(&asoc->peer.primary_addr, sock->sk);
5531 sp->pf->copy_ip_options(sk, sock->sk);
5536 err = sctp_sock_migrate(sk, sock->sk, asoc,
5539 sock_release(sock);
5540 sock = NULL;
5543 *sockp = sock;
5549 static int sctp_getsockopt_peeloff_common(struct sock *sk, sctp_peeloff_arg_t *peeloff,
5585 static int sctp_getsockopt_peeloff(struct sock *sk, int len, char __user *optval, int __user *optlen)
5618 static int sctp_getsockopt_peeloff_flags(struct sock *sk, int len,
5785 static int sctp_getsockopt_peer_addr_params(struct sock *sk, int len,
5928 static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
6002 static int sctp_getsockopt_initmsg(struct sock *sk, int len, char __user *optval, int __user *optlen)
6015 static int sctp_getsockopt_peer_addrs(struct sock *sk, int len,
6066 static int sctp_copy_laddrs(struct sock *sk, __u16 port, void *to,
6111 static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
6219 static int sctp_getsockopt_primary_addr(struct sock *sk, int len,
6261 static int sctp_getsockopt_adaptation_layer(struct sock *sk, int len,
6300 static int sctp_getsockopt_default_send_param(struct sock *sk,
6346 static int sctp_getsockopt_default_sndinfo(struct sock *sk, int len,
6397 static int sctp_getsockopt_nodelay(struct sock *sk, int len,
6426 static int sctp_getsockopt_rtoinfo(struct sock *sk, int len,
6480 static int sctp_getsockopt_associnfo(struct sock *sk, int len,
6549 static int sctp_getsockopt_mappedv4(struct sock *sk, int len,
6572 static int sctp_getsockopt_context(struct sock *sk, int len,
6629 static int sctp_getsockopt_maxseg(struct sock *sk, int len,
6676 static int sctp_getsockopt_fragment_interleave(struct sock *sk, int len,
6699 static int sctp_getsockopt_partial_delivery_point(struct sock *sk, int len,
6723 static int sctp_getsockopt_maxburst(struct sock *sk, int len,
6763 static int sctp_getsockopt_hmac_ident(struct sock *sk, int len,
6799 static int sctp_getsockopt_active_key(struct sock *sk, int len,
6835 static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
6879 static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
6935 static int sctp_getsockopt_assoc_number(struct sock *sk, int len,
6966 static int sctp_getsockopt_auto_asconf(struct sock *sk, int len,
6991 static int sctp_getsockopt_assoc_ids(struct sock *sk, int len,
7040 static int sctp_getsockopt_paddr_thresholds(struct sock *sk,
7099 static int sctp_getsockopt_assoc_stats(struct sock *sk, int len,
7157 static int sctp_getsockopt_recvrcvinfo(struct sock *sk, int len,
7177 static int sctp_getsockopt_recvnxtinfo(struct sock *sk, int len,
7197 static int sctp_getsockopt_pr_supported(struct sock *sk, int len,
7236 static int sctp_getsockopt_default_prinfo(struct sock *sk, int len,
7282 static int sctp_getsockopt_pr_assocstatus(struct sock *sk, int len,
7341 static int sctp_getsockopt_pr_streamstatus(struct sock *sk, int len,
7405 static int sctp_getsockopt_reconfig_supported(struct sock *sk, int len,
7444 static int sctp_getsockopt_enable_strreset(struct sock *sk, int len,
7483 static int sctp_getsockopt_scheduler(struct sock *sk, int len,
7522 static int sctp_getsockopt_scheduler_value(struct sock *sk, int len,
7564 static int sctp_getsockopt_interleaving_supported(struct sock *sk, int len,
7603 static int sctp_getsockopt_reuse_port(struct sock *sk, int len,
7623 static int sctp_getsockopt_event(struct sock *sk, int len, char __user *optval,
7658 static int sctp_getsockopt_asconf_supported(struct sock *sk, int len,
7697 static int sctp_getsockopt_auth_supported(struct sock *sk, int len,
7736 static int sctp_getsockopt_ecn_supported(struct sock *sk, int len,
7775 static int sctp_getsockopt_pf_expose(struct sock *sk, int len,
7814 static int sctp_getsockopt(struct sock *sk, int level, int optname,
8059 static int sctp_hash(struct sock *sk)
8065 static void sctp_unhash(struct sock *sk)
8079 * link to the socket (struct sock) that uses it, the port number and
8085 static int sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
8161 struct sock *sk2;
8173 * bind_pprev in the struct sock *sk2 (pp->sk)]. On each one,
8253 static int sctp_get_port(struct sock *sk, unsigned short snum)
8269 static int sctp_listen_start(struct sock *sk, int backlog)
8328 int sctp_inet_listen(struct socket *sock, int backlog)
8330 struct sock *sk = sock->sk;
8343 if (sock->state != SS_UNCONNECTED)
8390 __poll_t sctp_poll(struct file *file, struct socket *sock, poll_table *wait)
8392 struct sock *sk = sock->sk;
8477 static inline void __sctp_put_port(struct sock *sk)
8493 void sctp_put_port(struct sock *sk)
8506 static int sctp_autobind(struct sock *sk)
8705 static int sctp_wait_for_packet(struct sock *sk, int *err, long *timeo_p)
8763 struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags,
8825 struct sock *sk = asoc->base.sk;
8853 static void sctp_wake_up_waiters(struct sock *sk,
8901 struct sock *sk = asoc->base.sk;
8942 struct sock *sk = skb->sk;
8958 struct sock *sk = asoc->base.sk;
9024 void sctp_data_ready(struct sock *sk)
9038 void sctp_write_space(struct sock *sk)
9059 static bool sctp_writeable(const struct sock *sk)
9069 struct sock *sk = asoc->base.sk;
9129 static int sctp_wait_for_accept(struct sock *sk, long timeo)
9170 static void sctp_wait_for_close(struct sock *sk, long timeout)
9186 static void sctp_skb_set_owner_r_frag(struct sk_buff *skb, struct sock *sk)
9201 void sctp_copy_sock(struct sock *newsk, struct sock *sk,
9257 static inline void sctp_copy_descendant(struct sock *sk_to,
9258 const struct sock *sk_from)
9270 static int sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
9452 static void sctp_v6_destruct_sock(struct sock *sk)
9458 static int sctp_v6_init_sock(struct sock *sk)