Lines Matching defs:sock

17 static int sock_wait_state(struct sock *sk, int state, unsigned long timeo)
59 static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
61 struct sock *sk = sock->sk;
144 static int llcp_raw_sock_bind(struct socket *sock, struct sockaddr *addr,
147 struct sock *sk = sock->sk;
199 static int llcp_sock_listen(struct socket *sock, int backlog)
201 struct sock *sk = sock->sk;
208 if ((sock->type != SOCK_SEQPACKET && sock->type != SOCK_STREAM) ||
226 static int nfc_llcp_setsockopt(struct socket *sock, int level, int optname,
229 struct sock *sk = sock->sk;
299 static int nfc_llcp_getsockopt(struct socket *sock, int level, int optname,
303 struct sock *sk = sock->sk;
376 void nfc_llcp_accept_unlink(struct sock *sk)
389 void nfc_llcp_accept_enqueue(struct sock *parent, struct sock *sk)
403 struct sock *nfc_llcp_accept_dequeue(struct sock *parent,
407 struct sock *sk;
444 static int llcp_sock_accept(struct socket *sock, struct socket *newsock,
448 struct sock *sk = sock->sk, *new_sk;
498 static int llcp_sock_getname(struct socket *sock, struct sockaddr *uaddr,
501 struct sock *sk = sock->sk;
532 static inline __poll_t llcp_accept_poll(struct sock *parent)
535 struct sock *sk;
550 static __poll_t llcp_sock_poll(struct file *file, struct socket *sock,
553 struct sock *sk = sock->sk;
558 sock_poll_wait(file, sock, wait);
589 static int llcp_sock_release(struct socket *sock)
591 struct sock *sk = sock->sk;
615 struct sock *accept_sk;
634 /* Keep this sock alive and therefore do not remove it from the sockets
641 if (sock->type == SOCK_RAW)
653 static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr,
656 struct sock *sk = sock->sk;
663 pr_debug("sock %p sk %p flags 0x%x\n", sock, sk, flags);
777 static int llcp_sock_sendmsg(struct socket *sock, struct msghdr *msg,
780 struct sock *sk = sock->sk;
784 pr_debug("sock %p sk %p", sock, sk);
825 static int llcp_sock_recvmsg(struct socket *sock, struct msghdr *msg,
829 struct sock *sk = sock->sk;
953 static void llcp_sock_destruct(struct sock *sk)
972 struct sock *nfc_llcp_sock_alloc(struct socket *sock, int type, gfp_t gfp, int kern)
974 struct sock *sk;
983 sock_init_data(sock, sk);
1002 if (sock != NULL)
1003 sock->state = SS_UNCONNECTED;
1008 void nfc_llcp_sock_free(struct nfc_llcp_sock *sock)
1010 kfree(sock->service_name);
1012 skb_queue_purge(&sock->tx_queue);
1013 skb_queue_purge(&sock->tx_pending_queue);
1015 list_del_init(&sock->accept_queue);
1017 sock->parent = NULL;
1019 nfc_llcp_local_put(sock->local);
1022 static int llcp_sock_create(struct net *net, struct socket *sock,
1025 struct sock *sk;
1027 pr_debug("%p\n", sock);
1029 if (sock->type != SOCK_STREAM &&
1030 sock->type != SOCK_DGRAM &&
1031 sock->type != SOCK_RAW)
1034 if (sock->type == SOCK_RAW) {
1037 sock->ops = &llcp_rawsock_ops;
1039 sock->ops = &llcp_sock_ops;
1042 sk = nfc_llcp_sock_alloc(sock, sock->type, GFP_ATOMIC, kern);