Lines Matching refs:sock
63 #include <net/sock.h>
81 static inline void __atalk_insert_socket(struct sock *sk)
86 static inline void atalk_remove_socket(struct sock *sk)
93 static struct sock *atalk_search_socket(struct sockaddr_at *to,
96 struct sock *s;
139 static struct sock *atalk_find_or_insert_socket(struct sock *sk,
142 struct sock *s;
164 struct sock *sk = (struct sock *)data;
173 static inline void atalk_destroy_socket(struct sock *sk)
1014 static int atalk_create(struct net *net, struct socket *sock, int protocol,
1017 struct sock *sk;
1027 if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM)
1034 sock->ops = &atalk_dgram_ops;
1035 sock_init_data(sock, sk);
1044 static int atalk_release(struct socket *sock)
1046 struct sock *sk = sock->sk;
1051 sock->sk = NULL;
1068 static int atalk_pick_and_bind_port(struct sock *sk, struct sockaddr_at *sat)
1077 struct sock *s;
1104 static int atalk_autobind(struct sock *sk)
1125 static int atalk_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
1128 struct sock *sk = sock->sk;
1180 static int atalk_connect(struct socket *sock, struct sockaddr *uaddr,
1183 struct sock *sk = sock->sk;
1189 sock->state = SS_UNCONNECTED;
1221 sock->state = SS_CONNECTED;
1233 static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
1237 struct sock *sk = sock->sk;
1273 static unsigned int atalk_poll(struct file *file, struct socket *sock,
1278 err = datagram_poll(file, sock, wait);
1412 struct sock *sock;
1481 sock = atalk_search_socket(&tosat, atif);
1482 if (!sock) /* But not one of our sockets */
1486 skb->sk = sock;
1488 if (sock_queue_rcv_skb(sock, skb) < 0)
1558 static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
1561 struct sock *sk = sock->sk;
1726 static int atalk_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
1729 struct sock *sk = sock->sk;
1778 static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1781 struct sock *sk = sock->sk;
1839 static int atalk_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1848 return atalk_ioctl(sock, cmd, (unsigned long)compat_ptr(arg));