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, in rfcomm_sock_alloc() argument
275 struct sock *sk; in rfcomm_sock_alloc()
277 sk = bt_sock_alloc(net, sock, &rfcomm_proto, proto, prio, kern); in rfcomm_sock_alloc()
305 static int rfcomm_sock_create(struct net *net, struct socket *sock, in rfcomm_sock_create() argument
308 struct sock *sk; in rfcomm_sock_create()
310 BT_DBG("sock %p", sock); in rfcomm_sock_create()
312 sock->state = SS_UNCONNECTED; in rfcomm_sock_create()
314 if (sock->type != SOCK_STREAM && sock->type != SOCK_RAW) in rfcomm_sock_create()
317 sock->ops = &rfcomm_sock_ops; in rfcomm_sock_create()
319 sk = rfcomm_sock_alloc(net, sock, protocol, GFP_ATOMIC, kern); in rfcomm_sock_create()
327 static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) in rfcomm_sock_bind() argument
330 struct sock *sk = sock->sk; in rfcomm_sock_bind()
374 static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags) in rfcomm_sock_connect() argument
377 struct sock *sk = sock->sk; in rfcomm_sock_connect()
422 static int rfcomm_sock_listen(struct socket *sock, int backlog) in rfcomm_sock_listen() argument
424 struct sock *sk = sock->sk; in rfcomm_sock_listen()
471 static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, in rfcomm_sock_accept() argument
475 struct sock *sk = sock->sk, *nsk; in rfcomm_sock_accept()
532 static int rfcomm_sock_getname(struct socket *sock, struct sockaddr *addr, int peer) in rfcomm_sock_getname() argument
535 struct sock *sk = sock->sk; in rfcomm_sock_getname()
537 BT_DBG("sock %p, sk %p", sock, sk); in rfcomm_sock_getname()
554 static int rfcomm_sock_sendmsg(struct socket *sock, struct msghdr *msg, in rfcomm_sock_sendmsg() argument
557 struct sock *sk = sock->sk; in rfcomm_sock_sendmsg()
571 BT_DBG("sock %p, sk %p", sock, sk); in rfcomm_sock_sendmsg()
594 static int rfcomm_sock_recvmsg(struct socket *sock, struct msghdr *msg, in rfcomm_sock_recvmsg() argument
597 struct sock *sk = sock->sk; in rfcomm_sock_recvmsg()
606 len = bt_sock_stream_recvmsg(sock, msg, size, flags); in rfcomm_sock_recvmsg()
619 static int rfcomm_sock_setsockopt_old(struct socket *sock, int optname, in rfcomm_sock_setsockopt_old() argument
622 struct sock *sk = sock->sk; in rfcomm_sock_setsockopt_old()
661 static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, in rfcomm_sock_setsockopt() argument
664 struct sock *sk = sock->sk; in rfcomm_sock_setsockopt()
672 return rfcomm_sock_setsockopt_old(sock, optname, optval, optlen); in rfcomm_sock_setsockopt()
726 static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __user *optval, int __… in rfcomm_sock_getsockopt_old() argument
728 struct sock *sk = sock->sk; in rfcomm_sock_getsockopt_old()
729 struct sock *l2cap_sk; in rfcomm_sock_getsockopt_old()
779 l2cap_sk = rfcomm_pi(sk)->dlc->session->sock->sk; in rfcomm_sock_getsockopt_old()
801 static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval,… in rfcomm_sock_getsockopt() argument
803 struct sock *sk = sock->sk; in rfcomm_sock_getsockopt()
810 return rfcomm_sock_getsockopt_old(sock, optname, optval, optlen); in rfcomm_sock_getsockopt()
857 static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in rfcomm_sock_ioctl() argument
859 struct sock *sk __maybe_unused = sock->sk; in rfcomm_sock_ioctl()
864 err = bt_sock_ioctl(sock, cmd, arg); in rfcomm_sock_ioctl()
878 static int rfcomm_sock_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in rfcomm_sock_compat_ioctl() argument
880 return rfcomm_sock_ioctl(sock, cmd, (unsigned long)compat_ptr(arg)); in rfcomm_sock_compat_ioctl()
884 static int rfcomm_sock_shutdown(struct socket *sock, int how) in rfcomm_sock_shutdown() argument
886 struct sock *sk = sock->sk; in rfcomm_sock_shutdown()
889 BT_DBG("sock %p, sk %p", sock, sk); in rfcomm_sock_shutdown()
910 static int rfcomm_sock_release(struct socket *sock) in rfcomm_sock_release() argument
912 struct sock *sk = sock->sk; in rfcomm_sock_release()
915 BT_DBG("sock %p, sk %p", sock, sk); in rfcomm_sock_release()
920 err = rfcomm_sock_shutdown(sock, 2); in rfcomm_sock_release()
933 struct sock *sk, *parent; in rfcomm_connect_ind()
983 struct sock *sk; in rfcomm_sock_debugfs_show()