diff options
Diffstat (limited to 'pingu_host.c')
-rw-r--r-- | pingu_host.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pingu_host.c b/pingu_host.c index 5fa5aaf..5146f51 100644 --- a/pingu_host.c +++ b/pingu_host.c @@ -111,6 +111,17 @@ struct pingu_host *pingu_host_find_by_iface(struct pingu_iface *iface) return NULL; } +void pingu_host_dump_status(int fd) +{ + struct pingu_host *host; + char buf[512]; + list_for_each_entry(host, &host_list, host_list_entry) { + snprintf(buf, sizeof(buf), "%s: %i\n", host->label, host->status); + write(fd, buf, strlen(buf)); + } + write(fd, "", 1); +} + int pingu_host_init(struct ev_loop *loop) { struct pingu_host *host; |