nis_cache.x revision 26206
126206Swpaul%/*
226206Swpaul% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
326206Swpaul% * unrestricted use provided that this legend is included on all tape
426206Swpaul% * media and as a part of the software program in whole or part.  Users
526206Swpaul% * may copy or modify Sun RPC without charge, but are not authorized
626206Swpaul% * to license or distribute it to anyone else except as part of a product or
726206Swpaul% * program developed by the user or with the express written consent of
826206Swpaul% * Sun Microsystems, Inc.
926206Swpaul% *
1026206Swpaul% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
1126206Swpaul% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
1226206Swpaul% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
1326206Swpaul% *
1426206Swpaul% * Sun RPC is provided with no support and without any obligation on the
1526206Swpaul% * part of Sun Microsystems, Inc. to assist in its use, correction,
1626206Swpaul% * modification or enhancement.
1726206Swpaul% *
1826206Swpaul% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
1926206Swpaul% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
2026206Swpaul% * OR ANY PART THEREOF.
2126206Swpaul% *
2226206Swpaul% * In no event will Sun Microsystems, Inc. be liable for any lost revenue
2326206Swpaul% * or profits or other special, indirect and consequential damages, even if
2426206Swpaul% * Sun has been advised of the possibility of such damages.
2526206Swpaul% *
2626206Swpaul% * Sun Microsystems, Inc.
2726206Swpaul% * 2550 Garcia Avenue
2826206Swpaul% * Mountain View, California  94043
2926206Swpaul% */
3026206Swpaul
3126206Swpaul/*
3226206Swpaul *	nis_cache.x
3326206Swpaul *
3426206Swpaul *	Copyright (c) 1988-1992 Sun Microsystems Inc
3526206Swpaul *	All Rights Reserved.
3626206Swpaul */
3726206Swpaul
3826206Swpaul/* From: %#pragma ident	"@(#)nis_cache.x	1.11	94/05/03 SMI" */
3926206Swpaul
4026206Swpaul#ifndef RPC_HDR
4126206Swpaul%#ifndef lint
4226206Swpaul%static const char rcsid[] = "$Id: nis_cache.x,v 1.4 1996/07/29 14:32:44 wpaul Exp $";
4326206Swpaul%#endif /* not lint */
4426206Swpaul#endif
4526206Swpaul
4626206Swpaul#ifdef RPC_HDR
4726206Swpaul%#include <rpc/types.h>
4826206Swpaul%#include <rpcsvc/nis.h>
4926206Swpaul%
5026206Swpaul%/* default cache file */
5126206Swpaul%#define CACHEFILE "/var/nis/NIS_SHARED_DIRCACHE"
5226206Swpaul%
5326206Swpaul%/* clients have to read-lock the cache file, and SVR4 locking requires that */
5426206Swpaul%/*   the file be writable, but we don't want a world-writable cache file.   */
5526206Swpaul%/*   So... everyone agrees to use a different, world-writable file for the  */
5626206Swpaul%/*   locking operations, but the data is in CACHEFILE.                      */
5726206Swpaul%#define CACHELOCK "/usr/tmp/.NIS_DIR_CACHELOCK"
5826206Swpaul%
5926206Swpaul%/* the file containing one trusted XDR'ed directory object.
6026206Swpaul% * This has to be present for the system to work.
6126206Swpaul% */
6226206Swpaul%#define COLD_START_FILE "/var/nis/NIS_COLD_START"
6326206Swpaul%
6426206Swpaul%enum pc_status {HIT, MISS, NEAR_MISS};
6526206Swpaul%
6626206Swpaul%extern int __nis_debuglevel;
6726206Swpaul%
6826206Swpaul%
6926206Swpaul#endif
7026206Swpaul
7126206Swpaul#ifdef RPC_CLNT
7226206Swpaul#ifdef SOLARIS
7326206Swpaul%#include "../gen/nis_clnt.h"
7426206Swpaul#else
7526206Swpaul%#include "nis.h"
7626206Swpaul#endif
7726206Swpaul#endif
7826206Swpaul
7926206Swpaulprogram CACHEPROG {
8026206Swpaul	version CACHE_VER_1 {
8126206Swpaul		void NIS_CACHE_ADD_ENTRY(fd_result) = 1;
8226206Swpaul		void NIS_CACHE_REMOVE_ENTRY(directory_obj) = 2;
8326206Swpaul		void NIS_CACHE_READ_COLDSTART(void) = 3;
8426206Swpaul		void NIS_CACHE_REFRESH_ENTRY(string<>) = 4;
8526206Swpaul	} = 1;
8626206Swpaul} = 100301;
87