DNSServiceBrowse man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]


       DNSServiceBrowse - browse service instances with DNS

       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);

       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 suc‐
       ceeds sdRef is initialized. The flags argument to DNSServiceBrowse() is
       currently unused and reserved for future use. A nonzero value to inter‐
       faceIndex indicates DNSServiceBrowse() should do a browse on all inter‐
       faces.  Most applications will use an interfaceIndex value of 0 to per‐
       form a browse on all interfaces.	 See the section "Constants for speci‐
       fying 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 DNSService‐
       Browse() call returns browse results asynchronously. The service browse
       call  can  be  terminated  by  applications  with  a  call  to  DNSSer‐

       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 per‐
       form 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  kDNSService‐
       FlagsAdd. The kDNSServiceFlagsMoreComing value indicates to a  callback
       that  at	 least	one more result is immediately available. The kDNSSer‐
       viceFlagsAdd value indicates that a service instance  was  found.   The
       errorCode  argument  will be kDNSServiceErr_NoError on success.	Other‐
       wise, 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 dis‐
       covered	service	 type can be different from the requested service type
       in the browse request when the discovered service  type	has  subtypes.
       The  domain  argument to the callback holds the domain name of the dis‐
       covered 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().

       The DNSServiceBrowse function returns  kDNSServiceErr_NoError  on  suc‐
       cess.  Otherwise,  an  error  code defined in <dns_sd.h> is returned to
       indicate an error has occurred. When an error is	 returned  by  DNSSer‐
       viceBrowse,  the callback function is not invoked and the DNSServiceRef
       argument is not initialized.

       See attributes(5) for description of the following attributes:

       │Interface Stability │ Committed	      │
       │MT-Level	    │ Safe	      │

       DNSServiceRefDeallocate(3DNS_SD),	   DNSServiceResolve(3DNS_SD),

				 Aug 20, 2007	     DNSSERVICEBROWSE(3DNS_SD)

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net