Lines Matching defs:sock
22 static void nfc_sock_link(struct nfc_sock_list *l, struct sock *sk)
29 static void nfc_sock_unlink(struct nfc_sock_list *l, struct sock *sk)
36 static void rawsock_write_queue_purge(struct sock *sk)
46 static void rawsock_report_error(struct sock *sk, int err)
57 static int rawsock_release(struct socket *sock)
59 struct sock *sk = sock->sk;
61 pr_debug("sock=%p sk=%p\n", sock, sk);
66 if (sock->type == SOCK_RAW)
75 static int rawsock_connect(struct socket *sock, struct sockaddr *_addr,
78 struct sock *sk = sock->sk;
83 pr_debug("sock=%p sk=%p flags=%d\n", sock, sk, flags);
94 if (sock->state == SS_CONNECTED) {
117 sock->state = SS_CONNECTED;
141 struct sock *sk = (struct sock *) context;
178 struct sock *sk = to_rawsock_sk(work);
202 static int rawsock_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
204 struct sock *sk = sock->sk;
209 pr_debug("sock=%p sk=%p len=%zu\n", sock, sk, len);
214 if (sock->state != SS_CONNECTED)
238 static int rawsock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
242 struct sock *sk = sock->sk;
247 pr_debug("sock=%p sk=%p len=%zu flags=%d\n", sock, sk, len, flags);
302 static void rawsock_destruct(struct sock *sk)
321 static int rawsock_create(struct net *net, struct socket *sock,
324 struct sock *sk;
326 pr_debug("sock=%p\n", sock);
328 if ((sock->type != SOCK_SEQPACKET) && (sock->type != SOCK_RAW))
331 if (sock->type == SOCK_RAW) {
334 sock->ops = &rawsock_raw_ops;
336 sock->ops = &rawsock_ops;
343 sock_init_data(sock, sk);
346 sock->state = SS_UNCONNECTED;
347 if (sock->type == SOCK_RAW)
361 struct sock *sk;