Lines Matching defs:sock
57 #include <net/sock.h>
76 static inline void __atalk_insert_socket(struct sock *sk)
81 static inline void atalk_remove_socket(struct sock *sk)
88 static struct sock *atalk_search_socket(struct sockaddr_at *to,
91 struct sock *s;
135 static struct sock *atalk_find_or_insert_socket(struct sock *sk,
138 struct sock *s;
159 struct sock *sk = from_timer(sk, t, sk_timer);
168 static inline void atalk_destroy_socket(struct sock *sk)
1019 static int atalk_create(struct net *net, struct socket *sock, int protocol,
1022 struct sock *sk;
1032 if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM)
1036 if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW))
1044 sock->ops = &atalk_dgram_ops;
1045 sock_init_data(sock, sk);
1054 static int atalk_release(struct socket *sock)
1056 struct sock *sk = sock->sk;
1063 sock->sk = NULL;
1082 static int atalk_pick_and_bind_port(struct sock *sk, struct sockaddr_at *sat)
1091 struct sock *s;
1117 static int atalk_autobind(struct sock *sk)
1138 static int atalk_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
1141 struct sock *sk = sock->sk;
1193 static int atalk_connect(struct socket *sock, struct sockaddr *uaddr,
1196 struct sock *sk = sock->sk;
1202 sock->state = SS_UNCONNECTED;
1236 sock->state = SS_CONNECTED;
1248 static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
1252 struct sock *sk = sock->sk;
1424 struct sock *sock;
1493 sock = atalk_search_socket(&tosat, atif);
1494 if (!sock) /* But not one of our sockets */
1498 if (sock_queue_rcv_skb(sock, skb) < 0)
1568 static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1570 struct sock *sk = sock->sk;
1745 static int atalk_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1748 struct sock *sk = sock->sk;
1797 static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1800 struct sock *sk = sock->sk;
1851 static int atalk_compat_routing_ioctl(struct sock *sk, unsigned int cmd,
1881 static int atalk_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1884 struct sock *sk = sock->sk;
1897 return atalk_ioctl(sock, cmd, (unsigned long)argp);