1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2015 Apple Inc. All rights reserved.
6 #ifndef _DNS_SD_PRIVATE_H
7 #define _DNS_SD_PRIVATE_H
9 /* DNSServiceCreateDelegateConnection()
13 * sdRef: A pointer to an uninitialized DNSServiceRef. Deallocating
14 * the reference (via DNSServiceRefDeallocate()) severs the
15 * connection and deregisters all records registered on this connection.
17 * pid : Process ID of the delegate
19 * uuid: UUID of the delegate
21 * Note that only one of the two arguments (pid or uuid) can be specified. If pid
22 * is zero, uuid will be assumed to be a valid value; otherwise pid will be used.
24 * return value: Returns kDNSServiceErr_NoError on success, otherwise returns
25 * an error code indicating the specific failure that occurred (in which
26 * case the DNSServiceRef is not initialized). kDNSServiceErr_NotAuth is
27 * returned to indicate that the calling process does not have entitlements
30 DNSServiceErrorType DNSSD_API DNSServiceCreateDelegateConnection(DNSServiceRef *sdRef, int32_t pid, uuid_t uuid);
32 // Map the source port of the local UDP socket that was opened for sending the DNS query
33 // to the process ID of the application that triggered the DNS resolution.
35 /* DNSServiceGetPID() Parameters:
37 * srcport: Source port (in network byte order) of the UDP socket that was created by
38 * the daemon to send the DNS query on the wire.
40 * pid: Process ID of the application that started the name resolution which triggered
41 * the daemon to send the query on the wire. The value can be -1 if the srcport
44 * return value: Returns kDNSServiceErr_NoError on success, or kDNSServiceErr_ServiceNotRunning
45 * if the daemon is not running. The value of the pid is undefined if the return
48 DNSServiceErrorType DNSSD_API DNSServiceGetPID
54 #define kDNSServiceCompPrivateDNS "PrivateDNS"
55 #define kDNSServiceCompMulticastDNS "MulticastDNS"