Lines Matching refs:sock
28 static int pn_socket_release(struct socket *sock) in pn_socket_release() argument
30 struct sock *sk = sock->sk; in pn_socket_release()
33 sock->sk = NULL; in pn_socket_release()
66 struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *spn) in pn_find_sock_by_sa()
68 struct sock *sknode; in pn_find_sock_by_sa()
69 struct sock *rval = NULL; in pn_find_sock_by_sa()
111 struct sock *sknode; in pn_deliver_sock_broadcast()
132 int pn_sock_hash(struct sock *sk) in pn_sock_hash()
144 void pn_sock_unhash(struct sock *sk) in pn_sock_unhash()
156 static int pn_socket_bind(struct socket *sock, struct sockaddr *addr, int len) in pn_socket_bind() argument
158 struct sock *sk = sock->sk; in pn_socket_bind()
202 static int pn_socket_autobind(struct socket *sock) in pn_socket_autobind() argument
209 err = pn_socket_bind(sock, (struct sockaddr *)&sa, in pn_socket_autobind()
213 BUG_ON(!pn_port(pn_sk(sock->sk)->sobject)); in pn_socket_autobind()
217 static int pn_socket_connect(struct socket *sock, struct sockaddr *addr, in pn_socket_connect() argument
220 struct sock *sk = sock->sk; in pn_socket_connect()
227 if (pn_socket_autobind(sock)) in pn_socket_connect()
236 switch (sock->state) { in pn_socket_connect()
253 sock->state = SS_CONNECTING; in pn_socket_connect()
257 sock->state = SS_UNCONNECTED; in pn_socket_connect()
288 sock->state = err ? SS_UNCONNECTED : SS_CONNECTED; in pn_socket_connect()
294 static int pn_socket_accept(struct socket *sock, struct socket *newsock, in pn_socket_accept() argument
297 struct sock *sk = sock->sk; in pn_socket_accept()
298 struct sock *newsk; in pn_socket_accept()
315 static int pn_socket_getname(struct socket *sock, struct sockaddr *addr, in pn_socket_getname() argument
318 struct sock *sk = sock->sk; in pn_socket_getname()
330 static __poll_t pn_socket_poll(struct file *file, struct socket *sock, in pn_socket_poll() argument
333 struct sock *sk = sock->sk; in pn_socket_poll()
356 static int pn_socket_ioctl(struct socket *sock, unsigned int cmd, in pn_socket_ioctl() argument
359 struct sock *sk = sock->sk; in pn_socket_ioctl()
393 static int pn_socket_listen(struct socket *sock, int backlog) in pn_socket_listen() argument
395 struct sock *sk = sock->sk; in pn_socket_listen()
398 if (pn_socket_autobind(sock)) in pn_socket_listen()
402 if (sock->state != SS_UNCONNECTED) { in pn_socket_listen()
417 static int pn_socket_sendmsg(struct socket *sock, struct msghdr *m, in pn_socket_sendmsg() argument
420 struct sock *sk = sock->sk; in pn_socket_sendmsg()
422 if (pn_socket_autobind(sock)) in pn_socket_sendmsg()
470 int pn_sock_get_port(struct sock *sk, unsigned short sport) in pn_sock_get_port()
476 struct sock *tmpsk; in pn_sock_get_port()
519 static struct sock *pn_sock_get_idx(struct seq_file *seq, loff_t pos) in pn_sock_get_idx()
523 struct sock *sknode; in pn_sock_get_idx()
539 static struct sock *pn_sock_get_next(struct seq_file *seq, struct sock *sk) in pn_sock_get_next()
559 struct sock *sk; in pn_sock_seq_next()
582 struct sock *sk = v; in pn_sock_seq_show()
608 struct sock *sk[256];
614 struct sock *pn_find_sock_by_res(struct net *net, u8 res) in pn_find_sock_by_res()
616 struct sock *sk; in pn_find_sock_by_res()
631 int pn_sock_bind_res(struct sock *sk, u8 res) in pn_sock_bind_res()
652 int pn_sock_unbind_res(struct sock *sk, u8 res) in pn_sock_unbind_res()
673 void pn_sock_unbind_all_res(struct sock *sk) in pn_sock_unbind_all_res()
694 static struct sock **pn_res_get_idx(struct seq_file *seq, loff_t pos) in pn_res_get_idx()
712 static struct sock **pn_res_get_next(struct seq_file *seq, struct sock **sk) in pn_res_get_next()
734 struct sock **sk; in pn_res_seq_next()
756 struct sock **psk = v; in pn_res_seq_show()
757 struct sock *sk = *psk; in pn_res_seq_show()