| 1 | /* |
| 2 | * Please do not edit this file. |
| 3 | * It was generated using rpcgen. |
| 4 | */ |
| 5 | |
| 6 | #ifndef _NIS_CACHE_H_RPCGEN |
| 7 | #define	_NIS_CACHE_H_RPCGEN |
| 8 | |
| 9 | #include <rpc/rpc.h> |
| 10 | |
| 11 | #ifdef __cplusplus |
| 12 | extern "C" { |
| 13 | #endif |
| 14 | |
| 15 | /* |
| 16 | * Sun RPC is a product of Sun Microsystems, Inc. and is provided for |
| 17 | * unrestricted use provided that this legend is included on all tape |
| 18 | * media and as a part of the software program in whole or part. Users |
| 19 | * may copy or modify Sun RPC without charge, but are not authorized |
| 20 | * to license or distribute it to anyone else except as part of a product or |
| 21 | * program developed by the user or with the express written consent of |
| 22 | * Sun Microsystems, Inc. |
| 23 | * |
| 24 | * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE |
| 25 | * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR |
| 26 | * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. |
| 27 | * |
| 28 | * Sun RPC is provided with no support and without any obligation on the |
| 29 | * part of Sun Microsystems, Inc. to assist in its use, correction, |
| 30 | * modification or enhancement. |
| 31 | * |
| 32 | * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE |
| 33 | * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC |
| 34 | * OR ANY PART THEREOF. |
| 35 | * |
| 36 | * In no event will Sun Microsystems, Inc. be liable for any lost revenue |
| 37 | * or profits or other special, indirect and consequential damages, even if |
| 38 | * Sun has been advised of the possibility of such damages. |
| 39 | * |
| 40 | * Sun Microsystems, Inc. |
| 41 | * 2550 Garcia Avenue |
| 42 | * Mountain View, California 94043 |
| 43 | */ |
| 44 | #include <rpc/types.h> |
| 45 | #include <rpcsvc/nis.h> |
| 46 | |
| 47 | /* default cache file */ |
| 48 | #define CACHEFILE "/var/nis/NIS_SHARED_DIRCACHE" |
| 49 | |
| 50 | /* clients have to read-lock the cache file, and SVR4 locking requires that */ |
| 51 | /* the file be writable, but we don't want a world-writable cache file. */ |
| 52 | /* So... everyone agrees to use a different, world-writable file for the */ |
| 53 | /* locking operations, but the data is in CACHEFILE. */ |
| 54 | #define CACHELOCK "/usr/tmp/.NIS_DIR_CACHELOCK" |
| 55 | |
| 56 | /* the file containing one trusted XDR'ed directory object. |
| 57 | * This has to be present for the system to work. |
| 58 | */ |
| 59 | #define COLD_START_FILE "/var/nis/NIS_COLD_START" |
| 60 | |
| 61 | enum pc_status {HIT, MISS, NEAR_MISS}; |
| 62 | |
| 63 | extern int __nis_debuglevel; |
| 64 | |
| 65 | |
| 66 | |
| 67 | #define	CACHEPROG ((unsigned long)(100301)) |
| 68 | #define	CACHE_VER_1 ((unsigned long)(1)) |
| 69 | |
| 70 | extern void cacheprog_1(struct svc_req *rqstp, SVCXPRT *transp); |
| 71 | #define	NIS_CACHE_ADD_ENTRY ((unsigned long)(1)) |
| 72 | extern void * nis_cache_add_entry_1(fd_result *, CLIENT *); |
| 73 | extern void * nis_cache_add_entry_1_svc(fd_result *, struct svc_req *); |
| 74 | #define	NIS_CACHE_REMOVE_ENTRY ((unsigned long)(2)) |
| 75 | extern void * nis_cache_remove_entry_1(directory_obj *, CLIENT *); |
| 76 | extern void * nis_cache_remove_entry_1_svc(directory_obj *, struct svc_req *); |
| 77 | #define	NIS_CACHE_READ_COLDSTART ((unsigned long)(3)) |
| 78 | extern void * nis_cache_read_coldstart_1(void *, CLIENT *); |
| 79 | extern void * nis_cache_read_coldstart_1_svc(void *, struct svc_req *); |
| 80 | #define	NIS_CACHE_REFRESH_ENTRY ((unsigned long)(4)) |
| 81 | extern void * nis_cache_refresh_entry_1(char **, CLIENT *); |
| 82 | extern void * nis_cache_refresh_entry_1_svc(char **, struct svc_req *); |
| 83 | extern int cacheprog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); |
| 84 | |
| 85 | #ifdef __cplusplus |
| 86 | } |
| 87 | #endif |
| 88 | |
| 89 | #endif /* !_NIS_CACHE_H_RPCGEN */ |