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
41114629Sobrien%#include <sys/cdefs.h>
42114629Sobrien%__FBSDID("$FreeBSD$");
4326206Swpaul#endif
4426206Swpaul
4526206Swpaul#ifdef RPC_HDR
4626206Swpaul%#include <rpc/types.h>
4726206Swpaul%#include <rpcsvc/nis.h>
4826206Swpaul%
4926206Swpaul%/* default cache file */
5026206Swpaul%#define CACHEFILE "/var/nis/NIS_SHARED_DIRCACHE"
5126206Swpaul%
5226206Swpaul%/* clients have to read-lock the cache file, and SVR4 locking requires that */
5326206Swpaul%/*   the file be writable, but we don't want a world-writable cache file.   */
5426206Swpaul%/*   So... everyone agrees to use a different, world-writable file for the  */
5526206Swpaul%/*   locking operations, but the data is in CACHEFILE.                      */
5626206Swpaul%#define CACHELOCK "/usr/tmp/.NIS_DIR_CACHELOCK"
5726206Swpaul%
5826206Swpaul%/* the file containing one trusted XDR'ed directory object.
5926206Swpaul% * This has to be present for the system to work.
6026206Swpaul% */
6126206Swpaul%#define COLD_START_FILE "/var/nis/NIS_COLD_START"
6226206Swpaul%
6326206Swpaul%enum pc_status {HIT, MISS, NEAR_MISS};
6426206Swpaul%
6526206Swpaul%extern int __nis_debuglevel;
6626206Swpaul%
6726206Swpaul%
6826206Swpaul#endif
6926206Swpaul
7026206Swpaul#ifdef RPC_CLNT
7126206Swpaul#ifdef SOLARIS
7226206Swpaul%#include "../gen/nis_clnt.h"
7326206Swpaul#else
7426206Swpaul%#include "nis.h"
7526206Swpaul#endif
7626206Swpaul#endif
7726206Swpaul
7826206Swpaulprogram CACHEPROG {
7926206Swpaul	version CACHE_VER_1 {
8026206Swpaul		void NIS_CACHE_ADD_ENTRY(fd_result) = 1;
8126206Swpaul		void NIS_CACHE_REMOVE_ENTRY(directory_obj) = 2;
8226206Swpaul		void NIS_CACHE_READ_COLDSTART(void) = 3;
8326206Swpaul		void NIS_CACHE_REFRESH_ENTRY(string<>) = 4;
8426206Swpaul	} = 1;
8526206Swpaul} = 100301;
86