+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+ int error;
+ AvahiSimplePoll *simple_poll;
+ struct timeval tv;
+ struct AvahiServerConfig config;
+
+ simple_poll = avahi_simple_poll_new();
+ poll_api = avahi_simple_poll_get(simple_poll);
+
+ avahi_server_config_init(&config);
+ config.publish_workstation = 0;
+ config.use_ipv6 = 0;
+ config.publish_domain = 0;
+ config.publish_hinfo = 0;
+ avahi = avahi_server_new(poll_api, &config, server_callback, NULL, &error);
+ avahi_server_config_free(&config);
+
+ avahi_elapse_time(&tv, 5000, 0);
+ poll_api->timeout_new(poll_api, &tv, dump_timeout_callback, avahi);
+
+ avahi_elapse_time(&tv, 5000, 0);
+ poll_api->timeout_new(poll_api, &tv, rename_timeout_callback, avahi);