Lines Matching refs:sock
122 int af_alg_release(struct socket *sock)
124 if (sock->sk) {
125 sock_put(sock->sk);
126 sock->sk = NULL;
132 void af_alg_release_parent(struct sock *sk)
148 static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
151 struct sock *sk = sock->sk;
158 if (sock->state == SS_CONNECTED)
208 static int alg_setkey(struct sock *sk, sockptr_t ukey, unsigned int keylen)
357 static int alg_setsockopt(struct socket *sock, int level, int optname,
360 struct sock *sk = sock->sk;
378 if (sock->state == SS_CONNECTED)
389 if (sock->state == SS_CONNECTED)
396 if (sock->state == SS_CONNECTED)
410 int af_alg_accept(struct sock *sk, struct socket *newsock, bool kern)
414 struct sock *sk2;
471 static int alg_accept(struct socket *sock, struct socket *newsock, int flags,
474 return af_alg_accept(sock->sk, newsock, kern);
497 static void alg_sock_destruct(struct sock *sk)
504 static int alg_create(struct net *net, struct socket *sock, int protocol,
507 struct sock *sk;
510 if (sock->type != SOCK_SEQPACKET)
520 sock->ops = &alg_proto_ops;
521 sock_init_data(sock, sk);
604 static int af_alg_alloc_tsgl(struct sock *sk)
645 unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset)
701 void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
771 struct sock *sk = areq->sk;
806 static int af_alg_wait_for_wmem(struct sock *sk, unsigned int flags)
837 void af_alg_wmem_wakeup(struct sock *sk)
863 int af_alg_wait_for_data(struct sock *sk, unsigned flags, unsigned min)
902 static void af_alg_data_wakeup(struct sock *sk)
930 * @sock: socket of connection to user space
937 int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size,
940 struct sock *sk = sock->sk;
1118 struct sock *sk = areq->sk;
1144 struct sock *sk = areq->sk;
1161 * @sock: socket to poll
1164 __poll_t af_alg_poll(struct file *file, struct socket *sock,
1167 struct sock *sk = sock->sk;
1172 sock_poll_wait(file, sock, wait);
1192 struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk,
1232 int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,