Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dnsservicerefsockfd(3dnssd) [opensolaris man page]

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

NAME
DNSServiceRefSockFD - access underlying UNIX domain socket descriptor SYNOPSIS
cc [ flag ... ] file ... -ldns_sd [ library ... ] #include <dns_sd.h> DNSServiceRefSockFD(DNSServiceRef *sdRef); DESCRIPTION
Access the underlying UNIXTM domain socket from the initialized DNSServiceRef returned from DNS Service calls. Applications should only access the underlying UNIX domain socket to poll for results from the mDNS daemon. Applications should not directly read or write to the socket. When results are available, applications should call DNSServiceProcessResult(). The application is responsible for processing the data on the socket in a timely fashion. The daemon can terminate its connection with a client that does not clear its socket buffer. RETURN VALUES
The underlying UNIX domain socket descriptor of the DNSServiceRef or -1 is returned in case of error. 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), DNSServiceRegister(3DNS_SD), attributes(5) SunOS 5.11 20 Aug 2007 DNSServiceRefSockFD(3DNS_SD)

Check Out this Related Man Page

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

NAME
DNSServiceBrowse - browse service instances with DNS SYNOPSIS
cc [ flag ... ] file ... -ldns_sd [ library ... ] #include <dns_sd.h> DNSServiceErrorType DNSServiceBrowse(DNSServiceRef *sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, const char *regtype, const char *domain, DNSServiceServiceBrowseReply callBack, void *context); typedef void(*DNSServiceBrowseReply)(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char *serviceName, const char *regtype, const char *replyDomain, void *context); DESCRIPTION
The DNSServiceBrowse() function is used to browse for service instances of a particular service and protocol type. The sdRef argument points to an uninitialized DNSServiceRef. If the call to DNSServiceBrowse succeeds sdRef is initialized. The flags argument to DNSService- Browse() is currently unused and reserved for future use. A nonzero value to interfaceIndex indicates DNSServiceBrowse() should do a browse on all interfaces. Most applications will use an interfaceIndex value of 0 to perform a browse on all interfaces. See the section "Con- stants for specifying an interface index" in <dns_sd.h> for more details. The callback function is invoked for every service instance found matching the service type and protocol. The callback argument points to a function of type DNSServiceBrowseReply listed above. The DNSServiceBrowse() call returns browse results asynchronously. The service browse call can be terminated by applications with a call to DNSServiceRefDeallocate(). The regtype parameter is used to specify the service type and protocol (e.g. _ftp._tcp). The protocol type must be TCP or UDP. The domain argument to DNSServiceBrowse() specifies the domain on which to browse for services. Most applications will not specify a domain and will perform a browse on the default domain(s). The context argument can be NULL and points to a value passed to the callback function. The sdRef argument passed to the callback function is initialized by DNSServiceBrowse() call. The possible values passed to flags in the callback function are: kDNSServiceFlagsMoreComing and kDNSServiceFlagsAdd. The kDNSServiceFlagsMoreComing value indicates to a callback that at least one more result is immediately available. The kDNSServiceFlagsAdd value indicates that a service instance was found. The errorCode argument will be kDNSServiceErr_NoError on success. Otherwise, failure is indicated. The discovered service name is returned to the callback via the serviceName argument. The regtype argument in the callback holds the service type of the found service instance. The discovered service type can be different from the requested service type in the browse request when the discovered service type has sub- types. The domain argument to the callback holds the domain name of the discovered service instance. The service type and the domain name must be stored and passed along with the service name to resolve a service instance using DNSServiceResolve(). RETURN VALUES
The DNSServiceBrowse 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 DNSServiceBrowse, 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
DNSServiceRefDeallocate(3DNS_SD), DNSServiceResolve(3DNS_SD), attributes(5) SunOS 5.11 20 Aug 2007 DNSServiceBrowse(3DNS_SD)
Man Page