00001 #ifndef __XRDNETOPTS_H__ 00002 #define __XRDNETOPTS_H__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d N e t O p t s . h h */ 00006 /* */ 00007 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* All Rights Reserved */ 00009 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00010 /* DE-AC02-76-SFO0515 with the Department of Energy */ 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 00033 /******************************************************************************/ 00034 /* X r d N e t W o r k O p t i o n s */ 00035 /******************************************************************************/ 00036 00037 // Force a new file descriptor when setting up UDP communications 00038 // 00039 #define XRDNET_NEWFD 0x00000100 00040 00041 // This side of the socket will never receive any data 00042 // 00043 #define XRDNET_SENDONLY 0x00000200 00044 00045 // Multiple threads may attempts a read (very unusual) 00046 // 00047 #define XRDNET_MULTREAD 0x000000400 00048 00049 // Do not trim off fomain in the host name. 00050 // 00051 #define XRDNET_NODNTRIM 0x000000800 00052 00053 /******************************************************************************/ 00054 /* X r d N e t W o r k & X r d N e t S o c k e t O p t i o n s */ 00055 /******************************************************************************/ 00056 00057 // Turn off TCP_NODELAY 00058 // 00059 #define XRDNET_DELAY 0x00010000 00060 00061 // Enable SO_KEEPALIVE 00062 // 00063 #define XRDNET_KEEPALIVE 0x00020000 00064 00065 // Do not close the socket in child processes hwne they exec 00066 // 00067 #define XRDNET_NOCLOSEX 0x00040000 00068 00069 // Do not print common error messages (spotty right now) 00070 // 00071 #define XRDNET_NOEMSG 0x00080000 00072 00073 // Do not linger on a close 00074 // 00075 #define XRDNET_NOLINGER 0x00100000 00076 00077 // Define a UDP socket 00078 // 00079 #define XRDNET_UDPSOCKET 0x00200000 00080 00081 // Define a FIFO (currently only for NetSocket) 00082 // 00083 #define XRDNET_FIFO 0x00400000 00084 00085 // Avoid DNS reverse lookups 00086 // 00087 #define XRDNET_NORLKUP 0x00800000 00088 00089 // Enable TLS upon connection 00090 // 00091 #define XRDNET_USETLS 0x01000000 00092 00093 /******************************************************************************/ 00094 /* X r d N e t S o c k e t O p t i o n s */ 00095 /******************************************************************************/ 00096 00097 // This socket will be used for server activities (only for XrdNetS 00098 // 00099 #define XRDNET_SERVER 0x10000000 00100 00101 // Maximum backlog for incomming connections. The backlog value goes in low 00102 // order byte and is used only when XRDNET_SERVER is specified. 00103 // 00104 #define XRDNET_BKLG 0x000000FF 00105 00106 // Maximum wait time for outgoing connect. The timeout value goes in low 00107 // order byte and is used only when XRDNET_SERVER is *NOT* specified. 00108 // The value is in seconds (maximum timeout is 255 seconds). 00109 // 00110 #define XRDNET_TOUT 0x000000FF 00111 00112 // The default UDP socket buffer size 00113 // 00114 #define XRDNET_UDPBUFFSZ 32768 00115 00116 // Maximum backlog value for listen() 00117 // 00118 #define XRDNETSOCKET_MAXBKLG 255 00119 00120 // Desired linger value for close 00121 // 00122 #define XRDNETSOCKET_LINGER 3 00123 #endif