/*
- * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2004-2006, 2008, 2009, 2012, 2013 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
#define __DNSINFO_PRIVATE_H__
-#include <AvailabilityMacros.h>
+#include <Availability.h>
#include <sys/cdefs.h>
#include <stdint.h>
#include <sys/types.h>
#include "dnsinfo.h"
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
-
/*
* What's all of this stuff about???
*
* +-------------------------------------------------------------------+
* | struct _dns_config_buf_t |
* +-+-------------+---------------------------------------------------+
- * | | config | struct dns_config_t |
- * | | +-+--------------+----------------------------------+
- * | | | | n_resolver | int32_t | <- # of name resolvers
- * | | | +--------------+----------------------------------+
- * | | | | resolver | dns_resolver_t ** | <- not used during creation, filled
- * | | | | | | in with pointer to a list of
- * | | | | | | resolver configurations which be
- * | | | | | | established in the "padding"
- * | | | +--------------+----------------------------------+
- * | | | | ... | ... |
- * | +-------------+-+--------------+----------------------------------+
+ * | | config | struct dns_config_t |
+ * | | +-+-------------------+-----------------------------+
+ * | | | | n_resolver | int32_t | <- # of name resolvers
+ * | | | +-------------------+-----------------------------+
+ * | | | | resolver | dns_resolver_t ** | <- not used during creation, filled
+ * | | | | | | in with pointer to a list of
+ * | | | | | | resolver configurations that will
+ * | | | | | | be established in the "padding"
+ * | | | +-------------------+-----------------------------+
+ * | | | | n_scoped_resolver | int32_t | <- # of name scoped resolvers
+ * | | | +-------------------+-----------------------------+
+ * | | | | scoped_resolver | dns_resolver_t ** | <- not used during creation, filled
+ * | | | | | | in with pointer to a list of scoped
+ * | | | | | | resolver configurations that will
+ * | | | | | | be established in the "padding"
+ * | | | +-------------------+-----------------------------+
+ * | | | | generation | uint64_t | <- generation # of configuration
+ * | | | +-------------------+---------+-------------------+
+ * | | | | n_service_specific_resolver | int32_t | <- # of name service-specific resolvers
+ * | | | +-------------------+---------+-------------------+
+ * | | | | service_specific_resolver | dns_resolver_t ** | <- not used during creation, filled
+ * | | | | | | in with pointer to a list of service-specific
+ * | | | | | | resolver configurations that will be
+ * | | | | | | established in the "padding"
+ * | | | +-------------------+---------+-------------------+
+ * | | | | ... | ... |
+ * | +-------------+-+-------------------+-----------------------------+
* | | n_attribute | uint32_t | <- how many bytes of "attribute"
- * | | | | data is associated with the
- * | | | | configuration
+ * | | | | data is associated with the
+ * | | | | configuration
* |-+-------------+---------------------------------------------------+
* | | n_padding | uint32_t | <- how many additional bytes
- * | | | | for arrays (of pointers), ...
+ * | | | | for arrays (of pointers), ...
* +-+-------------+---------------------------------------------------+
* | struct dns_attribute_t |
* |-+-------------+---------------------------------------------------+
* | | attribute | struct _dns_resolver_buf_t | <- the attribute data (resolver configuration #1)
* | | +-+-------------+-----------------------------------+
* | | | | resolver | struct dns_resolver_t |
- * | | | | +--------------+--------------------+
- * | | | | | domain | char * | <- not used during creation,
- * | | | | | | | filled in with pointer to
- * | | | | | | | domain name in the "padding"
- * | | | | +--------------+--------------------+
- * | | | | | n_nameserver | int32_t | <- # of name server addresses
- * | | | | +--------------+--------------------+
- * | | | | | nameserver | struct sockaddr ** | <- not used during creation,
- * | | | | | | | filled in with pointer to
- * | | | | | | | a list of addresses which
- * | | | | | | | will be established in the
- * | | | | | | | "padding"
- * | | | | +--------------+--------------------+
- * | | | | | ... |
+ * | | | | +--------------+--------------------+
+ * | | | | | domain | char * | <- not used during creation,
+ * | | | | | | | filled in with pointer to
+ * | | | | | | | domain name in the "padding"
+ * | | | | +--------------+--------------------+
+ * | | | | | n_nameserver | int32_t | <- # of name server addresses
+ * | | | | +--------------+--------------------+
+ * | | | | | nameserver | struct sockaddr ** | <- not used during creation,
+ * | | | | | | | filled in with pointer to
+ * | | | | | | | a list of addresses which
+ * | | | | | | | will be established in the
+ * | | | | | | | "padding"
+ * | | | | +--------------+--------------------+
+ * | | | | | ... |
* | | +-+-------------+--------------+--------------------+
* | | | | n_attribute | uint32_t |
* | | +-+-------------+-----------------------------------+
* | | | | attribute | struct dns_attribute_t |
- * | | | | +-+-----------+---------------------+
- * | | | | | | type | uint32_t | <- type of attribute (e.g. RESOLVER_ATTRIBUTE_DOMAIN)
- * | | | | | +-----------+---------------------+
+ * | | | | +-+-----------+---------------------+
+ * | | | | | | type | uint32_t | <- type of attribute (e.g. RESOLVER_ATTRIBUTE_DOMAIN)
+ * | | | | | +-----------+---------------------+
* | | | | | | length | uint32_t | <- length of the attribute
- * | | | | | +-----------+---------------------+
- * | | | | | | attribute | | <- the attribute data ("apple.com")
+ * | | | | | +-----------+---------------------+
+ * | | | | | | attribute | | <- the attribute data ("apple.com")
* | | +-+-------------+-------------+---------------------+
* | | | | attribute | struct dns_attribute_t |
- * | | | | +-+-----------+---------------------+
- * | | | | | | type | uint32_t | <- type of attribute (e.g. RESOLVER_ATTRIBUTE_ADDRESS)
- * | | | | | +-----------+---------------------+
+ * | | | | +-+-----------+---------------------+
+ * | | | | | | type | uint32_t | <- type of attribute (e.g. RESOLVER_ATTRIBUTE_ADDRESS)
+ * | | | | | +-----------+---------------------+
* | | | | | | length | uint32_t | <- length of the attribute
- * | | | | | +-----------+---------------------+
- * | | | | | | attribute | | <- the attribute data ("struct sockaddr_in" #1)
+ * | | | | | +-----------+---------------------+
+ * | | | | | | attribute | | <- the attribute data ("struct sockaddr_in" #1)
* | | +---------------+-----------------------------------+
* | | | | attribute | struct dns_attribute_t |
- * | | | | +-+-----------+---------------------+
- * | | | | | | type | uint32_t | <- type of attribute (e.g. RESOLVER_ATTRIBUTE_ADDRESS)
- * | | | | | +-----------+---------------------+
+ * | | | | +-+-----------+---------------------+
+ * | | | | | | type | uint32_t | <- type of attribute (e.g. RESOLVER_ATTRIBUTE_ADDRESS)
+ * | | | | | +-----------+---------------------+
* | | | | | | length | uint32_t | <- length of the attribute
- * | | | | | +-----------+---------------------+
- * | | | | | | attribute | | <- the attribute data ("struct sockaddr_in" #2)
+ * | | | | | +-----------+---------------------+
+ * | | | | | | attribute | | <- the attribute data ("struct sockaddr_in" #2)
* | | +---------------+-----------------------------------+
- * | | | ... |
+ * | | | ... |
* +-+-------------+---------------------------------------------------+
- * | | attribute | struct _dns_resolver_buf_t | <- the attribute data (resolver configuration #2)
+ * | | attribute | struct _dns_resolver_buf_t | <- the attribute data (resolver configuration #2)
* | | +---------------+-----------------------------------+
- * | | | ... |
+ * | | | ... |
* +---------------+---------------------------------------------------+
- * | | ... |
+ * | | ... |
* +---------------+---------------------------------------------------+
*
* When the data is unpacked the "n_padding" additional bytes
// configuration buffer attributes
enum {
- CONFIG_ATTRIBUTE_RESOLVER = 1
+ CONFIG_ATTRIBUTE_RESOLVER = 1,
+ CONFIG_ATTRIBUTE_SCOPED_RESOLVER,
+ CONFIG_ATTRIBUTE_SERVICE_SPECIFIC_RESOLVER,
};
RESOLVER_ATTRIBUTE_ADDRESS,
RESOLVER_ATTRIBUTE_SEARCH,
RESOLVER_ATTRIBUTE_SORTADDR,
- RESOLVER_ATTRIBUTE_OPTIONS
+ RESOLVER_ATTRIBUTE_OPTIONS,
};
__BEGIN_DECLS
-const char * _dns_configuration_notify_key (void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
-mach_port_t _dns_configuration_server_port (void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
-
__END_DECLS
-#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 */
-
#endif /* __DNSINFO_PRIVATE_H__ */