X-Git-Url: https://git.saurik.com/apple/configd.git/blobdiff_plain/edebe297f772e4cdd76278ebb777820466d2917b..6f870c060efc60e067aebc5814c89f110eec9777:/dnsinfo/dnsinfo_private.h diff --git a/dnsinfo/dnsinfo_private.h b/dnsinfo/dnsinfo_private.h index 03d50f3..d6e65b5 100644 --- a/dnsinfo/dnsinfo_private.h +++ b/dnsinfo/dnsinfo_private.h @@ -1,5 +1,5 @@ /* - * 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@ * @@ -25,7 +25,7 @@ #define __DNSINFO_PRIVATE_H__ -#include +#include #include #include #include @@ -35,8 +35,6 @@ #include "dnsinfo.h" -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 - /* * What's all of this stuff about??? * @@ -58,23 +56,39 @@ * +-------------------------------------------------------------------+ * | 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 | * |-+-------------+---------------------------------------------------+ @@ -85,54 +99,54 @@ * | | 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 @@ -145,7 +159,9 @@ // configuration buffer attributes enum { - CONFIG_ATTRIBUTE_RESOLVER = 1 + CONFIG_ATTRIBUTE_RESOLVER = 1, + CONFIG_ATTRIBUTE_SCOPED_RESOLVER, + CONFIG_ATTRIBUTE_SERVICE_SPECIFIC_RESOLVER, }; @@ -155,7 +171,7 @@ enum { RESOLVER_ATTRIBUTE_ADDRESS, RESOLVER_ATTRIBUTE_SEARCH, RESOLVER_ATTRIBUTE_SORTADDR, - RESOLVER_ATTRIBUTE_OPTIONS + RESOLVER_ATTRIBUTE_OPTIONS, }; @@ -189,11 +205,6 @@ typedef struct { __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__ */