Lines Matching defs:sock
119 int af_alg_release(struct socket *sock)
121 if (sock->sk) {
122 sock_put(sock->sk);
123 sock->sk = NULL;
129 void af_alg_release_parent(struct sock *sk)
145 static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
148 struct sock *sk = sock->sk;
155 if (sock->state == SS_CONNECTED)
205 static int alg_setkey(struct sock *sk, sockptr_t ukey, unsigned int keylen)
228 static int alg_setsockopt(struct socket *sock, int level, int optname,
231 struct sock *sk = sock->sk;
248 if (sock->state == SS_CONNECTED)
256 if (sock->state == SS_CONNECTED)
263 if (sock->state == SS_CONNECTED)
277 int af_alg_accept(struct sock *sk, struct socket *newsock, bool kern)
281 struct sock *sk2;
338 static int alg_accept(struct socket *sock, struct socket *newsock, int flags,
341 return af_alg_accept(sock->sk, newsock, kern);
365 static void alg_sock_destruct(struct sock *sk)
372 static int alg_create(struct net *net, struct socket *sock, int protocol,
375 struct sock *sk;
378 if (sock->type != SOCK_SEQPACKET)
388 sock->ops = &alg_proto_ops;
389 sock_init_data(sock, sk);
497 static int af_alg_alloc_tsgl(struct sock *sk)
538 unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset)
594 void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
664 struct sock *sk = areq->sk;
699 static int af_alg_wait_for_wmem(struct sock *sk, unsigned int flags)
730 void af_alg_wmem_wakeup(struct sock *sk)
756 int af_alg_wait_for_data(struct sock *sk, unsigned flags, unsigned min)
795 static void af_alg_data_wakeup(struct sock *sk)
823 * @sock socket of connection to user space
830 int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size,
833 struct sock *sk = sock->sk;
983 ssize_t af_alg_sendpage(struct socket *sock, struct page *page,
986 struct sock *sk = sock->sk;
1041 struct sock *sk = areq->sk;
1064 struct sock *sk = areq->sk;
1081 __poll_t af_alg_poll(struct file *file, struct socket *sock,
1084 struct sock *sk = sock->sk;
1089 sock_poll_wait(file, sock, wait);
1109 struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk,
1148 int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,