1 #ifndef __RPCSVC_NIS_CACHE_H_
2 #define __RPCSVC_NIS_CACHE_H_
7 #include <rpcsvc/nis.h>
11 /* default cache file */
12 #define CACHEFILE "/var/nis/NIS_SHARED_DIRCACHE"
14 /* clients have to read-lock the cache file, and SVR4 locking requires that */
15 /* the file be writable, but we don't want a world-writable cache file. */
16 /* So... everyone agrees to use a different, world-writable file for the */
17 /* locking operations, but the data is in CACHEFILE. */
18 #define CACHELOCK "/usr/tmp/.NIS_DIR_CACHELOCK"
20 /* the file containing one trusted XDR'ed directory object.
21 * This has to be present for the system to work.
23 #define COLD_START_FILE "/var/nis/NIS_COLD_START"
25 enum pc_status
{HIT
, MISS
, NEAR_MISS
};
27 #define CACHEPROG ((u_long)100301)
28 #define CACHE_VER_1 ((u_long)1)
30 #define NIS_CACHE_ADD_ENTRY ((u_long)1)
31 #define NIS_CACHE_REMOVE_ENTRY ((u_long)2)
32 #define NIS_CACHE_READ_COLDSTART ((u_long)3)
33 #define NIS_CACHE_REFRESH_ENTRY ((u_long)4)
35 extern void *nis_cache_add_entry_1
__P ((fd_result
*, CLIENT
*));
36 extern void *nis_cache_add_entry_1_svc
__P ((fd_result
*, struct svc_req
*));
37 extern void *nis_cache_remove_entry_1
__P ((directory_obj
*, CLIENT
*));
38 extern void *nis_cache_remove_entry_1_svc
__P ((directory_obj
*,
40 extern void *nis_cache_read_coldstart_1
__P ((void *, CLIENT
*));
41 extern void *nis_cache_read_coldstart_1_svc
__P ((void *, struct svc_req
*));
42 extern void *nis_cache_refresh_entry_1
__P ((char **, CLIENT
*));
43 extern void *nis_cache_refresh_entry_1_svc
__P ((char **, struct svc_req
*));
47 #endif /* !_RPCSVC_NIS_CACHE_H_ */