Lines Matching refs:qrtr_ns

27 } qrtr_ns;  variable
127 return kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_new()
154 ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in service_announce_del()
185 ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in lookup_notify()
198 node = node_get(qrtr_ns.local_node); in announce_servers()
286 if (srv->node == qrtr_ns.local_node) in server_del()
287 service_announce_del(&qrtr_ns.bcast_sq, srv); in server_del()
290 list_for_each(li, &qrtr_ns.lookups) { in server_del()
321 ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in say_hello()
378 local_node = node_get(qrtr_ns.local_node); in ctrl_cmd_bye()
405 ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in ctrl_cmd_bye()
443 if (from->sq_node == qrtr_ns.local_node && from->sq_port != port) in ctrl_cmd_del_client()
447 list_for_each_safe(li, tmp, &qrtr_ns.lookups) { in ctrl_cmd_del_client()
464 local_node = node_get(qrtr_ns.local_node); in ctrl_cmd_del_client()
492 ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); in ctrl_cmd_del_client()
515 if (from->sq_node == qrtr_ns.local_node) { in ctrl_cmd_new_server()
524 if (srv->node == qrtr_ns.local_node) { in ctrl_cmd_new_server()
525 ret = service_announce_new(&qrtr_ns.bcast_sq, srv); in ctrl_cmd_new_server()
533 list_for_each(li, &qrtr_ns.lookups) { in ctrl_cmd_new_server()
553 if (from->sq_node == qrtr_ns.local_node) { in ctrl_cmd_del_server()
559 if (from->sq_node == qrtr_ns.local_node && from->sq_port != port) in ctrl_cmd_del_server()
581 if (from->sq_node != qrtr_ns.local_node) in ctrl_cmd_new_lookup()
591 list_add_tail(&lookup->li, &qrtr_ns.lookups); in ctrl_cmd_new_lookup()
645 list_for_each_safe(li, tmp, &qrtr_ns.lookups) { in ctrl_cmd_del_lookup()
684 msglen = kernel_recvmsg(qrtr_ns.sock, &msg, &iv, 1, in qrtr_ns_worker()
755 queue_work(qrtr_ns.workqueue, &qrtr_ns.work); in qrtr_ns_data_ready()
763 INIT_LIST_HEAD(&qrtr_ns.lookups); in qrtr_ns_init()
764 INIT_WORK(&qrtr_ns.work, qrtr_ns_worker); in qrtr_ns_init()
767 PF_QIPCRTR, &qrtr_ns.sock); in qrtr_ns_init()
771 ret = kernel_getsockname(qrtr_ns.sock, (struct sockaddr *)&sq); in qrtr_ns_init()
777 qrtr_ns.workqueue = alloc_workqueue("qrtr_ns_handler", WQ_UNBOUND, 1); in qrtr_ns_init()
778 if (!qrtr_ns.workqueue) { in qrtr_ns_init()
783 qrtr_ns.sock->sk->sk_data_ready = qrtr_ns_data_ready; in qrtr_ns_init()
786 qrtr_ns.local_node = sq.sq_node; in qrtr_ns_init()
788 ret = kernel_bind(qrtr_ns.sock, (struct sockaddr *)&sq, sizeof(sq)); in qrtr_ns_init()
794 qrtr_ns.bcast_sq.sq_family = AF_QIPCRTR; in qrtr_ns_init()
795 qrtr_ns.bcast_sq.sq_node = QRTR_NODE_BCAST; in qrtr_ns_init()
796 qrtr_ns.bcast_sq.sq_port = QRTR_PORT_CTRL; in qrtr_ns_init()
798 ret = say_hello(&qrtr_ns.bcast_sq); in qrtr_ns_init()
805 destroy_workqueue(qrtr_ns.workqueue); in qrtr_ns_init()
807 sock_release(qrtr_ns.sock); in qrtr_ns_init()
814 cancel_work_sync(&qrtr_ns.work); in qrtr_ns_remove()
815 destroy_workqueue(qrtr_ns.workqueue); in qrtr_ns_remove()
816 sock_release(qrtr_ns.sock); in qrtr_ns_remove()