Lines Matching refs:sock

29 #include <net/sock.h>
31 #include <trace/events/sock.h>
39 static inline struct kcm_sock *kcm_sk(const struct sock *sk)
49 static void report_csk_error(struct sock *csk, int err)
58 struct sock *csk = psock->sk;
117 static int kcm_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
172 struct sock *sk = skb->sk;
191 static int kcm_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
253 /* Lower sock lock held */
305 /* Lower sock held */
348 /* Lower sock lock held */
349 static void psock_data_ready(struct sock *sk)
364 /* Called with lower sock held */
405 static void psock_state_change(struct sock *sk)
415 static void psock_write_space(struct sock *sk)
442 /* kcm sock is locked. */
523 /* kcm sock is locked. */
579 /* Write any messages ready on the kcm socket. Called with kcm sock lock
585 struct sock *sk = &kcm->sk;
713 struct sock *sk = &kcm->sk;
746 static int kcm_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
748 struct sock *sk = sock->sk;
753 int eor = (sock->type == SOCK_DGRAM) ?
933 if (sock->type == SOCK_SEQPACKET) {
956 static void kcm_splice_eof(struct socket *sock)
958 struct sock *sk = sock->sk;
969 static int kcm_recvmsg(struct socket *sock, struct msghdr *msg,
972 struct sock *sk = sock->sk;
998 if (sock->type == SOCK_DGRAM) {
1018 static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos,
1022 struct sock *sk = sock->sk;
1067 /* kcm sock lock held */
1093 /* kcm sock lock held */
1109 static int kcm_setsockopt(struct socket *sock, int level, int optname,
1112 struct kcm_sock *kcm = kcm_sk(sock->sk);
1143 static int kcm_getsockopt(struct socket *sock, int level, int optname,
1146 struct kcm_sock *kcm = kcm_sk(sock->sk);
1181 /* For SOCK_SEQPACKET sock type, datagram_poll checks the sk_state, so
1212 static int kcm_attach(struct socket *sock, struct socket *csock,
1215 struct kcm_sock *kcm = kcm_sk(sock->sk);
1217 struct sock *csk;
1315 static int kcm_attach_ioctl(struct socket *sock, struct kcm_attach *info)
1331 err = kcm_attach(sock, csock, prog);
1347 struct sock *csk = psock->sk;
1384 /* Call strp_done without sock lock */
1441 static int kcm_unattach_ioctl(struct socket *sock, struct kcm_unattach *info)
1443 struct kcm_sock *kcm = kcm_sk(sock->sk);
1447 struct sock *csk;
1503 struct sock *newsk;
1526 static int kcm_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1537 err = kcm_attach_ioctl(sock, &info);
1547 err = kcm_unattach_ioctl(sock, &info);
1559 file = kcm_clone(sock);
1623 struct sock *sk = &kcm->sk;
1671 static int kcm_release(struct socket *sock)
1673 struct sock *sk = sock->sk;
1732 sock->sk = NULL;
1783 static int kcm_create(struct net *net, struct socket *sock,
1787 struct sock *sk;
1790 switch (sock->type) {
1792 sock->ops = &kcm_dgram_ops;
1795 sock->ops = &kcm_seqpacket_ops;
1836 sock_init_data(sock, sk);