Lines Matching refs:sock
44 int sock; member
171 rc = sendto(ctx->sock, &cmsg, sizeof(cmsg), 0, in service_announce_new()
195 rc = sendto(ctx->sock, &cmsg, sizeof(cmsg), 0, in service_announce_del()
217 rc = sendto(ctx->sock, &pkt, sizeof(pkt), 0, in lookup_notify()
328 rc = sendto(ctx->sock, buf, len, 0, (void *)sq, sizeof(*sq)); in ctrl_cmd_hello()
371 rc = sendto(ctx->sock, &pkt, sizeof(pkt), 0, in ctrl_cmd_bye()
435 rc = sendto(ctx->sock, &pkt, sizeof(pkt), 0, in ctrl_cmd_del_client()
578 int sock = ctx->sock; in ctrl_port_fn() local
587 len = recvfrom(sock, buf, sizeof(buf), 0, (void *)&sq, &sl); in ctrl_port_fn()
590 close(sock); in ctrl_port_fn()
591 ctx->sock = -1; in ctrl_port_fn()
665 rc = sendto(ctx->sock, &pkt, sizeof(pkt), 0, in say_hello()
688 static void go_dormant(int sock) in go_dormant() argument
690 close(sock); in go_dormant()
760 ctx.sock = socket(AF_QIPCRTR, SOCK_DGRAM, 0); in main()
761 if (ctx.sock < 0) in main()
764 rc = getsockname(ctx.sock, (void*)&sq, &sl); in main()
770 rc = bind(ctx.sock, (void *)&sq, sizeof(sq)); in main()
774 go_dormant(ctx.sock); in main()
790 close(ctx.sock); in main()
794 tkt = waiter_add_fd(w, ctx.sock); in main()
797 while (ctx.sock >= 0) in main()