8200fe25ffab8b2032d046c88710a949f361b700rmesta * CDDL HEADER START
8200fe25ffab8b2032d046c88710a949f361b700rmesta * The contents of this file are subject to the terms of the
8200fe25ffab8b2032d046c88710a949f361b700rmesta * Common Development and Distribution License (the "License").
8200fe25ffab8b2032d046c88710a949f361b700rmesta * You may not use this file except in compliance with the License.
8200fe25ffab8b2032d046c88710a949f361b700rmesta * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8200fe25ffab8b2032d046c88710a949f361b700rmesta * See the License for the specific language governing permissions
8200fe25ffab8b2032d046c88710a949f361b700rmesta * and limitations under the License.
8200fe25ffab8b2032d046c88710a949f361b700rmesta * When distributing Covered Code, include this CDDL HEADER in each
8200fe25ffab8b2032d046c88710a949f361b700rmesta * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8200fe25ffab8b2032d046c88710a949f361b700rmesta * If applicable, add the following below this CDDL HEADER, with the
8200fe25ffab8b2032d046c88710a949f361b700rmesta * fields enclosed by brackets "[]" replaced with your own identifying
8200fe25ffab8b2032d046c88710a949f361b700rmesta * information: Portions Copyright [yyyy] [name of copyright owner]
8200fe25ffab8b2032d046c88710a949f361b700rmesta * CDDL HEADER END
dd51520e127b452179a2ce4ea3bd8dee949f9afePavan Mettu - Oracle Corporation - Menlo Park United States * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
8200fe25ffab8b2032d046c88710a949f361b700rmestaextern "C" {
8200fe25ffab8b2032d046c88710a949f361b700rmestatypedef struct {
8200fe25ffab8b2032d046c88710a949f361b700rmesta * Error Messages
8200fe25ffab8b2032d046c88710a949f361b700rmesta#define EMSG_NETDB_INTERNAL "Internal Resolver Error: %s"
8200fe25ffab8b2032d046c88710a949f361b700rmesta#define EMSG_TRY_AGAIN "\"%s\" DNS nameserver(s) not responding" \
8200fe25ffab8b2032d046c88710a949f361b700rmesta "...\tRetrying"
8200fe25ffab8b2032d046c88710a949f361b700rmesta#define EMSG_NO_RECOVERY "Unrecoverable Resolver Error: %s"
8200fe25ffab8b2032d046c88710a949f361b700rmesta#define EMSG_HOST_NOT_FOUND "Authoritative nameserver unresponsive " \
8200fe25ffab8b2032d046c88710a949f361b700rmesta "to queries for domain \"%s\""
8200fe25ffab8b2032d046c88710a949f361b700rmesta#define EMSG_NO_DATA "\"%s\" DNS TXT record not found: "\
8200fe25ffab8b2032d046c88710a949f361b700rmesta "Defaulting to \"%s\""
8200fe25ffab8b2032d046c88710a949f361b700rmesta#define EMSG_DNS_THREAD_ERROR "Unable to create DNS query thread"
8200fe25ffab8b2032d046c88710a949f361b700rmesta#define EMSG_DNS_DISABLE "%s: Further DNS queries disabled !"
8200fe25ffab8b2032d046c88710a949f361b700rmesta#define EMSG_DNS_RR_INVAL "\"%s\" Invalid DNS TXT record: "\
8200fe25ffab8b2032d046c88710a949f361b700rmesta "Defaulting to \"%s\""
8200fe25ffab8b2032d046c88710a949f361b700rmesta * DNS related info
8200fe25ffab8b2032d046c88710a949f361b700rmestatypedef union {
8200fe25ffab8b2032d046c88710a949f361b700rmesta * NOTE: All s_ prefixed variables are only to be used by the DNS
8200fe25ffab8b2032d046c88710a949f361b700rmesta * feature implementation (mapid.c). The exported globals
8200fe25ffab8b2032d046c88710a949f361b700rmesta * (ie. seen by nfsmapid.c/nfsmapid_server.c) are the
8200fe25ffab8b2032d046c88710a949f361b700rmesta * dns_ prefixed variables along with sysdns_domain.
8200fe25ffab8b2032d046c88710a949f361b700rmestastatic int resolv_init(void);
8200fe25ffab8b2032d046c88710a949f361b700rmestastatic void resolv_decode(void);
8200fe25ffab8b2032d046c88710a949f361b700rmestastatic int resolv_error(void);
8200fe25ffab8b2032d046c88710a949f361b700rmestastatic void resolv_get_txt_data(void);
8200fe25ffab8b2032d046c88710a949f361b700rmestastatic void resolv_txt_reset(void);
8200fe25ffab8b2032d046c88710a949f361b700rmestastatic int resolv_search(void);
bfa62c284402a2e7ee6a349df0ef8d1aa2e908e8Vallish Vaidyeshwarastatic void resolv_destroy(void);
8200fe25ffab8b2032d046c88710a949f361b700rmestastatic void get_nfs_domain(void);
8200fe25ffab8b2032d046c88710a949f361b700rmestastatic void get_dns_domain(void);
8200fe25ffab8b2032d046c88710a949f361b700rmesta#endif /* DEBUG */
8200fe25ffab8b2032d046c88710a949f361b700rmesta * mapid_domain_lock: rwlock used to serialize access/changes
8200fe25ffab8b2032d046c88710a949f361b700rmesta * to the library's mapid_domain global var.
8200fe25ffab8b2032d046c88710a949f361b700rmesta * mapid_domain: Library variable used to store the current
8200fe25ffab8b2032d046c88710a949f361b700rmesta * domain configured for use in decoding/encoding
8200fe25ffab8b2032d046c88710a949f361b700rmesta * outbound and inbound attr strings, accordingly.
dd51520e127b452179a2ce4ea3bd8dee949f9afePavan Mettu - Oracle Corporation - Menlo Park United States * nfs_domain: If nfsmapid_domain var in SMF
8200fe25ffab8b2032d046c88710a949f361b700rmesta * has been set, nfs_domain will hold this
8200fe25ffab8b2032d046c88710a949f361b700rmesta * value for the duration of the instance;
8200fe25ffab8b2032d046c88710a949f361b700rmesta * If the value ever changes, the change is
8200fe25ffab8b2032d046c88710a949f361b700rmesta * detected via the use of nfs_mtime and
8200fe25ffab8b2032d046c88710a949f361b700rmesta * nfs_domain is updated accordingly.
8200fe25ffab8b2032d046c88710a949f361b700rmesta * dns_domain: If the system's resolver (/etc/resolv.conf)
8200fe25ffab8b2032d046c88710a949f361b700rmesta * has been configured, dns_domain will hold
8200fe25ffab8b2032d046c88710a949f361b700rmesta * the configured DNS domain as reported by the
8200fe25ffab8b2032d046c88710a949f361b700rmesta * res_ninit() resolver interface. If the system's
8200fe25ffab8b2032d046c88710a949f361b700rmesta * /etc/resolv.conf file is updated, the change
8200fe25ffab8b2032d046c88710a949f361b700rmesta * is detected via the use of dns_mtime and
8200fe25ffab8b2032d046c88710a949f361b700rmesta * dns_domain is updated accordingly.
8200fe25ffab8b2032d046c88710a949f361b700rmesta#endif /* __LIBMAPID_IMPL */
8200fe25ffab8b2032d046c88710a949f361b700rmesta * PSARC 2005/487 Consolidation Private Interfaces
8200fe25ffab8b2032d046c88710a949f361b700rmesta * mapid_reeval_domain(), mapid_get_domain()
8200fe25ffab8b2032d046c88710a949f361b700rmesta * Changes must be reviewed by Solaris File Sharing
8200fe25ffab8b2032d046c88710a949f361b700rmestaextern char *mapid_get_domain(void);
8200fe25ffab8b2032d046c88710a949f361b700rmesta * PSARC 2005/487 Contracted Sun Private Interface
8200fe25ffab8b2032d046c88710a949f361b700rmesta * mapid_derive_domain(), mapid_stdchk_domain()
8200fe25ffab8b2032d046c88710a949f361b700rmesta * Changes must be reviewed by Solaris File Sharing
8200fe25ffab8b2032d046c88710a949f361b700rmesta * Changes must be communicated to contract-2005-487-01@sun.com
8200fe25ffab8b2032d046c88710a949f361b700rmestaextern int mapid_stdchk_domain(const char *);
8200fe25ffab8b2032d046c88710a949f361b700rmestaextern char *mapid_derive_domain(void);
8200fe25ffab8b2032d046c88710a949f361b700rmesta#endif /* _MAPID_H */