Lines Matching refs:sq

63 	struct sockaddr_qrtr sq;  member
224 static int annouce_servers(struct context *ctx, struct sockaddr_qrtr *sq) in annouce_servers() argument
238 rc = service_announce_new(ctx, sq, srv); in annouce_servers()
315 lookup_notify(ctx, &lookup->sq, srv, false); in server_del()
323 static int ctrl_cmd_hello(struct context *ctx, struct sockaddr_qrtr *sq, in ctrl_cmd_hello() argument
328 rc = sendto(ctx->sock, buf, len, 0, (void *)sq, sizeof(*sq)); in ctrl_cmd_hello()
330 rc = annouce_servers(ctx, sq); in ctrl_cmd_hello()
338 struct sockaddr_qrtr sq; in ctrl_cmd_bye() local
367 sq.sq_family = AF_QIPCRTR; in ctrl_cmd_bye()
368 sq.sq_node = srv->node; in ctrl_cmd_bye()
369 sq.sq_port = srv->port; in ctrl_cmd_bye()
372 (struct sockaddr *)&sq, sizeof(sq)); in ctrl_cmd_bye()
384 struct sockaddr_qrtr sq; in ctrl_cmd_del_client() local
405 if (lookup->sq.sq_node != node_id) in ctrl_cmd_del_client()
407 if (lookup->sq.sq_port != port) in ctrl_cmd_del_client()
431 sq.sq_family = AF_QIPCRTR; in ctrl_cmd_del_client()
432 sq.sq_node = srv->node; in ctrl_cmd_del_client()
433 sq.sq_port = srv->port; in ctrl_cmd_del_client()
436 (struct sockaddr *)&sq, sizeof(sq)); in ctrl_cmd_del_client()
477 lookup_notify(ctx, &lookup->sq, srv, true); in ctrl_cmd_new_server()
528 lookup->sq = *from; in ctrl_cmd_new_lookup()
558 if (lookup->sq.sq_node != from->sq_node) in ctrl_cmd_del_lookup()
560 if (lookup->sq.sq_port != from->sq_port) in ctrl_cmd_del_lookup()
577 struct sockaddr_qrtr sq; in ctrl_port_fn() local
586 sl = sizeof(sq); in ctrl_port_fn()
587 len = recvfrom(sock, buf, sizeof(buf), 0, (void *)&sq, &sl); in ctrl_port_fn()
597 LOGW("short packet from %d:%d", sq.sq_node, sq.sq_port); in ctrl_port_fn()
603 LOGD("%s from %d:%d\n", ctrl_pkt_strings[cmd], sq.sq_node, sq.sq_port); in ctrl_port_fn()
605 LOGD("UNK (%08x) from %d:%d\n", cmd, sq.sq_node, sq.sq_port); in ctrl_port_fn()
610 rc = ctrl_cmd_hello(ctx, &sq, buf, len); in ctrl_port_fn()
613 rc = ctrl_cmd_bye(ctx, &sq); in ctrl_port_fn()
616 rc = ctrl_cmd_del_client(ctx, &sq, in ctrl_port_fn()
621 rc = ctrl_cmd_new_server(ctx, &sq, in ctrl_port_fn()
628 rc = ctrl_cmd_del_server(ctx, &sq, in ctrl_port_fn()
639 rc = ctrl_cmd_new_lookup(ctx, &sq, in ctrl_port_fn()
644 rc = ctrl_cmd_del_lookup(ctx, &sq, in ctrl_port_fn()
652 sq.sq_node, sq.sq_port); in ctrl_port_fn()
705 struct sockaddr_qrtr sq; in main() local
709 socklen_t sl = sizeof(sq); in main()
764 rc = getsockname(ctx.sock, (void*)&sq, &sl); in main()
767 sq.sq_port = QRTR_PORT_CTRL; in main()
768 ctx.local_node = sq.sq_node; in main()
770 rc = bind(ctx.sock, (void *)&sq, sizeof(sq)); in main()