/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*
* The original switch low level interface to switch was defined in
* /usr/include/nsswitch.h. Although it was marked "Project Private",
* it was none-the-less "exposed" and used by several apps. This
* file, nsswitch_priv.h will *not* go in /usr/include to limit "exposure"
* and contains new versions of the switch low level interface.
*
* This is a Project Private interface. It may change in future releases.
*/
#ifndef _NSSWITCH_PRIV_H
#define _NSSWITCH_PRIV_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <nsswitch.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Results: the first of which are from /usr/include/nsswitch.h
*
* #define __NSW_SUCCESS 0 found the required data
* #define __NSW_NOTFOUND 1 the naming service returned lookup failure
* #define __NSW_UNAVAIL 2 could not call the naming service
* #define __NSW_TRYAGAIN 3 bind error to suggest a retry
*/
/* nis server in dns forwarding mode and dns server non-response */
/*
* Actions: the first of which are from /usr/include/nsswitch.h
*
* #define __NSW_CONTINUE 0 the action is to continue to next service
* #define __NSW_RETURN 1 the action is to return to the user
*/
/* the action is to retry the request until we get an answer */
/* the action is to retry the request N times maximum */
/* retried N times so disable try-again until service is restored */
/* is this action available to all switch errs? */
(__NSW_COMMON_ACTION(act) || \
((act) == __NSW_TRYAGAIN_FOREVER) || \
((act) == __NSW_TRYAGAIN_NTIMES))
#ifdef __NSS_PRIVATE_INTERFACE
struct __nsw_lookup_v1 {
char *service_name;
};
struct __nsw_switchconfig_v1 {
int vers;
char *dbase;
int num_lookups;
};
: \
: \
(const char *, enum __nsw_parse_err *);
int __nsw_freeconfig_v1(struct __nsw_switchconfig_v1 *);
#endif /* __NSS_PRIVATE_INTERFACE */
#ifdef __cplusplus
}
#endif
#endif /* _NSSWITCH_PRIV_H */