Lines Matching defs:sock

19 #include <net/sock.h>
28 static int pn_socket_release(struct socket *sock)
30 struct sock *sk = sock->sk;
33 sock->sk = NULL;
64 * Also grab sock if it was found. Remember to sock_put it later.
66 struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *spn)
68 struct sock *sknode;
69 struct sock *rval = NULL;
111 struct sock *sknode;
132 int pn_sock_hash(struct sock *sk)
144 void pn_sock_unhash(struct sock *sk)
156 static int pn_socket_bind(struct socket *sock, struct sockaddr *addr, int len)
158 struct sock *sk = sock->sk;
202 static int pn_socket_autobind(struct socket *sock)
209 err = pn_socket_bind(sock, (struct sockaddr *)&sa,
213 BUG_ON(!pn_port(pn_sk(sock->sk)->sobject));
217 static int pn_socket_connect(struct socket *sock, struct sockaddr *addr,
220 struct sock *sk = sock->sk;
227 if (pn_socket_autobind(sock))
236 switch (sock->state) {
253 sock->state = SS_CONNECTING;
257 sock->state = SS_UNCONNECTED;
288 sock->state = err ? SS_UNCONNECTED : SS_CONNECTED;
294 static int pn_socket_accept(struct socket *sock, struct socket *newsock,
297 struct sock *sk = sock->sk;
298 struct sock *newsk;
315 static int pn_socket_getname(struct socket *sock, struct sockaddr *addr,
318 struct sock *sk = sock->sk;
330 static __poll_t pn_socket_poll(struct file *file, struct socket *sock,
333 struct sock *sk = sock->sk;
356 static int pn_socket_ioctl(struct socket *sock, unsigned int cmd,
359 struct sock *sk = sock->sk;
393 static int pn_socket_listen(struct socket *sock, int backlog)
395 struct sock *sk = sock->sk;
398 if (pn_socket_autobind(sock))
402 if (sock->state != SS_UNCONNECTED) {
417 static int pn_socket_sendmsg(struct socket *sock, struct msghdr *m,
420 struct sock *sk = sock->sk;
422 if (pn_socket_autobind(sock))
468 int pn_sock_get_port(struct sock *sk, unsigned short sport)
474 struct sock *tmpsk;
502 /* No sock there! We can use that port... */
517 static struct sock *pn_sock_get_idx(struct seq_file *seq, loff_t pos)
521 struct sock *sknode;
537 static struct sock *pn_sock_get_next(struct seq_file *seq, struct sock *sk)
557 struct sock *sk;
580 struct sock *sk = v;
606 struct sock *sk[256];
612 struct sock *pn_find_sock_by_res(struct net *net, u8 res)
614 struct sock *sk;
629 int pn_sock_bind_res(struct sock *sk, u8 res)
650 int pn_sock_unbind_res(struct sock *sk, u8 res)
671 void pn_sock_unbind_all_res(struct sock *sk)
692 static struct sock **pn_res_get_idx(struct seq_file *seq, loff_t pos)
710 static struct sock **pn_res_get_next(struct seq_file *seq, struct sock **sk)
732 struct sock **sk;
754 struct sock **psk = v;
755 struct sock *sk = *psk;