* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * Bonjour allows you to register a network service, such as a
- * printer or file server, so that it can be found by name or browsed
- * for by service type and domain. Using Bonjour, applications can
- * discover what services are available on the network, along with
- * all necessary access information-such as name, IP address, and port
+ * Bonjour allows you to register a network service, such as a
+ * printer or file server, so that it can be found by name or browsed
+ * for by service type and domain. Using Bonjour, applications can
+ * discover what services are available on the network, along with
+ * all necessary access information-such as name, IP address, and port
- * In effect, Bonjour combines the functions of a local DNS server
- * and AppleTalk. Bonjour allows applications to provide user-friendly printer
- * and server browsing, among other things, over standard IP networks.
- * This behavior is a result of combining protocols such as multicast and DNS
+ * In effect, Bonjour combines the functions of a local DNS server
+ * and AppleTalk. Bonjour allows applications to provide user-friendly printer
+ * and server browsing, among other things, over standard IP networks.
+ * This behavior is a result of combining protocols such as multicast and DNS
- * Bonjour gives applications easy access to services over local IP
- * networks without requiring the service or the application to support
- * an AppleTalk or a Netbeui stack, and without requiring a DNS server
+ * Bonjour gives applications easy access to services over local IP
+ * networks without requiring the service or the application to support
+ * an AppleTalk or a Netbeui stack, and without requiring a DNS server
- kDNSServiceDiscoveryNoFlags = 0,
- kDNSServiceDiscoveryMoreRepliesImmediately = 1 << 0,
+ kDNSServiceDiscoveryNoFlags = 0,
+ kDNSServiceDiscoveryMoreRepliesImmediately = 1 << 0,
{
kDNSServiceDiscoveryWaiting = 1,
kDNSServiceDiscoveryNoError = 0,
{
kDNSServiceDiscoveryWaiting = 1,
kDNSServiceDiscoveryNoError = 0,
kDNSServiceDiscoveryUnknownErr = -65537, // 0xFFFE FFFF
kDNSServiceDiscoveryNoSuchNameErr = -65538,
kDNSServiceDiscoveryNoMemoryErr = -65539,
kDNSServiceDiscoveryUnknownErr = -65537, // 0xFFFE FFFF
kDNSServiceDiscoveryNoSuchNameErr = -65538,
kDNSServiceDiscoveryNoMemoryErr = -65539,
-@function DNSServiceResolver_handleReply
- @discussion This function should be called with the Mach message sent
- to the port returned by the call to DNSServiceResolverResolve.
- The reply message will be interpreted and will result in a
- call to the specified callout function.
- @param replyMsg The Mach message.
+ @function DNSServiceResolver_handleReply
+ @discussion This function should be called with the Mach message sent
+ to the port returned by the call to DNSServiceResolverResolve.
+ The reply message will be interpreted and will result in a
+ call to the specified callout function.
+ @param replyMsg The Mach message.
-typedef void (*DNSServiceRegistrationReply) (
- DNSServiceRegistrationReplyErrorType errorCode,
- void *context
-);
+typedef void (*DNSServiceRegistrationReply)(
+ DNSServiceRegistrationReplyErrorType errorCode,
+ void *context
+ );
@discussion Register a named service with DNS Service Discovery
@param name The name of this service instance (e.g. "Steve's Printer")
@param regtype The service type (e.g. "_printer._tcp." -- see
@discussion Register a named service with DNS Service Discovery
@param name The name of this service instance (e.g. "Steve's Printer")
@param regtype The service type (e.g. "_printer._tcp." -- see
@param callBack The DNSServiceRegistrationReply function to be called
@param context A user specified context which will be passed to the callout function.
@result A dns_registration_t
@param callBack The DNSServiceRegistrationReply function to be called
@param context A user specified context which will be passed to the callout function.
@result A dns_registration_t
) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
- DNSServiceDomainEnumerationReplyAddDomain, // Domain found
- DNSServiceDomainEnumerationReplyAddDomainDefault, // Domain found (and should be selected by default)
- DNSServiceDomainEnumerationReplyRemoveDomain, // Domain has been removed from network
+ DNSServiceDomainEnumerationReplyAddDomain, // Domain found
+ DNSServiceDomainEnumerationReplyAddDomainDefault, // Domain found (and should be selected by default)
+ DNSServiceDomainEnumerationReplyRemoveDomain, // Domain has been removed from network
DNSServiceDiscoverReplyFlagsMoreComing,
} DNSServiceDiscoveryReplyFlags;
DNSServiceDiscoverReplyFlagsMoreComing,
} DNSServiceDiscoveryReplyFlags;
-typedef void (*DNSServiceDomainEnumerationReply) (
- DNSServiceDomainEnumerationReplyResultType resultType, // One of DNSServiceDomainEnumerationReplyResultType
- const char *replyDomain,
- DNSServiceDiscoveryReplyFlags flags, // DNS Service Discovery reply flags information
- void *context
-);
+typedef void (*DNSServiceDomainEnumerationReply)(
+ DNSServiceDomainEnumerationReplyResultType resultType, // One of DNSServiceDomainEnumerationReplyResultType
+ const char *replyDomain,
+ DNSServiceDiscoveryReplyFlags flags, // DNS Service Discovery reply flags information
+ void *context
+ );
@param callBack The function to be called when domains are found or removed
@param context A user specified context which will be passed to the callout function.
@result A dns_registration_t
@param callBack The function to be called when domains are found or removed
@param context A user specified context which will be passed to the callout function.
@result A dns_registration_t
- int registrationDomains,
- DNSServiceDomainEnumerationReply callBack,
- void *context
+ int registrationDomains,
+ DNSServiceDomainEnumerationReply callBack,
+ void *context
) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
- DNSServiceBrowserReplyAddInstance, // Instance of service found
- DNSServiceBrowserReplyRemoveInstance // Instance has been removed from network
+ DNSServiceBrowserReplyAddInstance, // Instance of service found
+ DNSServiceBrowserReplyRemoveInstance // Instance has been removed from network
-typedef void (*DNSServiceBrowserReply) (
- DNSServiceBrowserReplyResultType resultType, // One of DNSServiceBrowserReplyResultType
- const char *replyName,
- const char *replyType,
- const char *replyDomain,
- DNSServiceDiscoveryReplyFlags flags, // DNS Service Discovery reply flags information
- void *context
-);
+typedef void (*DNSServiceBrowserReply)(
+ DNSServiceBrowserReplyResultType resultType, // One of DNSServiceBrowserReplyResultType
+ const char *replyName,
+ const char *replyType,
+ const char *replyDomain,
+ DNSServiceDiscoveryReplyFlags flags, // DNS Service Discovery reply flags information
+ void *context
+ );
@param callBack The function to be called when service instances are found or removed
@param context A user specified context which will be passed to the callout function.
@result A dns_registration_t
@param callBack The function to be called when service instances are found or removed
@param context A user specified context which will be passed to the callout function.
@result A dns_registration_t
) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
/* Resolver requests */
) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
/* Resolver requests */
-typedef void (*DNSServiceResolverReply) (
- struct sockaddr *interface, // Needed for scoped addresses like link-local
- struct sockaddr *address,
- const char *txtRecord,
- DNSServiceDiscoveryReplyFlags flags, // DNS Service Discovery reply flags information
- void *context
-);
+typedef void (*DNSServiceResolverReply)(
+ struct sockaddr *interface, // Needed for scoped addresses like link-local
+ struct sockaddr *address,
+ const char *txtRecord,
+ DNSServiceDiscoveryReplyFlags flags, // DNS Service Discovery reply flags information
+ void *context
+ );
@discussion Resolved a named instance of a service to its address, port, and
(optionally) other demultiplexing information contained in the TXT record.
@param name The name of the service instance
@discussion Resolved a named instance of a service to its address, port, and
(optionally) other demultiplexing information contained in the TXT record.
@param name The name of the service instance
address has been resolved.
@param context A user specified context which will be passed to the callout function.
@result A dns_registration_t
address has been resolved.
@param context A user specified context which will be passed to the callout function.
@result A dns_registration_t
) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
function. A NULL value indicates that no address was
specified or some other error occurred which prevented the
resolution from being started.
function. A NULL value indicates that no address was
specified or some other error occurred which prevented the
resolution from being started.
@discussion Deallocates the DNS Service Discovery type / closes the connection to the server
@param dnsServiceDiscovery A dns_service_discovery_ref as returned from a creation or enumeration call
@result void
@discussion Deallocates the DNS Service Discovery type / closes the connection to the server
@param dnsServiceDiscovery A dns_service_discovery_ref as returned from a creation or enumeration call
@result void
void DNSServiceDiscoveryDeallocate(dns_service_discovery_ref dnsServiceDiscovery) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
void DNSServiceDiscoveryDeallocate(dns_service_discovery_ref dnsServiceDiscovery) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/***************************************************************************/
@param rdata Opaque binary Resource Record data, up to 64 kB.
@param ttl time to live for the added record.
@result DNSRecordReference An opaque reference that can be passed to the update and remove record calls. If an error occurs, this value will be zero or negative
@param rdata Opaque binary Resource Record data, up to 64 kB.
@param ttl time to live for the added record.
@result DNSRecordReference An opaque reference that can be passed to the update and remove record calls. If an error occurs, this value will be zero or negative
DNSRecordReference DNSServiceRegistrationAddRecord(dns_service_discovery_ref dnsServiceDiscovery, uint16_t rrtype, uint16_t rdlen, const char *rdata, uint32_t ttl) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/*!
DNSRecordReference DNSServiceRegistrationAddRecord(dns_service_discovery_ref dnsServiceDiscovery, uint16_t rrtype, uint16_t rdlen, const char *rdata, uint32_t ttl) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/*!
@param rdata Opaque binary Resource Record data, up to 64 kB.
@param ttl time to live for the updated record.
@result DNSServiceRegistrationReplyErrorType If an error occurs, this value will be non zero
@param rdata Opaque binary Resource Record data, up to 64 kB.
@param ttl time to live for the updated record.
@result DNSServiceRegistrationReplyErrorType If an error occurs, this value will be non zero
DNSServiceRegistrationReplyErrorType DNSServiceRegistrationUpdateRecord(dns_service_discovery_ref ref, DNSRecordReference reference, uint16_t rdlen, const char *rdata, uint32_t ttl) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/*!
DNSServiceRegistrationReplyErrorType DNSServiceRegistrationUpdateRecord(dns_service_discovery_ref ref, DNSRecordReference reference, uint16_t rdlen, const char *rdata, uint32_t ttl) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
/*!
@param dnsServiceDiscovery A dns_service_discovery_ref as returned from a DNSServiceRegistrationCreate call
@param dnsRecordReference A dnsRecordReference as returned from a DNSServiceRegistrationAddRecord call
@result DNSServiceRegistrationReplyErrorType If an error occurs, this value will be non zero
@param dnsServiceDiscovery A dns_service_discovery_ref as returned from a DNSServiceRegistrationCreate call
@param dnsRecordReference A dnsRecordReference as returned from a DNSServiceRegistrationAddRecord call
@result DNSServiceRegistrationReplyErrorType If an error occurs, this value will be non zero
DNSServiceRegistrationReplyErrorType DNSServiceRegistrationRemoveRecord(dns_service_discovery_ref ref, DNSRecordReference reference) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
__END_DECLS
DNSServiceRegistrationReplyErrorType DNSServiceRegistrationRemoveRecord(dns_service_discovery_ref ref, DNSRecordReference reference) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3;
__END_DECLS