139742Smckusick /* 263236Sbostic * Copyright (c) 1989, 1993 363236Sbostic * The Regents of the University of California. All rights reserved. 439742Smckusick * 539742Smckusick * This code is derived from software contributed to Berkeley by 639742Smckusick * Rick Macklem at The University of Guelph. 739742Smckusick * 844515Sbostic * %sccs.include.redist.c% 939742Smckusick * 10*68653Smckusick * @(#)nfsrvcache.h 8.3 (Berkeley) 03/30/95 1139742Smckusick */ 1239742Smckusick 13*68653Smckusick 14*68653Smckusick #ifndef _NFS_NFSRVCACHE_H_ 15*68653Smckusick #define _NFS_NFSRVCACHE_H_ 16*68653Smckusick 1739742Smckusick /* 1839742Smckusick * Definitions for the server recent request cache 1939742Smckusick */ 2039742Smckusick 21*68653Smckusick #define NFSRVCACHESIZ 64 2239742Smckusick 2339742Smckusick struct nfsrvcache { 2467708Smckusick TAILQ_ENTRY(nfsrvcache) rc_lru; /* LRU chain */ 2567708Smckusick LIST_ENTRY(nfsrvcache) rc_hash; /* Hash chain */ 2652196Smckusick u_long rc_xid; /* rpc id number */ 2739742Smckusick union { 2852196Smckusick struct mbuf *ru_repmb; /* Reply mbuf list OR */ 2952196Smckusick int ru_repstat; /* Reply status */ 3039742Smckusick } rc_un; 3152196Smckusick union nethostaddr rc_haddr; /* Host address */ 3252196Smckusick short rc_proc; /* rpc proc number */ 3352196Smckusick u_char rc_state; /* Current state of request */ 3452196Smckusick u_char rc_flag; /* Flag bits */ 3539742Smckusick }; 3639742Smckusick 3752196Smckusick #define rc_reply rc_un.ru_repmb 3852196Smckusick #define rc_status rc_un.ru_repstat 3952196Smckusick #define rc_inetaddr rc_haddr.had_inetaddr 4052196Smckusick #define rc_nam rc_haddr.had_nam 4139742Smckusick 4239742Smckusick /* Cache entry states */ 4339742Smckusick #define RC_UNUSED 0 4439742Smckusick #define RC_INPROG 1 4539742Smckusick #define RC_DONE 2 4639742Smckusick 4739742Smckusick /* Return values */ 4839742Smckusick #define RC_DROPIT 0 4939742Smckusick #define RC_REPLY 1 5039742Smckusick #define RC_DOIT 2 5157781Smckusick #define RC_CHECKIT 3 5239742Smckusick 5339742Smckusick /* Flag bits */ 5452196Smckusick #define RC_LOCKED 0x01 5552196Smckusick #define RC_WANTED 0x02 5652196Smckusick #define RC_REPSTATUS 0x04 5752196Smckusick #define RC_REPMBUF 0x08 5852196Smckusick #define RC_NQNFS 0x10 5952196Smckusick #define RC_INETADDR 0x20 6052196Smckusick #define RC_NAM 0x40 61*68653Smckusick 62*68653Smckusick #endif 63