00001 // Copyright (C) 2001, Compaq Computer Corporation 00002 // 00003 // This file is part of Vesta. 00004 // 00005 // Vesta is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public 00007 // License as published by the Free Software Foundation; either 00008 // version 2.1 of the License, or (at your option) any later version. 00009 // 00010 // Vesta is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with Vesta; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 /* 00020 // dupe.H 00021 // Last modified on Wed Apr 7 14:15:45 EDT 2004 by ken@xorian.net 00022 // modified on Tue Sep 12 12:18:00 PDT 2000 by mann 00023 // 00024 // ONC RPC duplicate suppression: 00025 // (1) Detects when an RPC we are still processing is retransmitted 00026 // and drops the retransmission on the floor. 00027 // (2) Detects when an RPC we recently replied to is retransmitted 00028 // and retransmits the reply from its cache. 00029 */ 00030 00031 #ifndef _DUPE_H 00032 #define _DUPE_H 00033 00034 #include "nfsd.H" 00035 00036 /* If the RPC is a duplicate, reply to it and return false. If not, 00037 // note that the RPC is in progress and return true. In the latter 00038 // case the caller must invoke completed_rpc after replying to the 00039 // call. 00040 */ 00041 extern 00042 #if __cplusplus 00043 "C" 00044 #endif 00045 int new_rpc(SVCXPRT* xprt, struct rpc_msg* msg); 00046 00047 /* Note that this RPC is completed and cache its result, so that 00048 // is_dupe will retransmit the result it if another thread receives a 00049 // retransmitted call. 00050 */ 00051 extern 00052 #if __cplusplus 00053 "C" 00054 #endif 00055 void completed_rpc(SVCXPRT* xprt, struct rpc_msg* msg, int replylen); 00056 00057 #if __cplusplus 00058 00059 #include "ReposStats.H" 00060 00061 // Get the current duplicate suppression statistics 00062 ReposStats::DupeStats get_dupe_stats() throw(); 00063 #endif 00064 00065 #endif /* _DUPE_H */