Logo Search packages:      
Sourcecode: avahi version File versions  Download package

int avahi_server_dump ( AvahiServer s,
AvahiDumpCallback  callback,
void *  userdata 

Dump the current server status by calling "callback" for each line.

Definition at line 339 of file entry.c.

References AVAHI_ERR_NO_MEMORY, AVAHI_OK, and avahi_server_dump().

Referenced by avahi_server_dump().

    AvahiEntry *e;

    callback(";;; ZONE DUMP FOLLOWS ;;;", userdata);

    for (e = s->entries; e; e = e->entries_next) {
        char *t;
        char ln[256];

        if (e->dead)
        if (!(t = avahi_record_to_string(e->record)))
            return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
        snprintf(ln, sizeof(ln), "%s ; iface=%i proto=%i", t, e->interface, e->protocol);

        callback(ln, userdata);

    avahi_dump_caches(s->monitor, callback, userdata);

    if (s->wide_area_lookup_engine)
        avahi_wide_area_cache_dump(s->wide_area_lookup_engine, callback, userdata);
    return AVAHI_OK;

Generated by  Doxygen 1.6.0   Back to index