Lines Matching refs:sock
45 #include <net/sock.h>
61 static void rfcomm_sock_close(struct sock *sk);
62 static void rfcomm_sock_kill(struct sock *sk);
70 struct sock *sk = d->owner;
84 struct sock *sk = d->owner, *parent;
126 static struct sock *__rfcomm_get_sock_by_addr(u8 channel, bdaddr_t *src)
128 struct sock *sk = NULL;
143 static struct sock *__rfcomm_get_sock_by_channel(int state, u8 channel, bdaddr_t *src)
145 struct sock *sk = NULL, *sk1 = NULL;
167 static inline struct sock *rfcomm_get_sock_by_channel(int state, u8 channel, bdaddr_t *src)
169 struct sock *s;
177 static void rfcomm_sock_destruct(struct sock *sk)
197 static void rfcomm_sock_cleanup_listen(struct sock *parent)
199 struct sock *sk;
216 static void rfcomm_sock_kill(struct sock *sk)
229 static void __rfcomm_sock_close(struct sock *sk)
255 static void rfcomm_sock_close(struct sock *sk)
262 static void rfcomm_sock_init(struct sock *sk, struct sock *parent)
291 static struct sock *rfcomm_sock_alloc(struct net *net, struct socket *sock, int proto, gfp_t prio)
294 struct sock *sk;
300 sock_init_data(sock, sk);
332 static int rfcomm_sock_create(struct net *net, struct socket *sock,
335 struct sock *sk;
337 BT_DBG("sock %p", sock);
339 sock->state = SS_UNCONNECTED;
341 if (sock->type != SOCK_STREAM && sock->type != SOCK_RAW)
344 sock->ops = &rfcomm_sock_ops;
346 sk = rfcomm_sock_alloc(net, sock, protocol, GFP_ATOMIC);
354 static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
357 struct sock *sk = sock->sk;
395 static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int alen, int flags)
398 struct sock *sk = sock->sk;
437 static int rfcomm_sock_listen(struct socket *sock, int backlog)
439 struct sock *sk = sock->sk;
486 static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int flags)
489 struct sock *sk = sock->sk, *nsk;
547 static int rfcomm_sock_getname(struct socket *sock, struct sockaddr *addr, int *len, int peer)
550 struct sock *sk = sock->sk;
552 BT_DBG("sock %p, sk %p", sock, sk);
565 static int rfcomm_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
568 struct sock *sk = sock->sk;
582 BT_DBG("sock %p, sk %p", sock, sk);
624 static long rfcomm_sock_data_wait(struct sock *sk, long timeo)
651 static int rfcomm_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
654 struct sock *sk = sock->sk;
741 static int rfcomm_sock_setsockopt_old(struct socket *sock, int optname, char __user *optval, unsigned int optlen)
743 struct sock *sk = sock->sk;
777 static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen)
779 struct sock *sk = sock->sk;
787 return rfcomm_sock_setsockopt_old(sock, optname, optval, optlen);
840 static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __user *optval, int __user *optlen)
842 struct sock *sk = sock->sk;
843 struct sock *l2cap_sk;
887 l2cap_sk = rfcomm_pi(sk)->dlc->session->sock->sk;
907 static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen)
909 struct sock *sk = sock->sk;
916 return rfcomm_sock_getsockopt_old(sock, optname, optval, optlen);
961 static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
963 struct sock *sk __maybe_unused = sock->sk;
968 err = bt_sock_ioctl(sock, cmd, arg);
983 static int rfcomm_sock_shutdown(struct socket *sock, int how)
985 struct sock *sk = sock->sk;
988 BT_DBG("sock %p, sk %p", sock, sk);
1004 static int rfcomm_sock_release(struct socket *sock)
1006 struct sock *sk = sock->sk;
1009 BT_DBG("sock %p, sk %p", sock, sk);
1014 err = rfcomm_sock_shutdown(sock, 2);
1027 struct sock *sk, *parent;
1073 struct sock *sk;