xrootd
XrdNetOpts.hh
Go to the documentation of this file.
1 #ifndef __XRDNETOPTS_H__
2 #define __XRDNETOPTS_H__
3 /******************************************************************************/
4 /* */
5 /* X r d N e t O p t s . h h */
6 /* */
7 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /* */
12 /* This file is part of the XRootD software suite. */
13 /* */
14 /* XRootD is free software: you can redistribute it and/or modify it under */
15 /* the terms of the GNU Lesser General Public License as published by the */
16 /* Free Software Foundation, either version 3 of the License, or (at your */
17 /* option) any later version. */
18 /* */
19 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22 /* License for more details. */
23 /* */
24 /* You should have received a copy of the GNU Lesser General Public License */
25 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27 /* */
28 /* The copyright holder's institutional names and contributor's names may not */
29 /* be used to endorse or promote products derived from this software without */
30 /* specific prior written permission of the institution or contributor. */
31 /******************************************************************************/
32 
33 /******************************************************************************/
34 /* X r d N e t W o r k O p t i o n s */
35 /******************************************************************************/
36 
37 // Force a new file descriptor when setting up UDP communications
38 //
39 #define XRDNET_NEWFD 0x00000100
40 
41 // This side of the socket will never receive any data
42 //
43 #define XRDNET_SENDONLY 0x00000200
44 
45 // Multiple threads may attempts a read (very unusual)
46 //
47 #define XRDNET_MULTREAD 0x000000400
48 
49 // Do not trim off fomain in the host name.
50 //
51 #define XRDNET_NODNTRIM 0x000000800
52 
53 /******************************************************************************/
54 /* 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 */
55 /******************************************************************************/
56 
57 // Turn off TCP_NODELAY
58 //
59 #define XRDNET_DELAY 0x00010000
60 
61 // Enable SO_KEEPALIVE
62 //
63 #define XRDNET_KEEPALIVE 0x00020000
64 
65 // Do not close the socket in child processes hwne they exec
66 //
67 #define XRDNET_NOCLOSEX 0x00040000
68 
69 // Do not print common error messages (spotty right now)
70 //
71 #define XRDNET_NOEMSG 0x00080000
72 
73 // Do not linger on a close
74 //
75 #define XRDNET_NOLINGER 0x00100000
76 
77 // Define a UDP socket
78 //
79 #define XRDNET_UDPSOCKET 0x00200000
80 
81 // Define a FIFO (currently only for NetSocket)
82 //
83 #define XRDNET_FIFO 0x00400000
84 
85 // Avoid DNS reverse lookups
86 //
87 #define XRDNET_NORLKUP 0x00800000
88 
89 /******************************************************************************/
90 /* X r d N e t S o c k e t O p t i o n s */
91 /******************************************************************************/
92 
93 // This socket will be used for server activities (only for XrdNetS
94 //
95 #define XRDNET_SERVER 0x10000000
96 
97 // Maximum backlog for incomming connections. The backlog value goes in low
98 // order byte and is used only when XRDNET_SERVER is specified.
99 //
100 #define XRDNET_BKLG 0x000000FF
101 
102 // Maximum wait time for outgoing connect. The timeout value goes in low
103 // order byte and is used only when XRDNET_SERVER is *NOT* specified.
104 // The value is in seconds (maximum timeout is 255 seconds).
105 //
106 #define XRDNET_TOUT 0x000000FF
107 
108 // The default UDP socket buffer size
109 //
110 #define XRDNET_UDPBUFFSZ 32768
111 
112 // Maximum backlog value for listen()
113 //
114 #define XRDNETSOCKET_MAXBKLG 255
115 
116 // Desired linger value for close
117 //
118 #define XRDNETSOCKET_LINGER 3
119 #endif