Lines Matching refs:sock

68 	struct socket *sock;  member
94 struct socket *sock = con->sock; in tipc_conn_kref_release() local
95 struct sock *sk; in tipc_conn_kref_release()
97 if (sock) { in tipc_conn_kref_release()
98 sk = sock->sk; in tipc_conn_kref_release()
100 __module_get(sock->ops->owner); in tipc_conn_kref_release()
104 kernel_bind(sock, (struct sockaddr *)saddr, sizeof(*saddr)); in tipc_conn_kref_release()
105 sock_release(sock); in tipc_conn_kref_release()
106 con->sock = NULL; in tipc_conn_kref_release()
135 static void sock_data_ready(struct sock *sk) in sock_data_ready()
149 static void sock_write_space(struct sock *sk) in sock_write_space()
163 static void tipc_register_callbacks(struct socket *sock, struct tipc_conn *con) in tipc_register_callbacks() argument
165 struct sock *sk = sock->sk; in tipc_register_callbacks()
173 con->sock = sock; in tipc_register_callbacks()
180 struct sock *sk = con->sock->sk; in tipc_unregister_callbacks()
208 kernel_sock_shutdown(con->sock, SHUT_RDWR); in tipc_close_conn()
264 ret = kernel_recvmsg(con->sock, &msg, &iov, 1, iov.iov_len, in tipc_receive_from_sock()
271 s->tipc_conn_recvmsg(sock_net(con->sock->sk), con->conid, &addr, in tipc_receive_from_sock()
291 struct socket *sock = con->sock; in tipc_accept_from_sock() local
296 ret = kernel_accept(sock, &newsock, O_NONBLOCK); in tipc_accept_from_sock()
325 struct socket *sock = NULL; in tipc_create_listen_sock() local
328 ret = sock_create_kern(s->net, AF_TIPC, SOCK_SEQPACKET, 0, &sock); in tipc_create_listen_sock()
331 ret = kernel_setsockopt(sock, SOL_TIPC, TIPC_IMPORTANCE, in tipc_create_listen_sock()
335 ret = kernel_bind(sock, (struct sockaddr *)s->saddr, sizeof(*s->saddr)); in tipc_create_listen_sock()
344 ret = kernel_listen(sock, 0); in tipc_create_listen_sock()
372 module_put(sock->ops->owner); in tipc_create_listen_sock()
373 module_put(sock->sk->sk_prot_creator->owner); in tipc_create_listen_sock()
376 return sock; in tipc_create_listen_sock()
379 kernel_sock_shutdown(sock, SHUT_RDWR); in tipc_create_listen_sock()
380 sock_release(sock); in tipc_create_listen_sock()
386 struct socket *sock; in tipc_open_listening_sock() local
393 sock = tipc_create_listen_sock(con); in tipc_open_listening_sock()
394 if (!sock) { in tipc_open_listening_sock()
401 tipc_register_callbacks(sock, con); in tipc_open_listening_sock()
511 ret = kernel_sendmsg(con->sock, &msg, &e->iov, 1, in tipc_send_to_sock()