12
main(int argc, char **argv)
15
int domid = 0, port = 0, status;
19
domid = strtol(argv[1], NULL, 10);
21
xc_fd = xc_interface_open();
23
errx(1, "failed to open control interface");
25
while ( (status = xc_evtchn_status(xc_fd, domid, port)) >= 0 )
29
case EVTCHNSTAT_closed:
30
msg = "Channel is not in use.";
32
case EVTCHNSTAT_unbound:
33
msg = "Channel is waiting interdom connection.";
35
case EVTCHNSTAT_interdomain:
36
msg = "Channel is connected to remote domain.";
39
msg = "Channel is bound to a phys IRQ line.";
42
msg = "Channel is bound to a virtual IRQ line.";
45
msg = "Channel is bound to a virtual IPI line.";
52
printf("%03d: %d: %s\n", port, status, msg);
56
xc_interface_close(xc_fd);