Lines Matching defs:imsg
44 void (*func)(struct imsg *);
48 int monitor(struct imsg *);
50 int show_string(struct imsg *);
51 int show_stats(struct imsg *, int);
162 struct imsg imsg;
353 if ((n = imsg_get(ibuf, &imsg)) == -1)
359 done = monitor(&imsg);
362 done = show_stats(&imsg, quiet);
366 done = show_string(&imsg);
371 imsg_free(&imsg);
392 monitor(struct imsg *imsg)
400 imn = monitor_lookup(imsg->hdr.type);
401 printf("%s: imsg type %u len %u peerid %u pid %d\n", imn->name,
402 imsg->hdr.type, imsg->hdr.len, imsg->hdr.peerid, imsg->hdr.pid);
407 (*imn->func)(imsg);
413 show_string(struct imsg *imsg)
417 switch (imsg->hdr.type) {
424 if (IMSG_DATA_SIZE(imsg) > 0)
425 printf("%s", (char *)imsg->data);
442 show_stats(struct imsg *imsg, int quiet)
447 if (IMSG_DATA_SIZE(imsg) != sizeof(*stat))
449 stat = imsg->data;