Registers an individual resource record on a connected DNSServiceRef.
- iOS 9.3+
- macOS 10.11.4+
- Mac Catalyst 13.0+Beta
- tvOS 9.2+
- watchOS 2.2+
A DNSServiceRef initialized by
A pointer to an uninitialized DNSRecordRef. Upon succesfull completion of this call, this ref may be passed to
Update Record(_: _: _: _: _: _:)
DNSService. (To deregister ALL records registered on a single connected DNSServiceRef and deallocate each of their corresponding DNSServiceRecordRefs, call
Remove Record(_: _: _:)
Possible values are kDNSServiceFlagsShared or kDNSServiceFlagsUnique (see flag type definitions for details).
If non-zero, specifies the interface on which to register the record (the index for a given interface is determined via the if_nametoindex() family of calls.) Passing 0 causes the record to be registered on all interfaces. See "Constants for specifying an interface index" for more details.
The full domain name of the resource record.
The numerical type of the resource record (e.g. kDNSServiceType_PTR, kDNSServiceType_SRV, and so on).
The class of the resource record (usually
DNSService Class _IN
Length, in bytes, of the rdata.
A pointer to the raw rdata, as it is to appear in the DNS record.
The time to live of the resource record, in seconds. Most clients should pass 0 to indicate that the system should select a sensible default value.
The function to be called when a result is found, or if the call asynchronously fails (e.g. because of a name conflict.)
An application context pointer which is passed to the callback function (may be NULL).
k on success (any subsequent, asynchronous errors are delivered to the callback), otherwise returns an error code indicating the error that occurred (the callback is never invoked and the DNSRecordRef is not initialized).
Note that name conflicts occurring for records registered via this call must be handled by the client in the callback.