Lines Matching refs:sock
30 #include <net/sock.h>
38 static int pn_socket_release(struct socket *sock)
40 struct sock *sk = sock->sk;
43 sock->sk = NULL;
74 * Also grab sock if it was found. Remember to sock_put it later.
76 struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *spn)
79 struct sock *sknode;
80 struct sock *rval = NULL;
125 struct sock *sknode;
146 void pn_sock_hash(struct sock *sk)
156 void pn_sock_unhash(struct sock *sk)
166 static int pn_socket_bind(struct socket *sock, struct sockaddr *addr, int len)
168 struct sock *sk = sock->sk;
212 static int pn_socket_autobind(struct socket *sock)
219 err = pn_socket_bind(sock, (struct sockaddr *)&sa,
223 BUG_ON(!pn_port(pn_sk(sock->sk)->sobject));
227 static int pn_socket_accept(struct socket *sock, struct socket *newsock,
230 struct sock *sk = sock->sk;
231 struct sock *newsk;
245 static int pn_socket_getname(struct socket *sock, struct sockaddr *addr,
248 struct sock *sk = sock->sk;
261 static unsigned int pn_socket_poll(struct file *file, struct socket *sock,
264 struct sock *sk = sock->sk;
290 static int pn_socket_ioctl(struct socket *sock, unsigned int cmd,
293 struct sock *sk = sock->sk;
328 static int pn_socket_listen(struct socket *sock, int backlog)
330 struct sock *sk = sock->sk;
333 if (sock->state != SS_UNCONNECTED)
335 if (pn_socket_autobind(sock))
352 static int pn_socket_sendmsg(struct kiocb *iocb, struct socket *sock,
355 struct sock *sk = sock->sk;
357 if (pn_socket_autobind(sock))
415 int pn_sock_get_port(struct sock *sk, unsigned short sport)
421 struct sock *tmpsk;
449 /* No sock there! We can use that port... */
464 static struct sock *pn_sock_get_idx(struct seq_file *seq, loff_t pos)
469 struct sock *sknode;
485 static struct sock *pn_sock_get_next(struct seq_file *seq, struct sock *sk)
505 struct sock *sk;
529 struct sock *sk = v;