Lines Matching defs:imsg

39 #include <imsg.h>
45 int show_summary_msg(struct imsg *, int);
46 int show_session_msg(struct imsg *);
47 int show_command_output(struct imsg *);
57 void (*func)(struct imsg *);
61 void monitor_host_status(struct imsg *);
62 void monitor_id(struct imsg *);
63 int monitor(struct imsg *);
101 struct imsg imsg;
235 if ((n = imsg_get(ibuf, &imsg)) == -1)
245 done = show_summary_msg(&imsg, res->action);
248 done = show_session_msg(&imsg);
258 done = show_command_output(&imsg);
267 done = monitor(&imsg);
270 imsg_free(&imsg);
291 monitor_host_status(struct imsg *imsg)
295 memcpy(&cs, imsg->data, sizeof(cs));
312 monitor_id(struct imsg *imsg)
316 memcpy(&id, imsg->data, sizeof(id));
323 monitor(struct imsg *imsg)
331 imn = monitor_lookup(imsg->hdr.type);
332 printf("%s: imsg type %u len %u peerid %u pid %d\n", imn->name,
333 imsg->hdr.type, imsg->hdr.len, imsg->hdr.peerid, imsg->hdr.pid);
338 (*imn->func)(imsg);
344 show_summary_msg(struct imsg *imsg, int type)
355 switch (imsg->hdr.type) {
359 rdr = imsg->data;
367 table = imsg->data;
375 host = imsg->data;
398 rlay = imsg->data;
406 bcopy(imsg->data, &stats[0], sizeof(stats[0]));
413 bcopy(imsg->data, &stats, sizeof(stats));
419 rt = imsg->data;
433 nr = imsg->data;
441 errx(1, "wrong message in summary: %u", imsg->hdr.type);
448 show_session_msg(struct imsg *imsg)
454 switch (imsg->hdr.type) {
456 con = imsg->data;
461 imsg->hdr.peerid, con->se_id,
478 errx(1, "wrong message in session: %u", imsg->hdr.type);
485 show_command_output(struct imsg *imsg)
487 switch (imsg->hdr.type) {
496 errx(1, "wrong message in summary: %u", imsg->hdr.type);