Lines Matching defs:sock

5  *  AF_SMC protocol family socket handler keeping the AF_INET sock address type
31 #include <net/sock.h>
65 static void smc_set_keepalive(struct sock *sk, int val)
80 int smc_hash_sk(struct sock *sk)
96 void smc_unhash_sk(struct sock *sk)
141 struct sock *sk = &smc->sk;
179 static int smc_release(struct socket *sock)
181 struct sock *sk = sock->sk;
202 * sock lock for child sockets again
216 sock->sk = NULL;
225 static void smc_destruct(struct sock *sk)
235 static struct sock *smc_sock_alloc(struct net *net, struct socket *sock,
240 struct sock *sk;
247 sock_init_data(sock, sk); /* sets sk_refcnt to 1 */
265 static int smc_bind(struct socket *sock, struct sockaddr *uaddr,
269 struct sock *sk = sock->sk;
306 static void smc_copy_sock_settings(struct sock *nsk, struct sock *osk,
1088 static int smc_connect(struct socket *sock, struct sockaddr *addr,
1091 struct sock *sk = sock->sk;
1127 sock_hold(&smc->sk); /* sock put in passive closing */
1149 struct sock *lsk = &lsmc->sk;
1150 struct sock *new_sk;
1191 /* add a just created sock to the accept queue of the listen sock as
1194 static void smc_accept_enqueue(struct sock *parent, struct sock *sk)
1206 static void smc_accept_unlink(struct sock *sk)
1217 /* remove a sock from the accept queue to bind it to a new socket created
1220 struct sock *smc_accept_dequeue(struct sock *parent,
1224 struct sock *new_sk;
1227 new_sk = (struct sock *)isk;
1251 /* clean up for a created but never accepted sock */
1252 void smc_close_non_accepted(struct sock *sk)
1312 struct sock *newsmcsk = &new_smc->sk;
1330 struct sock *newsmcsk = &new_smc->sk;
1341 struct sock *newsmcsk = &new_smc->sk;
1814 struct sock *lsk = &lsmc->sk;
1844 static void smc_clcsock_data_ready(struct sock *listen_clcsock)
1860 static int smc_listen(struct socket *sock, int backlog)
1862 struct sock *sk = sock->sk;
1907 static int smc_accept(struct socket *sock, struct socket *new_sock,
1910 struct sock *sk = sock->sk, *nsk;
1959 struct sock *clcsk = smc_sk(nsk)->clcsock->sk;
1977 static int smc_getname(struct socket *sock, struct sockaddr *addr,
1982 if (peer && (sock->sk->sk_state != SMC_ACTIVE) &&
1983 (sock->sk->sk_state != SMC_APPCLOSEWAIT1))
1986 smc = smc_sk(sock->sk);
1991 static int smc_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1993 struct sock *sk = sock->sk;
2026 static int smc_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
2029 struct sock *sk = sock->sk;
2062 static __poll_t smc_accept_poll(struct sock *parent)
2075 static __poll_t smc_poll(struct file *file, struct socket *sock,
2078 struct sock *sk = sock->sk;
2085 smc = smc_sk(sock->sk);
2087 /* delegate to CLC child sock */
2092 sock_poll_wait(file, sock, wait);
2128 static int smc_shutdown(struct socket *sock, int how)
2130 struct sock *sk = sock->sk;
2187 static int smc_setsockopt(struct socket *sock, int level, int optname,
2190 struct sock *sk = sock->sk;
2263 static int smc_getsockopt(struct socket *sock, int level, int optname,
2268 smc = smc_sk(sock->sk);
2276 static int smc_ioctl(struct socket *sock, unsigned int cmd,
2284 smc = smc_sk(sock->sk);
2357 static ssize_t smc_sendpage(struct socket *sock, struct page *page,
2360 struct sock *sk = sock->sk;
2375 rc = sock_no_sendpage(sock, page, offset, size, flags);
2387 static ssize_t smc_splice_read(struct socket *sock, loff_t *ppos,
2391 struct sock *sk = sock->sk;
2455 static int smc_create(struct net *net, struct socket *sock, int protocol,
2460 struct sock *sk;
2464 if (sock->type != SOCK_STREAM)
2472 sock->ops = &smc_sock_ops;
2473 sk = smc_sock_alloc(net, sock, protocol);