13b0f7467SBill Paul %/* 23b0f7467SBill Paul % * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 33b0f7467SBill Paul % * unrestricted use provided that this legend is included on all tape 43b0f7467SBill Paul % * media and as a part of the software program in whole or part. Users 53b0f7467SBill Paul % * may copy or modify Sun RPC without charge, but are not authorized 63b0f7467SBill Paul % * to license or distribute it to anyone else except as part of a product or 73b0f7467SBill Paul % * program developed by the user or with the express written consent of 83b0f7467SBill Paul % * Sun Microsystems, Inc. 93b0f7467SBill Paul % * 103b0f7467SBill Paul % * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 113b0f7467SBill Paul % * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 123b0f7467SBill Paul % * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 133b0f7467SBill Paul % * 143b0f7467SBill Paul % * Sun RPC is provided with no support and without any obligation on the 153b0f7467SBill Paul % * part of Sun Microsystems, Inc. to assist in its use, correction, 163b0f7467SBill Paul % * modification or enhancement. 173b0f7467SBill Paul % * 183b0f7467SBill Paul % * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 193b0f7467SBill Paul % * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 203b0f7467SBill Paul % * OR ANY PART THEREOF. 213b0f7467SBill Paul % * 223b0f7467SBill Paul % * In no event will Sun Microsystems, Inc. be liable for any lost revenue 233b0f7467SBill Paul % * or profits or other special, indirect and consequential damages, even if 243b0f7467SBill Paul % * Sun has been advised of the possibility of such damages. 253b0f7467SBill Paul % * 263b0f7467SBill Paul % * Sun Microsystems, Inc. 273b0f7467SBill Paul % * 2550 Garcia Avenue 283b0f7467SBill Paul % * Mountain View, California 94043 293b0f7467SBill Paul % */ 303b0f7467SBill Paul 313b0f7467SBill Paul /* 323b0f7467SBill Paul * nis_cache.x 333b0f7467SBill Paul * 343b0f7467SBill Paul * Copyright (c) 1988-1992 Sun Microsystems Inc 353b0f7467SBill Paul * All Rights Reserved. 363b0f7467SBill Paul */ 373b0f7467SBill Paul 383b0f7467SBill Paul #ifdef RPC_HDR 393b0f7467SBill Paul %#include <rpc/types.h> 403b0f7467SBill Paul %#include <rpcsvc/nis.h> 413b0f7467SBill Paul % 423b0f7467SBill Paul %/* default cache file */ 433b0f7467SBill Paul %#define CACHEFILE "/var/nis/NIS_SHARED_DIRCACHE" 443b0f7467SBill Paul % 453b0f7467SBill Paul %/* clients have to read-lock the cache file, and SVR4 locking requires that */ 463b0f7467SBill Paul %/* the file be writable, but we don't want a world-writable cache file. */ 473b0f7467SBill Paul %/* So... everyone agrees to use a different, world-writable file for the */ 483b0f7467SBill Paul %/* locking operations, but the data is in CACHEFILE. */ 493b0f7467SBill Paul %#define CACHELOCK "/usr/tmp/.NIS_DIR_CACHELOCK" 503b0f7467SBill Paul % 513b0f7467SBill Paul %/* the file containing one trusted XDR'ed directory object. 523b0f7467SBill Paul % * This has to be present for the system to work. 533b0f7467SBill Paul % */ 543b0f7467SBill Paul %#define COLD_START_FILE "/var/nis/NIS_COLD_START" 553b0f7467SBill Paul % 563b0f7467SBill Paul %enum pc_status {HIT, MISS, NEAR_MISS}; 573b0f7467SBill Paul % 583b0f7467SBill Paul %extern int __nis_debuglevel; 593b0f7467SBill Paul % 603b0f7467SBill Paul % 613b0f7467SBill Paul #endif 623b0f7467SBill Paul 633b0f7467SBill Paul #ifdef RPC_CLNT 643b0f7467SBill Paul #ifdef SOLARIS 653b0f7467SBill Paul %#include "../gen/nis_clnt.h" 663b0f7467SBill Paul #else 673b0f7467SBill Paul %#include "nis.h" 683b0f7467SBill Paul #endif 693b0f7467SBill Paul #endif 703b0f7467SBill Paul 713b0f7467SBill Paul program CACHEPROG { 723b0f7467SBill Paul version CACHE_VER_1 { 733b0f7467SBill Paul void NIS_CACHE_ADD_ENTRY(fd_result) = 1; 743b0f7467SBill Paul void NIS_CACHE_REMOVE_ENTRY(directory_obj) = 2; 753b0f7467SBill Paul void NIS_CACHE_READ_COLDSTART(void) = 3; 763b0f7467SBill Paul void NIS_CACHE_REFRESH_ENTRY(string<>) = 4; 773b0f7467SBill Paul } = 1; 783b0f7467SBill Paul } = 100301; 79