/** Stores configuration options for a server instance */
typedefstructAvahiServerConfig{
char*host_name;/**< Default host name. If left empty defaults to the result of gethostname(2) of the libc */
char*domain_name;/**< Default domain name. If left empty defaults to .local */
intuse_ipv4;/**< Enable IPv4 support */
intuse_ipv6;/**< Enable IPv6 support */
AvahiStringList*allow_interfaces;/**< Allow specific interface to be used for Avahi */
AvahiStringList*deny_interfaces;/**< Deny specific interfaces to be used for Avahi */
intpublish_hinfo;/**< Register a HINFO record for the host containing the local OS and CPU type */
intpublish_addresses;/**< Register A, AAAA and PTR records for all local IP addresses */
intpublish_workstation;/**< Register a _workstation._tcp service */
intpublish_domain;/**< Announce the local domain for browsing */
intcheck_response_ttl;/**< If enabled the server ignores all incoming responses with IP TTL != 255. Newer versions of the RFC do no longer contain this check, so it is disabled by default. */
intuse_iff_running;/**< Require IFF_RUNNING on local network interfaces. This is the official way to check for link beat. Unfortunately this doesn't work with all drivers. So bettere leave this off. */
intenable_reflector;/**< Reflect incoming mDNS traffic to all local networks. This allows mDNS based network browsing beyond ethernet borders */
intreflect_ipv;/**< if enable_reflector is 1, enable/disable reflecting between IPv4 and IPv6 */
intadd_service_cookie;/**< Add magic service cookie to all locally generated records implicitly */
intenable_wide_area;/**< Enable wide area support */
AvahiAddresswide_area_servers[AVAHI_WIDE_AREA_SERVERS_MAX];/** Unicast DNS server to use for wide area lookup */
unsignedn_wide_area_servers;/**< Number of servers in wide_area_servers[] */
intdisallow_other_stacks;/**< Make sure that only one mDNS responder is run at the same time on the local machine. If this is enable Avahi will not set SO_REUSADDR on its sockets, effectively preventing other stacks from running on the local machine */
unsignedn_cache_entries_max;/**< Maximum number of cache entries per interface */
AvahiUsecratelimit_interval;/**< If non-zero, rate-limiting interval parameter. */
unsignedratelimit_burst;/**< If ratelimit_interval is non-zero, rate-limiting burst parameter. */
}AvahiServerConfig;
/** Allocate a new mDNS responder object. */
AvahiServer*avahi_server_new(
constAvahiPoll*api,/**< The main loop adapter */
constAvahiServerConfig*sc,/**< If non-NULL a pointer to a configuration structure for the server. The server makes an internal deep copy of this structure, so you may free it using avahi_server_config_done()immediatelyaftercallingthisfunction.*/
AvahiServerCallbackcallback,/**< A callback which is called whenever the state of the server changes */
void*userdata,/**< An opaque pointer which is passed to the callback function */
int*error);
/** Free an mDNS responder object */
voidavahi_server_free(AvahiServer*s);
/** 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()).*/
AvahiServerConfig*avahi_server_config_init(
AvahiServerConfig*c/**< A structure which shall be filled in */);
/** Make a deep copy of the configuration structure *c to *ret. */
AvahiServerConfig*avahi_server_config_copy(
AvahiServerConfig*ret/**< destination */,
constAvahiServerConfig*c/**< source */);
/** Free the data in a server configuration structure. */