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

AvahiServerConfig* avahi_server_config_init ( AvahiServerConfig c )

Fill in default values for a server configuration structure. If you make use of an AvahiServerConfig structure be sure to initialize it with this function for the sake of upwards library compatibility. This call may allocate strings on the heap. To release this memory make sure to call avahi_server_config_done(). If you want to replace any strings in the structure be sure to free the strings filled in by this function with avahi_free() first and allocate the replacements with g_malloc() (or g_strdup()).

Parameters:
cA structure which shall be filled in

Definition at line 1574 of file server.c.

References AvahiServerConfig::add_service_cookie, AvahiServerConfig::allow_interfaces, AvahiServerConfig::allow_point_to_point, avahi_server_config_init(), AvahiServerConfig::browse_domains, AvahiServerConfig::check_response_ttl, AvahiServerConfig::deny_interfaces, AvahiServerConfig::disable_publishing, AvahiServerConfig::disallow_other_stacks, AvahiServerConfig::domain_name, AvahiServerConfig::enable_reflector, AvahiServerConfig::enable_wide_area, AvahiServerConfig::host_name, AvahiServerConfig::n_cache_entries_max, AvahiServerConfig::n_wide_area_servers, AvahiServerConfig::publish_a_on_ipv6, AvahiServerConfig::publish_aaaa_on_ipv4, AvahiServerConfig::publish_addresses, AvahiServerConfig::publish_domain, AvahiServerConfig::publish_hinfo, AvahiServerConfig::publish_workstation, AvahiServerConfig::ratelimit_burst, AvahiServerConfig::ratelimit_interval, AvahiServerConfig::reflect_ipv, AvahiServerConfig::use_iff_running, AvahiServerConfig::use_ipv4, and AvahiServerConfig::use_ipv6.

Referenced by avahi_server_config_init(), and avahi_server_new().

                                                                  {
    assert(c);

    memset(c, 0, sizeof(AvahiServerConfig));
    c->use_ipv6 = 1;
    c->use_ipv4 = 1;
    c->allow_interfaces = NULL;
    c->deny_interfaces = NULL;
    c->host_name = NULL;
    c->domain_name = NULL;
    c->check_response_ttl = 0;
    c->publish_hinfo = 1;
    c->publish_addresses = 1;
    c->publish_workstation = 1;
    c->publish_domain = 1;
    c->use_iff_running = 0;
    c->enable_reflector = 0;
    c->reflect_ipv = 0;
    c->add_service_cookie = 0;
    c->enable_wide_area = 0;
    c->n_wide_area_servers = 0;
    c->disallow_other_stacks = 0;
    c->browse_domains = NULL;
    c->disable_publishing = 0;
    c->allow_point_to_point = 0;
    c->publish_aaaa_on_ipv4 = 1;
    c->publish_a_on_ipv6 = 0;
    c->n_cache_entries_max = AVAHI_DEFAULT_CACHE_ENTRIES_MAX;
    c->ratelimit_interval = 0;
    c->ratelimit_burst = 0;

    return c;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index