nis_local.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NIS_LOCAL_H
#define _NIS_LOCAL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
*
* Manifest constants for the NIS+ client library.
*/
#ifdef DEBUG
{ \
if (!(cond)) { \
(void) printf("ASSERT ERROR:(%s),file %s,line %d\n", \
abort(); \
} \
}
#else
#endif /* DEBUG */
#define MAX_LINKS 16
#define NIS_MAXSRCHLEN 2048
#define NIS_MAXPATHDEPTH 128
#define NIS_MAXPATHLEN 8192
#ifndef NIS_MAXREPLICAS
#define NIS_MAXREPLICAS 128
#endif
/* clock definitions */
#define MAXCLOCKS 16
#define CLOCK_SERVER 0
#define CLOCK_DB 1
#define CLOCK_CLIENT 2
#define CLOCK_CACHE 3
#define CLOCK_CACHE_SEARCH 4
#define CLOCK_CACHE_FINDDIR 5
#define CLOCK_SCRATCH 6
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
struct nis_tick_data {
};
t.dticks = 0; \
t.zticks = 0; \
t.cticks = 0; }
/*
* Either srv or name must be set. If srv is set, then we bind
* to that server, otherwise we bind to name and parent_first
* determines whether we should bind to the name itself or to
* the parent.
*/
typedef struct {
int nsrv;
char *name;
char *server_name;
int parent_first;
/* private: used internally */
int state;
int base;
int end;
int count; /* end - base + 1 */
int start; /* base <= start < end */
int cur;
int bound_to;
int refresh_count;
/*
* Manifest timeouts
*/
/*
* use for the cached client handles
*/
#define SRV_IS_FREE 0
#define SRV_TO_BE_FREED 1
#define SRV_IN_USE 2
#define SRV_INVALID 3
#define SRV_AUTH_INVALID 4
#define BAD_SERVER 1
#define GOOD_SERVER 0
#define NIS_SEND_SIZE 2048
#define NIS_RECV_SIZE 2048
#define NIS_TCP_TIMEOUT 3600
#define NIS_UDP_TIMEOUT 120
/*
* Internal functions
*/
int (*)(nis_name, nis_object *, void *));
enum clnt_stat);
extern void __nis_bad_auth_server(CLIENT *);
extern void abort(void);
void nis_sort_directory_servers(directory_obj *);
void *__inet_get_local_interfaces(void);
void __inet_free_local_interfaces(void *);
int __inet_address_is_local(void *, struct in_addr);
int __inet_address_count(void *);
int __inet_uaddr_is_local(void *, struct netconfig *, char *);
char *__inet_get_uaddr(void *, struct netconfig *, int);
char *__inet_get_networka(void *, int);
int __inet_address_is_local_af(void *, sa_family_t, void *);
int __nis_server_is_local(endpoint *, void *);
int32_t __nis_librand(void);
void __nis_print_fdreq(fd_args *);
nis_name __nis_nextsep_of(char *);
int __rpc_timeval_to_msec(struct timeval *t);
void *userdata);
/*
* Internal variables
*/
extern mutex_t __nis_callback_lock;
/*
* External functions without prototypes.
*/
extern unsigned _sleep(unsigned);
extern int _fcntl(int, int, ...);
#ifdef __cplusplus
}
#endif
#endif /* _NIS_LOCAL_H */