Lines Matching refs:sock

24 #include <net/sock.h>
48 struct sock sk; /* must be first member */
87 static void caif_read_lock(struct sock *sk)
94 static void caif_read_unlock(struct sock *sk)
107 static void caif_flow_ctrl(struct sock *sk, int mode)
116 * Copied from sock.c:sock_queue_rcv_skb(), but changed so packets are
119 static void caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
249 static void caif_check_flow_release(struct sock *sk)
266 static int caif_seqpkt_recvmsg(struct socket *sock, struct msghdr *m,
270 struct sock *sk = sock->sk;
304 static long caif_stream_data_wait(struct sock *sk, long timeo)
342 static int caif_stream_recvmsg(struct socket *sock, struct msghdr *msg,
345 struct sock *sk = sock->sk;
456 * Copied from sock.c:sock_wait_for_wmem, but change to wait for
462 struct sock *sk = &cf_sk->sk;
513 static int caif_seqpkt_sendmsg(struct socket *sock, struct msghdr *msg,
516 struct sock *sk = sock->sk;
585 static int caif_stream_sendmsg(struct socket *sock, struct msghdr *msg,
588 struct sock *sk = sock->sk;
664 static int setsockopt(struct socket *sock, int lvl, int opt, sockptr_t ov,
667 struct sock *sk = sock->sk;
733 * o sock->state: holds the SS_* socket state and is updated by connect and
736 static int caif_connect(struct socket *sock, struct sockaddr *uaddr,
739 struct sock *sk = sock->sk;
757 switch (sock->state) {
765 sock->state = SS_CONNECTED;
796 sock->state = SS_UNCONNECTED;
807 sock->state = SS_CONNECTING;
873 sock->state = SS_UNCONNECTED;
879 sock->state = SS_CONNECTED;
890 static int caif_release(struct socket *sock)
892 struct sock *sk = sock->sk;
903 * this ensures no packets when sock is dead.
908 sock->sk = NULL;
930 struct socket *sock, poll_table *wait)
932 struct sock *sk = sock->sk;
936 sock_poll_wait(file, sock, wait);
1001 static void caif_sock_destructor(struct sock *sk)
1016 static int caif_create(struct net *net, struct socket *sock, int protocol,
1019 struct sock *sk = NULL;
1031 * The sock->type specifies the socket type to use.
1036 if (sock->type == SOCK_SEQPACKET)
1037 sock->ops = &caif_seqpacket_ops;
1038 else if (sock->type == SOCK_STREAM)
1039 sock->ops = &caif_stream_ops;
1048 * initialization makes sure that sock->state is not uninitialized.
1077 /* Initialize the nozero default sock structure data. */
1078 sock_init_data(sock, sk);