1DNSServiceEnumerateDoDmNaSinSse(r3vDiNcSe_SDDi)scovery LiDbNrSaSreyrvFiucnecEtniuomnesrateDomains(3DNS_SD)
2
3
4
6 DNSServiceEnumerateDomains - enumerate recommended domains
7
9 cc [ flag ... ] file ... -ldns_sd [ library ... ]
10 #include <dns_sd.h>
11
12 DNSServiceErrorType DNSServiceEnumerateDomains(DNSServiceRef *sdRef,
13 DNSServiceFlags flags, uint32_t interfaceIndex,
14 DNSServiceDomainEnumReply callBack, void *context);
15
16
17 typedef void(*DNSServiceDomainEnumReply)(DNSServiceRef sdRef,
18 DNSServiceFlags flags, uint31_t interfaceIndex,
19 DNSServiceErrorType errorCode, const char *replyDomain,
20 void *context);
21
22
24 The DNSServiceEnumerateDomains() function allows applications to deter‐
25 mine recommended browsing and registration domains for performing ser‐
26 vice discovery DNS queries. The callback argument points to a function
27 to be called to return results or if the asynchronous call to DNSSer‐
28 viceEnumerateDomains() fails. The callback function should point to a
29 function of type DNSServiceDomainEnumReply listed above.
30
31
32 A pointer to an uninitialized DNSServiceRef, sdRef must be passed to
33 DNSServiceEnumerateDomains(). If the call succeeds, sdRef is initial‐
34 ized and kDNSServiceErr_NoError is returned. The enumeration call runs
35 indefinitely until the client terminates the call. The enumeration call
36 must be terminated by passing the DNSServiceRef initialized by the enu‐
37 meration call to DNSServiceRefDeallocate() when no more domains are to
38 be found.
39
40
41 The value of flags is constructed by a bitwise-inclusive-OR of the
42 flags used in DNSService functions and defined in <dns_sd.h>. Possible
43 values for flags to the DNSServiceEnumerateDomains() call are: kDNSSer‐
44 viceFlagsBrowseDomains and kDNSServiceFlagsRegistrationDomains. The
45 kDNSServiceFlagsBrowseDomains value is passed to enumerate domains rec‐
46 ommended for browsing. The kDNSServiceFlagsRegistrationDomains value is
47 passed to enumerate domains recommended for registration. Possible val‐
48 ues of flags returned in the callback function are: kDNSService‐
49 FlagsMoreComing, kDNSServiceFlagsAdd, and kDNSServiceFlagsDefault.
50
51
52 The interfaceIndex parameter to the enumeration call specifies the
53 interface index searched for domains. Most applications pass 0 to enu‐
54 merate domains on all interfaces. See the section "Constants for speci‐
55 fying an interface index" in <dns_sd.h> for more details. The context
56 parameter can be NULL and is passed to the enumeration callback func‐
57 tion. The interfaceIndex value passed to the callback specifies the
58 interface on which the domain exists.
59
61 The DNSServiceEnumerateDomains() function returns kDNSServiceErr_NoEr‐
62 ror on success. Otherwise, the function returns an error code defined
63 in <dns_sd.h>. The callback is not invoked on error and the DNSSer‐
64 viceRef that is passed is not initialized. Upon a successful call to
65 DNSServiceEnumerateDomains(), subsequent asynchronous errors are deliv‐
66 ered to the callback.
67
69 See attributes(5) for description of the following attributes:
70
71
72
73
74 ┌─────────────────────────────┬─────────────────────────────┐
75 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
76 ├─────────────────────────────┼─────────────────────────────┤
77 │Interface Stability │Committed │
78 ├─────────────────────────────┼─────────────────────────────┤
79 │MT-Level │Safe │
80 └─────────────────────────────┴─────────────────────────────┘
81
83 DNSServiceRefDeallocate(3DNS_SD), attributes(5)
84
85
86
87SunOS 5.11 20 Aug 200D7NSServiceEnumerateDomains(3DNS_SD)