Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dnsserviceenumeratedomains(3dnssd) [opensolaris man page]

DNSServiceEnumerateDomains(3DNS_SD)		      DNS Service Discovery Library Functions		       DNSServiceEnumerateDomains(3DNS_SD)

NAME
DNSServiceEnumerateDomains - enumerate recommended domains SYNOPSIS
cc [ flag ... ] file ... -ldns_sd [ library ... ] #include <dns_sd.h> DNSServiceErrorType DNSServiceEnumerateDomains(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceDomainEnumReply callBack, void *context); typedef void(*DNSServiceDomainEnumReply)(DNSServiceRef sdRef, DNSServiceFlags flags, uint31_t interfaceIndex, DNSServiceErrorType errorCode, const char *replyDomain, void *context); DESCRIPTION
The DNSServiceEnumerateDomains() function allows applications to determine recommended browsing and registration domains for performing service discovery DNS queries. The callback argument points to a function to be called to return results or if the asynchronous call to DNSServiceEnumerateDomains() fails. The callback function should point to a function of type DNSServiceDomainEnumReply listed above. A pointer to an uninitialized DNSServiceRef, sdRef must be passed to DNSServiceEnumerateDomains(). If the call succeeds, sdRef is initial- ized and kDNSServiceErr_NoError is returned. The enumeration call runs indefinitely until the client terminates the call. The enumeration call must be terminated by passing the DNSServiceRef initialized by the enumeration call to DNSServiceRefDeallocate() when no more domains are to be found. The value of flags is constructed by a bitwise-inclusive-OR of the flags used in DNSService functions and defined in <dns_sd.h>. Possible values for flags to the DNSServiceEnumerateDomains() call are: kDNSServiceFlagsBrowseDomains and kDNSServiceFlagsRegistrationDomains. The kDNSServiceFlagsBrowseDomains value is passed to enumerate domains recommended for browsing. The kDNSServiceFlagsRegistrationDomains value is passed to enumerate domains recommended for registration. Possible values of flags returned in the callback function are: kDNSService- FlagsMoreComing, kDNSServiceFlagsAdd, and kDNSServiceFlagsDefault. The interfaceIndex parameter to the enumeration call specifies the interface index searched for domains. Most applications pass 0 to enu- merate domains on all interfaces. See the section "Constants for specifying an interface index" in <dns_sd.h> for more details. The context parameter can be NULL and is passed to the enumeration callback function. The interfaceIndex value passed to the callback specifies the interface on which the domain exists. RETURN VALUES
The DNSServiceEnumerateDomains() function returns kDNSServiceErr_NoError on success. Otherwise, the function returns an error code defined in <dns_sd.h>. The callback is not invoked on error and the DNSServiceRef that is passed is not initialized. Upon a successful call to DNSServiceEnumerateDomains(), subsequent asynchronous errors are delivered to the callback. ATTRIBUTES
See attributes(5) for description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
DNSServiceRefDeallocate(3DNS_SD), attributes(5) SunOS 5.11 20 Aug 2007 DNSServiceEnumerateDomains(3DNS_SD)

Check Out this Related Man Page

DNSServiceResolve(3DNS_SD)			      DNS Service Discovery Library Functions				DNSServiceResolve(3DNS_SD)

NAME
DNSServiceResolve - resolve service instances with DNS SYNOPSIS
cc [ flag ... ] file ... -ldns_sd [ library ... ] #include <dns_sd.h> DNSServiceErrorType DNSServiceResolve(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, const char *name, const char *regtype, const char *domain, DNSServiceServiceResolveReply callBack, void *context); typedef void(*DNSServiceResolveReply)(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char *fullname, const char *hosttarget, uint16_t port, uint16_t txtLen, const char *txtRecord, void *context); DESCRIPTION
The DNSServiceResolve() function is used to resolve a service name returned by DNSServiceBrowse() to host IP address, port number, and TXT record. The DNSServiceResolve() function returns results asynchronously. A DNSServiceResolve() call to resolve service name can be ended by calling DNSServiceRefDeallocate(). The callback argument points to a function of type DNSServiceResolveReply as listed above. The callback function is invoked on finding a result or when the asynch resolve call fails. The sdRef argument to DNSServiceResolve() points to an uninitialized DNSServiceRef. If the call to DNSServiceResolve() succeeds, sdRef is initialized and kDNSServiceErr_NoError is returned. The flags argument to DNSServiceResolve() is currently unused and reserved for future use. The interfaceIndex argument indicates the inter- face on which to resolve the service. If the DNSServiceResolve() call is the result of an earlier DNSServiceBrowse() operation, pass the interfaceIndex to perform a resolve on all interfaces. See the section "Constants for specifying an interface index" in <dns_sd.h> for more details. The name parameter is the service instance name to be resolved, as returned from a DNSServiceBrowse() call. The regtype holds the service type and the domain parameter indicates the domain in which the service instance was found. The context parameter points to a value that is passed to the callback function. The sdRef argument passed to the callback function is initialized by DNSServiceResolve() call. The flags parameter in the callback function is currently unused and reserved for future use. The errorCode parameter is kDNSServiceErr_NoError on success. Otherwise, it will hold the error defined in <dns_sd.h> and other parameters are undefined when errorCode is nonzero. The fullname parameter in the callback holds the full service domain name in the format <servicename>.<protocol>.<domain>. The full service domain name is escaped to follow standard DNS rules. The hosttarget parameter holds the target hostname of the machine providing the service. The port parameter indicates the port in network byte order on which the service accepts connections. The txtLen and txtRecord parameters hold the length and the TXT record of the service's primary TXT record. The context parameter points to the value that was passed as context to the DNSServiceResolve() call. RETURN VALUES
The DNSServiceResolve function returns kDNSServiceErr_NoError on success. Otherwise, an error code defined in <dns_sd.h> is returned to indicate an error has occurred. When an error is returned by DNSServiceResolve, the callback function is not invoked and the DNSServiceRef argument is not initialized. ATTRIBUTES
See attributes(5) for description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
DNSServiceBrowse(3DNS_SD), DNSServiceRefDeallocate(3DNS_SD), attributes(5) SunOS 5.11 20 Aug 2007 DNSServiceResolve(3DNS_SD)
Man Page