|
xrootd
|
00001 #ifndef _XRC_CONST_H 00002 #define _XRC_CONST_H 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d C l i e n t C o n s t . h h */ 00006 /* */ 00007 /* Author: Fabrizio Furano (INFN Padova, 2004) */ 00008 /* Adapted from TXNetFile (root.cern.ch) originally done by */ 00009 /* Alvise Dorigo, Fabrizio Furano */ 00010 /* INFN Padova, 2003 */ 00011 /* */ 00012 /* This file is part of the XRootD software suite. */ 00013 /* */ 00014 /* XRootD is free software: you can redistribute it and/or modify it under */ 00015 /* the terms of the GNU Lesser General Public License as published by the */ 00016 /* Free Software Foundation, either version 3 of the License, or (at your */ 00017 /* option) any later version. */ 00018 /* */ 00019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */ 00020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ 00021 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */ 00022 /* License for more details. */ 00023 /* */ 00024 /* You should have received a copy of the GNU Lesser General Public License */ 00025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */ 00026 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */ 00027 /* */ 00028 /* The copyright holder's institutional names and contributor's names may not */ 00029 /* be used to endorse or promote products derived from this software without */ 00030 /* specific prior written permission of the institution or contributor. */ 00031 /******************************************************************************/ 00032 00034 // // 00035 // Constants for Xrd // 00036 // // 00038 00039 #define DFLT_CONNECTTIMEOUT 120 00040 #define NAME_CONNECTTIMEOUT (char *)"ConnectTimeout" 00041 00042 #define DFLT_REQUESTTIMEOUT 300 00043 #define NAME_REQUESTTIMEOUT (char *)"RequestTimeout" 00044 00045 #define DFLT_MAXREDIRECTCOUNT 16 00046 #define NAME_MAXREDIRECTCOUNT (char *)"MaxRedirectcount" 00047 00048 #define DFLT_DEBUG 0 00049 #define NAME_DEBUG (char *)"DebugLevel" 00050 00051 #define DFLT_RECONNECTWAIT 5 00052 #define NAME_RECONNECTWAIT (char *)"ReconnectWait" 00053 00054 #define DFLT_REDIRCNTTIMEOUT 36000 00055 #define NAME_REDIRCNTTIMEOUT (char *)"RedirCntTimeout" 00056 00057 #define DFLT_FIRSTCONNECTMAXCNT 8 00058 #define NAME_FIRSTCONNECTMAXCNT (char *)"FirstConnectMaxCnt" 00059 00060 #define DFLT_TRANSACTIONTIMEOUT 28800 00061 #define NAME_TRANSACTIONTIMEOUT (char *)"TransactionTimeout" 00062 00063 00064 #define TXSOCK_ERR_TIMEOUT -1 00065 #define TXSOCK_ERR -2 00066 #define TXSOCK_ERR_INTERRUPT -3 00067 00068 // the default number of parallel streams PER physical connection 00069 // 0 means that the multistream support is disabled 00070 #define DFLT_MULTISTREAMCNT 0 00071 #define NAME_MULTISTREAMCNT (char *)"ParStreamsPerPhyConn" 00072 00073 // The minimum size to use to split big single requests 00074 // through multiple streams 00075 #define DFLT_MULTISTREAMSPLITSIZE (4*1024*1024) 00076 00077 // keep/dont-keep the socket open (required by optimized rootd fallback) 00078 #define DFLT_KEEPSOCKOPENIFNOTXRD 0 00079 #define NAME_KEEPSOCKOPENIFNOTXRD (char *)"KeepSockOpenIfNotXrd" 00080 00081 // Printable version 00082 #define XRD_CLIENT_VERSION (char *)"kXR_ver002+kXR_asyncap" 00083 00084 // Version and capabilities sent to the server 00085 #define XRD_CLIENT_CURRENTVER (kXR_ver002) 00086 #define XRD_CLIENT_CAPVER ((kXR_char)kXR_asyncap | XRD_CLIENT_CURRENTVER) 00087 00088 // Defaults for ReadAhead and Cache 00089 #define DFLT_READCACHESIZE 0 00090 #define NAME_READCACHESIZE (char *)"ReadCacheSize" 00091 00092 // 0 = LRU 00093 // 1 = Remove least offest 00094 #define DFLT_READCACHEBLKREMPOLICY 0 00095 #define NAME_READCACHEBLKREMPOLICY (char *)"ReadCacheBlkRemPolicy" 00096 00097 #define DFLT_READAHEADSIZE (0) 00098 #define NAME_READAHEADSIZE (char *)"ReadAheadSize" 00099 00100 // Align all the read requests to multiples of a number 00101 #define DFLT_READTRIMBLKSZ (0) 00102 #define NAME_READTRIMBLKSZ (char *)"ReadTrimBlockSize" 00103 00104 // The default read ahead strategy to use 00105 #define DFLT_READAHEADSTRATEGY (1) // This is the sequential readahead 00106 #define NAME_READAHEADSTRATEGY (char *)"ReadAheadStrategy" 00107 00108 00109 // To be used in copy-like apps when the data is to be accessed only once 00110 // ... to reduce additional cache overhead 00111 #define DFLT_REMUSEDCACHEBLKS 0 00112 #define NAME_REMUSEDCACHEBLKS (char *)"RemoveUsedCacheBlocks" 00113 00114 // When writing async, purge immediately the written blocks from the cache 00115 #define DFLT_PURGEWRITTENBLOCKS 0 00116 #define NAME_PURGEWRITTENBLOCKS (char *)"PurgeWrittenBlocks" 00117 00118 #define NAME_REDIRDOMAINALLOW_RE (char *)"RedirDomainAllowRE" 00119 #define NAME_REDIRDOMAINDENY_RE (char *)"RedirDomainDenyRE" 00120 #define NAME_CONNECTDOMAINALLOW_RE (char *)"ConnectDomainAllowRE" 00121 #define NAME_CONNECTDOMAINDENY_RE (char *)"ConnectDomainDenyRE" 00122 00123 #define PROTO (char *)"root" 00124 00125 // The max number of threads spawned to do parallel opens 00126 // Note for dummies: this is not the max number of parallel opens 00127 #define DFLT_MAXCONCURRENTOPENS 100 00128 00129 #define READV_MAXCHUNKS 512 00130 #define READV_MAXCHUNKSIZE (1024*192) 00131 00132 // SOCKS4 support 00133 #define NAME_SOCKS4HOST (char *)"Socks4Server" 00134 #define NAME_SOCKS4PORT (char *)"Socks4Port" 00135 00136 // Default TCP windows size 00137 // A value of '0' implies "use the default OS settings" 00138 // which enables window scaling on some platforms (linux, MacOsX) 00139 // but may be to small on others (solaris); the preprocessor macro 00140 // is set based on the platform information found in configure 00141 #if defined(__linux__) || defined(__APPLE__) 00142 #define DFLT_DFLTTCPWINDOWSIZE (0) 00143 #else 00144 #define DFLT_DFLTTCPWINDOWSIZE (262144) 00145 #endif 00146 #define NAME_DFLTTCPWINDOWSIZE (char *)"DfltTcpWindowSize" 00147 00148 // A connection towards a data server timeouts quickly 00149 #define DFLT_DATASERVERCONN_TTL 300 00150 #define NAME_DATASERVERCONN_TTL (char *)"DataServerConn_ttl" 00151 00152 // A connection towards a Load Balancer timeouts after many seconds of no use 00153 #define DFLT_LBSERVERCONN_TTL 1200 00154 #define NAME_LBSERVERCONN_TTL (char *)"LBServerConn_ttl" 00155 00156 // Switch on/off the fork handlers 00157 #define DFLT_ENABLE_FORK_HANDLERS 0 00158 #define NAME_ENABLE_FORK_HANDLERS (char *)"EnableForkHandlers" 00159 00160 // Use TCP keepalive 00161 #define DFLT_ENABLE_TCP_KEEPALIVE 0 00162 #define NAME_ENABLE_TCP_KEEPALIVE (char *)"EnableTCPKeepAlive" 00163 00164 // Tweak the TCP keepalive - these are only meaningful on Linux 00165 00166 // Interval (in seconds) between the last data packet and the first probe 00167 #define DFLT_TCP_KEEPALIVE_TIME 7200 00168 #define NAME_TCP_KEEPALIVE_TIME (char *)"TCPKeepAliveTime" 00169 00170 // Interval (in seconds) between the probes 00171 #define DFLT_TCP_KEEPALIVE_INTERVAL 75 00172 #define NAME_TCP_KEEPALIVE_INTERVAL (char *)"TCPKeepAliveInterval" 00173 00174 // Number of probes lost to consider the connection broken 00175 #define DFLT_TCP_KEEPALIVE_PROBES 9 00176 #define NAME_TCP_KEEPALIVE_PROBES (char *)"TCPKeepAliveProbes" 00177 00178 // Enable/disable the file size hint in xrdcp 00179 #define DFLT_XRDCP_SIZE_HINT 1 00180 #define NAME_XRDCP_SIZE_HINT (char *)"XrdCpSizeHint" 00181 00182 // Enable/disable redirection printing 00183 #define DFLT_PRINT_REDIRECTS 0 00184 #define NAME_PRINT_REDIRECTS (char *)"PrintRedirects" 00185 00186 #define TRUE 1 00187 #define FALSE 0 00188 00189 #define xrdmin(a, b) (a < b ? a : b) 00190 #define xrdmax(a, b) (a > b ? a : b) 00191 00192 #endif
1.7.6.1