Lines Matching refs:sock

43 static void rfcomm_sock_close(struct sock *sk);
44 static void rfcomm_sock_kill(struct sock *sk);
52 struct sock *sk = d->owner; in rfcomm_sk_data_ready()
66 struct sock *sk = d->owner, *parent; in rfcomm_sk_state_change()
106 static struct sock *__rfcomm_get_listen_sock_by_addr(u8 channel, bdaddr_t *src) in __rfcomm_get_listen_sock_by_addr()
108 struct sock *sk = NULL; in __rfcomm_get_listen_sock_by_addr()
127 static struct sock *rfcomm_get_sock_by_channel(int state, u8 channel, bdaddr_t *src) in rfcomm_get_sock_by_channel()
129 struct sock *sk = NULL, *sk1 = NULL; in rfcomm_get_sock_by_channel()
153 static void rfcomm_sock_destruct(struct sock *sk) in rfcomm_sock_destruct()
173 static void rfcomm_sock_cleanup_listen(struct sock *parent) in rfcomm_sock_cleanup_listen()
175 struct sock *sk; in rfcomm_sock_cleanup_listen()
192 static void rfcomm_sock_kill(struct sock *sk) in rfcomm_sock_kill()
205 static void __rfcomm_sock_close(struct sock *sk) in __rfcomm_sock_close()
232 static void rfcomm_sock_close(struct sock *sk) in rfcomm_sock_close()
239 static void rfcomm_sock_init(struct sock *sk, struct sock *parent) in rfcomm_sock_init()
271 static struct sock *rfcomm_sock_alloc(struct net *net, struct socket *sock, int proto, gfp_t prio, … in rfcomm_sock_alloc() argument
274 struct sock *sk; in rfcomm_sock_alloc()
280 sock_init_data(sock, sk); in rfcomm_sock_alloc()
312 static int rfcomm_sock_create(struct net *net, struct socket *sock, in rfcomm_sock_create() argument
315 struct sock *sk; in rfcomm_sock_create()
317 BT_DBG("sock %p", sock); in rfcomm_sock_create()
319 sock->state = SS_UNCONNECTED; in rfcomm_sock_create()
321 if (sock->type != SOCK_STREAM && sock->type != SOCK_RAW) in rfcomm_sock_create()
324 sock->ops = &rfcomm_sock_ops; in rfcomm_sock_create()
326 sk = rfcomm_sock_alloc(net, sock, protocol, GFP_ATOMIC, kern); in rfcomm_sock_create()
334 static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) in rfcomm_sock_bind() argument
337 struct sock *sk = sock->sk; in rfcomm_sock_bind()
381 static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags) in rfcomm_sock_connect() argument
384 struct sock *sk = sock->sk; in rfcomm_sock_connect()
424 static int rfcomm_sock_listen(struct socket *sock, int backlog) in rfcomm_sock_listen() argument
426 struct sock *sk = sock->sk; in rfcomm_sock_listen()
473 static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int flags, in rfcomm_sock_accept() argument
477 struct sock *sk = sock->sk, *nsk; in rfcomm_sock_accept()
534 static int rfcomm_sock_getname(struct socket *sock, struct sockaddr *addr, int peer) in rfcomm_sock_getname() argument
537 struct sock *sk = sock->sk; in rfcomm_sock_getname()
539 BT_DBG("sock %p, sk %p", sock, sk); in rfcomm_sock_getname()
556 static int rfcomm_sock_sendmsg(struct socket *sock, struct msghdr *msg, in rfcomm_sock_sendmsg() argument
559 struct sock *sk = sock->sk; in rfcomm_sock_sendmsg()
573 BT_DBG("sock %p, sk %p", sock, sk); in rfcomm_sock_sendmsg()
596 static int rfcomm_sock_recvmsg(struct socket *sock, struct msghdr *msg, in rfcomm_sock_recvmsg() argument
599 struct sock *sk = sock->sk; in rfcomm_sock_recvmsg()
608 len = bt_sock_stream_recvmsg(sock, msg, size, flags); in rfcomm_sock_recvmsg()
621 static int rfcomm_sock_setsockopt_old(struct socket *sock, int optname, in rfcomm_sock_setsockopt_old() argument
624 struct sock *sk = sock->sk; in rfcomm_sock_setsockopt_old()
663 static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, in rfcomm_sock_setsockopt() argument
666 struct sock *sk = sock->sk; in rfcomm_sock_setsockopt()
675 return rfcomm_sock_setsockopt_old(sock, optname, optval, optlen); in rfcomm_sock_setsockopt()
732 static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __user *optval, int __… in rfcomm_sock_getsockopt_old() argument
734 struct sock *sk = sock->sk; in rfcomm_sock_getsockopt_old()
735 struct sock *l2cap_sk; in rfcomm_sock_getsockopt_old()
785 l2cap_sk = rfcomm_pi(sk)->dlc->session->sock->sk; in rfcomm_sock_getsockopt_old()
807 static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval,… in rfcomm_sock_getsockopt() argument
809 struct sock *sk = sock->sk; in rfcomm_sock_getsockopt()
816 return rfcomm_sock_getsockopt_old(sock, optname, optval, optlen); in rfcomm_sock_getsockopt()
863 static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in rfcomm_sock_ioctl() argument
865 struct sock *sk __maybe_unused = sock->sk; in rfcomm_sock_ioctl()
870 err = bt_sock_ioctl(sock, cmd, arg); in rfcomm_sock_ioctl()
886 static int rfcomm_sock_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in rfcomm_sock_compat_ioctl() argument
888 return rfcomm_sock_ioctl(sock, cmd, (unsigned long)compat_ptr(arg)); in rfcomm_sock_compat_ioctl()
892 static int rfcomm_sock_shutdown(struct socket *sock, int how) in rfcomm_sock_shutdown() argument
894 struct sock *sk = sock->sk; in rfcomm_sock_shutdown()
897 BT_DBG("sock %p, sk %p", sock, sk); in rfcomm_sock_shutdown()
915 static int rfcomm_sock_release(struct socket *sock) in rfcomm_sock_release() argument
917 struct sock *sk = sock->sk; in rfcomm_sock_release()
920 BT_DBG("sock %p, sk %p", sock, sk); in rfcomm_sock_release()
925 err = rfcomm_sock_shutdown(sock, 2); in rfcomm_sock_release()
938 struct sock *sk, *parent; in rfcomm_connect_ind()
988 struct sock *sk; in rfcomm_sock_debugfs_show()