Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:40

0001 #ifndef __XRDNETOPTS_H__
0002 #define __XRDNETOPTS_H__
0003 /******************************************************************************/
0004 /*                                                                            */
0005 /*                         X r d N e t O p t s . h h                          */
0006 /*                                                                            */
0007 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University  */
0008 /*                            All Rights Reserved                             */
0009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
0010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
0011 /*                                                                            */
0012 /* This file is part of the XRootD software suite.                            */
0013 /*                                                                            */
0014 /* XRootD is free software: you can redistribute it and/or modify it under    */
0015 /* the terms of the GNU Lesser General Public License as published by the     */
0016 /* Free Software Foundation, either version 3 of the License, or (at your     */
0017 /* option) any later version.                                                 */
0018 /*                                                                            */
0019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
0020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
0021 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
0022 /* License for more details.                                                  */
0023 /*                                                                            */
0024 /* You should have received a copy of the GNU Lesser General Public License   */
0025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file  */
0026 /* COPYING (GPL license).  If not, see <http://www.gnu.org/licenses/>.        */
0027 /*                                                                            */
0028 /* The copyright holder's institutional names and contributor's names may not */
0029 /* be used to endorse or promote products derived from this software without  */
0030 /* specific prior written permission of the institution or contributor.       */
0031 /******************************************************************************/
0032 
0033 /******************************************************************************/
0034 /*                    X r d N e t W o r k   O p t i o n s                     */
0035 /******************************************************************************/
0036 
0037 // Force a new file descriptor when setting up UDP communications
0038 //
0039 #define XRDNET_NEWFD     0x00000100
0040 
0041 // This side of the socket will never receive any data
0042 //
0043 #define XRDNET_SENDONLY  0x00000200
0044 
0045 // Multiple threads may attempts a read (very unusual)
0046 //
0047 #define XRDNET_MULTREAD 0x000000400
0048 
0049 // Do not trim off fomain in the host name.
0050 //
0051 #define XRDNET_NODNTRIM 0x000000800
0052 
0053 /******************************************************************************/
0054 /*     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      */
0055 /******************************************************************************/
0056 
0057 // Turn off TCP_NODELAY
0058 //
0059 #define XRDNET_DELAY     0x00010000
0060   
0061 // Enable SO_KEEPALIVE
0062 //
0063 #define XRDNET_KEEPALIVE 0x00020000
0064 
0065 // Do not close the socket in child processes hwne they exec
0066 //
0067 #define XRDNET_NOCLOSEX  0x00040000
0068 
0069 // Do not print common error messages (spotty right now)
0070 //
0071 #define XRDNET_NOEMSG    0x00080000
0072 
0073 // Do not linger on a close
0074 //
0075 #define XRDNET_NOLINGER  0x00100000
0076 
0077 // Define a UDP socket
0078 //
0079 #define XRDNET_UDPSOCKET 0x00200000
0080 
0081 // Define a FIFO (currently only for NetSocket)
0082 //
0083 #define XRDNET_FIFO      0x00400000
0084 
0085 // Avoid DNS reverse lookups
0086 //
0087 #define XRDNET_NORLKUP   0x00800000
0088 
0089 // Enable TLS upon connection
0090 //
0091 #define XRDNET_USETLS    0x01000000
0092 
0093 /******************************************************************************/
0094 /*                  X r d N e t S o c k e t   O p t i o n s                   */
0095 /******************************************************************************/
0096   
0097 // This socket will be used for server activities (only for XrdNetS
0098 //
0099 #define XRDNET_SERVER    0x10000000
0100 
0101 // Maximum backlog for incoming connections. The backlog value goes in low
0102 // order byte and is used only when XRDNET_SERVER is specified.
0103 //
0104 #define XRDNET_BKLG      0x000000FF
0105 
0106 // Maximum wait time for outgoing connect. The timeout value goes in low
0107 // order byte and is used only when XRDNET_SERVER is *NOT* specified.
0108 // The value is in seconds (maximum timeout is 255 seconds).
0109 //
0110 #define XRDNET_TOUT      0x000000FF
0111 
0112 // The default UDP socket buffer size
0113 //
0114 #define XRDNET_UDPBUFFSZ 32768
0115 
0116 // Maximum backlog value for listen()
0117 //
0118 #define XRDNETSOCKET_MAXBKLG 255
0119 
0120 // Desired linger value for close
0121 //
0122 #define XRDNETSOCKET_LINGER    3
0123 #endif