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

int avahi_entry_group_add_service ( AvahiEntryGroup group,
AvahiIfIndex  interface,
AvahiProtocol  protocol,
AvahiPublishFlags  flags,
const char *  name,
const char *  type,
const char *  domain,
const char *  host,
uint16_t  port,

Add a service. Takes a variable NULL terminated list of TXT record strings as last arguments. Please note that this service is not announced on the network before avahi_entry_group_commit() is called.

interface  The interface this service shall be announced on. We recommend to pass AVAHI_IF_UNSPEC here, to announce on all interfaces.
protocol  The protocol this service shall be announced with, i.e. MDNS over IPV4 or MDNS over IPV6. We recommend to pass AVAHI_PROTO_UNSPEC here, to announce this service on all protocols the daemon supports.
flags  Usually 0, unless you know what you do
name  The name for the new service. Must be valid service name. i.e. a string shorter than 63 characters and valid UTF-8. May not be NULL.
type  The service type for the new service, such as _http._tcp. May not be NULL.
domain  The domain to register this domain in. We recommend to pass NULL here, to let the daemon decide
host  The host this services is residing on. We recommend to pass NULL here, the daemon will than automatically insert the local host name in that case
port  The IP port number of this service

Definition at line 496 of file entrygroup.c.


    va_list va;
    int r;
    AvahiStringList *txt;


    va_start(va, port);
    txt = avahi_string_list_new_va(va);
    r = avahi_entry_group_add_service_strlst(group, interface, protocol, flags, name, type, domain, host, port, txt);
    return r;

Generated by  Doxygen 1.6.0   Back to index