Lines Matching defs:sock

28 #include <net/sock.h>
37 static inline struct kcm_sock *kcm_sk(const struct sock *sk)
47 static void report_csk_error(struct sock *csk, int err)
56 struct sock *csk = psock->sk;
115 static int kcm_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
170 struct sock *sk = skb->sk;
189 static int kcm_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
251 /* Lower sock lock held */
303 /* Lower sock held */
346 /* Lower sock lock held */
347 static void psock_data_ready(struct sock *sk)
360 /* Called with lower sock held */
401 static void psock_state_change(struct sock *sk)
411 static void psock_write_space(struct sock *sk)
438 /* kcm sock is locked. */
519 /* kcm sock is locked. */
575 /* Write any messages ready on the kcm socket. Called with kcm sock lock
580 struct sock *sk = &kcm->sk;
727 struct sock *sk = &kcm->sk;
760 static ssize_t kcm_sendpage(struct socket *sock, struct page *page,
764 struct sock *sk = sock->sk;
903 static int kcm_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
905 struct sock *sk = sock->sk;
910 int eor = (sock->type == SOCK_DGRAM) ?
1067 if (sock->type == SOCK_SEQPACKET) {
1090 static int kcm_recvmsg(struct socket *sock, struct msghdr *msg,
1094 struct sock *sk = sock->sk;
1120 if (sock->type == SOCK_DGRAM) {
1140 static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos,
1145 struct sock *sk = sock->sk;
1190 /* kcm sock lock held */
1216 /* kcm sock lock held */
1232 static int kcm_setsockopt(struct socket *sock, int level, int optname,
1235 struct kcm_sock *kcm = kcm_sk(sock->sk);
1266 static int kcm_getsockopt(struct socket *sock, int level, int optname,
1269 struct kcm_sock *kcm = kcm_sk(sock->sk);
1303 /* For SOCK_SEQPACKET sock type, datagram_poll checks the sk_state, so
1334 static int kcm_attach(struct socket *sock, struct socket *csock,
1337 struct kcm_sock *kcm = kcm_sk(sock->sk);
1339 struct sock *csk;
1437 static int kcm_attach_ioctl(struct socket *sock, struct kcm_attach *info)
1453 err = kcm_attach(sock, csock, prog);
1469 struct sock *csk = psock->sk;
1506 /* Call strp_done without sock lock */
1563 static int kcm_unattach_ioctl(struct socket *sock, struct kcm_unattach *info)
1565 struct kcm_sock *kcm = kcm_sk(sock->sk);
1569 struct sock *csk;
1625 struct sock *newsk;
1648 static int kcm_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1659 err = kcm_attach_ioctl(sock, &info);
1669 err = kcm_unattach_ioctl(sock, &info);
1681 file = kcm_clone(sock);
1745 struct sock *sk = &kcm->sk;
1793 static int kcm_release(struct socket *sock)
1795 struct sock *sk = sock->sk;
1854 sock->sk = NULL;
1905 static int kcm_create(struct net *net, struct socket *sock,
1909 struct sock *sk;
1912 switch (sock->type) {
1914 sock->ops = &kcm_dgram_ops;
1917 sock->ops = &kcm_seqpacket_ops;
1958 sock_init_data(sock, sk);