Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Default_Constants.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   Default_Constants.h
00006  *
00007  *  $Id: Default_Constants.h,v 1.1.1.1.2.1 2003/04/10 14:12:28 phil Exp $
00008  *
00009  *  @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
00010  *  @author Jesper S. M|ller<stophph@diku.dk>
00011  *  @author and a cast of thousands...
00012  *
00013  *  This one is split from the famous OS.h
00014  */
00015 //=============================================================================
00016 
00017 #ifndef ACE_DEFAULT_CONSTANTS_H
00018 #define ACE_DEFAULT_CONSTANTS_H
00019 #include "ace/pre.h"
00020 
00021 // Included just keep compilers that see #pragma dierctive first
00022 // happy.
00023 #include "ace/config-all.h"
00024 
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif /* ACE_LACKS_PRAGMA_ONCE */
00028 
00029 
00030 // Define the default constants for ACE.  Many of these are used for
00031 // the ACE tests and applications.  You can change these values by
00032 // defining the macros in your config.h file.
00033 # if !defined (ACE_DEFAULT_CLOSE_ALL_HANDLES)
00034 #   define ACE_DEFAULT_CLOSE_ALL_HANDLES 1
00035 # endif /* ACE_DEFAULT_CLOSE_ALL_HANDLES */
00036 
00037 // The maximum length for a fully qualified Internet name.
00038 # if !defined(ACE_MAX_FULLY_QUALIFIED_NAME_LEN)
00039 #   define ACE_MAX_FULLY_QUALIFIED_NAME_LEN 256
00040 # endif /* ACE_MAX_FULLY_QUALIFIED_NAME_LEN */
00041 
00042 #if !defined (ACE_DEFAULT_PAGEFILE_POOL_BASE)
00043 #define ACE_DEFAULT_PAGEFILE_POOL_BASE (void *) 0
00044 #endif /* ACE_DEFAULT_PAGEFILE_POOL_BASE */
00045 
00046 #if !defined (ACE_DEFAULT_PAGEFILE_POOL_SIZE)
00047 #define ACE_DEFAULT_PAGEFILE_POOL_SIZE (size_t) 0x01000000
00048 #endif /* ACE_DEFAULT_PAGEFILE_POOL_SIZE */
00049 
00050 #if !defined (ACE_DEFAULT_PAGEFILE_POOL_CHUNK)
00051 #define ACE_DEFAULT_PAGEFILE_POOL_CHUNK (size_t) 0x00010000
00052 #endif /* ACE_DEFAULT_PAGEFILE_POOL_CHUNK */
00053 
00054 #if !defined (ACE_DEFAULT_PAGEFILE_POOL_NAME)
00055 #define ACE_DEFAULT_PAGEFILE_POOL_NAME ACE_LIB_TEXT ("Default_ACE_Pagefile_Memory_Pool")
00056 #endif /* ACE_DEFAULT_PAGEFILE_POOL_NAME */
00057 
00058 #if !defined (ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY)
00059 #define ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY 0
00060 #endif /* ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY */
00061 
00062 #if !defined (ACE_DEFAULT_SERVICE_REPOSITORY_SIZE)
00063 #define ACE_DEFAULT_SERVICE_REPOSITORY_SIZE 1024
00064 #endif /* ACE_DEFAULT_SERVICE_REPOSITORY_SIZE */
00065 
00066 #if !defined (ACE_REACTOR_NOTIFICATION_ARRAY_SIZE)
00067 #define ACE_REACTOR_NOTIFICATION_ARRAY_SIZE 1024
00068 #endif /* ACE_REACTOR_NOTIFICATION_ARRAY_SIZE */
00069 
00070 # if !defined (ACE_DEFAULT_TIMEOUT)
00071 #   define ACE_DEFAULT_TIMEOUT 5
00072 # endif /* ACE_DEFAULT_TIMEOUT */
00073 
00074 # if !defined (ACE_DEFAULT_BACKLOG)
00075 #   define ACE_DEFAULT_BACKLOG 5
00076 # endif /* ACE_DEFAULT_BACKLOG */
00077 
00078 # if !defined (ACE_DEFAULT_THREADS)
00079 #   define ACE_DEFAULT_THREADS 1
00080 # endif /* ACE_DEFAULT_THREADS */
00081 
00082 // The following 3 defines are used in the IP multicast and broadcast tests.
00083 # if !defined (ACE_DEFAULT_BROADCAST_PORT)
00084 #   define ACE_DEFAULT_BROADCAST_PORT 20000
00085 # endif /* ACE_DEFAULT_BROADCAST_PORT */
00086 
00087 # if !defined (ACE_DEFAULT_MULTICAST_PORT)
00088 #   define ACE_DEFAULT_MULTICAST_PORT 20001
00089 # endif /* ACE_DEFAULT_MULTICAST_PORT */
00090 
00091 # if !defined (ACE_DEFAULT_MULTICAST_ADDR)
00092 // This address MUST be within the range for host group addresses:
00093 // 224.0.0.0 to 239.255.255.255.
00094 #   define ACE_DEFAULT_MULTICAST_ADDR "224.9.9.2"
00095 # endif /* ACE_DEFAULT_MULTICAST_ADDR */
00096 
00097 // Default port number for HTTP.
00098 # if !defined (ACE_DEFAULT_HTTP_SERVER_PORT)
00099 #   define ACE_DEFAULT_HTTP_SERVER_PORT 80
00100 # endif /* ACE_DEFAULT_HTTP_SERVER_PORT */
00101 
00102 // Used in many IPC_SAP tests
00103 # if !defined (ACE_DEFAULT_SERVER_PORT)
00104 #   define ACE_DEFAULT_SERVER_PORT 20002
00105 # endif /* ACE_DEFAULT_SERVER_PORT */
00106 
00107 # if !defined (ACE_DEFAULT_HTTP_PORT)
00108 #   define ACE_DEFAULT_HTTP_PORT 80
00109 # endif /* ACE_DEFAULT_HTTP_PORT */
00110 
00111 # if !defined (ACE_DEFAULT_MAX_SOCKET_BUFSIZ)
00112 #   define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65536
00113 # endif /* ACE_DEFAULT_MAX_SOCKET_BUFSIZ */
00114 
00115 # if !defined (ACE_DEFAULT_SERVER_PORT_STR)
00116 #   define ACE_DEFAULT_SERVER_PORT_STR "20002"
00117 # endif /* ACE_DEFAULT_SERVER_PORT_STR */
00118 
00119 // Used for the Service_Directory test
00120 # if !defined (ACE_DEFAULT_SERVICE_PORT)
00121 #   define ACE_DEFAULT_SERVICE_PORT 20003
00122 # endif /* ACE_DEFAULT_SERVICE_PORT */
00123 
00124 // Used for the ACE_Thread_Spawn test
00125 # if !defined (ACE_DEFAULT_THR_PORT    )
00126 #   define ACE_DEFAULT_THR_PORT 20004
00127 # endif /* ACE_DEFAULT_THR_PORT */
00128 
00129 // Used for <SOCK_Connect::connect> tests
00130 # if !defined (ACE_DEFAULT_LOCAL_PORT)
00131 #   define ACE_DEFAULT_LOCAL_PORT 20005
00132 # endif /* ACE_DEFAULT_LOCAL_PORT */
00133 
00134 // Used for Connector tests
00135 # if !defined (ACE_DEFAULT_LOCAL_PORT_STR)
00136 #   define ACE_DEFAULT_LOCAL_PORT_STR "20005"
00137 # endif /* ACE_DEFAULT_LOCAL_PORT_STR */
00138 
00139 // Used for the name server.
00140 # if !defined (ACE_DEFAULT_NAME_SERVER_PORT)
00141 #   define ACE_DEFAULT_NAME_SERVER_PORT 20006
00142 # endif /* ACE_DEFAULT_NAME_SERVER_PORT */
00143 
00144 # if !defined (ACE_DEFAULT_NAME_SERVER_PORT_STR)
00145 #   define ACE_DEFAULT_NAME_SERVER_PORT_STR "20006"
00146 # endif /* ACE_DEFAULT_NAME_SERVER_PORT_STR */
00147 
00148 // Used for the token server.
00149 # if !defined (ACE_DEFAULT_TOKEN_SERVER_PORT)
00150 #   define ACE_DEFAULT_TOKEN_SERVER_PORT 20007
00151 # endif /* ACE_DEFAULT_TOKEN_SERVER_PORT */
00152 
00153 # if !defined (ACE_DEFAULT_TOKEN_SERVER_PORT_STR)
00154 #   define ACE_DEFAULT_TOKEN_SERVER_PORT_STR "20007"
00155 # endif /* ACE_DEFAULT_TOKEN_SERVER_PORT_STR */
00156 
00157 // Used for the logging server.
00158 # if !defined (ACE_DEFAULT_LOGGING_SERVER_PORT)
00159 #   define ACE_DEFAULT_LOGGING_SERVER_PORT 20008
00160 # endif /* ACE_DEFAULT_LOGGING_SERVER_PORT */
00161 
00162 # if !defined (ACE_DEFAULT_LOGGING_SERVER_PORT_STR)
00163 #   define ACE_DEFAULT_LOGGING_SERVER_PORT_STR "20008"
00164 # endif /* ACE_DEFAULT_LOGGING_SERVER_PORT_STR */
00165 
00166 // Used for the logging server.
00167 # if !defined (ACE_DEFAULT_THR_LOGGING_SERVER_PORT)
00168 #   define ACE_DEFAULT_THR_LOGGING_SERVER_PORT 20008
00169 # endif /* ACE_DEFAULT_THR_LOGGING_SERVER_PORT */
00170 
00171 # if !defined (ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR)
00172 #   define ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR "20008"
00173 # endif /* ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR */
00174 
00175 // Used for the time server.
00176 # if !defined (ACE_DEFAULT_TIME_SERVER_PORT)
00177 #   define ACE_DEFAULT_TIME_SERVER_PORT 20009
00178 # endif /* ACE_DEFAULT_TIME_SERVER_PORT */
00179 
00180 # if !defined (ACE_DEFAULT_TIME_SERVER_PORT_STR)
00181 #   define ACE_DEFAULT_TIME_SERVER_PORT_STR "20009"
00182 # endif /* ACE_DEFAULT_TIME_SERVER_PORT_STR */
00183 
00184 # if !defined (ACE_DEFAULT_TIME_SERVER_STR)
00185 #   define ACE_DEFAULT_TIME_SERVER_STR "ACE_TS_TIME"
00186 # endif /* ACE_DEFAULT_TIME_SERVER_STR */
00187 
00188 // Used by the FIFO tests and the Client_Logging_Handler netsvc.
00189 # if !defined (ACE_DEFAULT_RENDEZVOUS)
00190 #   if defined (ACE_HAS_STREAM_PIPES)
00191 #     define ACE_DEFAULT_RENDEZVOUS ACE_LIB_TEXT("/tmp/fifo.ace")
00192 #   else
00193 #     define ACE_DEFAULT_RENDEZVOUS ACE_LIB_TEXT("localhost:20010")
00194 #   endif /* ACE_HAS_STREAM_PIPES */
00195 # endif /* ACE_DEFAULT_RENDEZVOUS */
00196 
00197 // Used for the UNIX syslog logging interface to ACE_Log_Msg.
00198 # ifndef ACE_DEFAULT_SYSLOG_FACILITY
00199 # define ACE_DEFAULT_SYSLOG_FACILITY LOG_USER
00200 # endif /* ACE_DEFAULT_SYSLOG_FACILITY */
00201 
00202 # if !defined (ACE_DEFAULT_LOGGER_KEY)
00203 
00204 #     if defined (ACE_HAS_STREAM_PIPES)
00205 #       define ACE_DEFAULT_LOGGER_KEY ACE_LIB_TEXT ("/tmp/server_daemon")
00206 #     else
00207 #       define ACE_DEFAULT_LOGGER_KEY ACE_LIB_TEXT ("localhost:20012")
00208 #     endif /* ACE_HAS_STREAM_PIPES */
00209 # endif /* ACE_DEFAULT_LOGGER_KEY */
00210 
00211 // The way to specify the local host for loopback IP. This is usually
00212 // "localhost" but it may need changing on some platforms.
00213 # if !defined (ACE_LOCALHOST)
00214 #   define ACE_LOCALHOST ACE_LIB_TEXT ("localhost")
00215 # endif
00216 
00217 # if !defined (ACE_DEFAULT_SERVER_HOST)
00218 #   define ACE_DEFAULT_SERVER_HOST ACE_LOCALHOST
00219 # endif /* ACE_DEFAULT_SERVER_HOST */
00220 
00221 // Default shared memory key
00222 # if !defined (ACE_DEFAULT_SHM_KEY)
00223 #   define ACE_DEFAULT_SHM_KEY 1234
00224 # endif /* ACE_DEFAULT_SHM_KEY */
00225 
00226 // Default segment size used by SYSV shared memory (128 K)
00227 # if !defined (ACE_DEFAULT_SEGMENT_SIZE)
00228 #   define ACE_DEFAULT_SEGMENT_SIZE 1024 * 128
00229 # endif /* ACE_DEFAULT_SEGMENT_SIZE */
00230 
00231 // Maximum number of SYSV shared memory segments
00232 // (does anyone know how to figure out the right values?!)
00233 # if !defined (ACE_DEFAULT_MAX_SEGMENTS)
00234 #   define ACE_DEFAULT_MAX_SEGMENTS 6
00235 # endif /* ACE_DEFAULT_MAX_SEGMENTS */
00236 
00237 // Name of the map that's stored in shared memory.
00238 # if !defined (ACE_NAME_SERVER_MAP)
00239 #   define ACE_NAME_SERVER_MAP "Name Server Map"
00240 # endif /* ACE_NAME_SERVER_MAP */
00241 
00242 // Default file permissions.
00243 # if !defined (ACE_DEFAULT_FILE_PERMS)
00244 #   if defined (ACE_WIN32)
00245 #     if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 == 1)
00246 #       define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE | \
00247                                        FILE_SHARE_DELETE)
00248 #     else
00249 #       define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE)
00250 #     endif /* ACE_HAS_WINNT4 */
00251 #   elif defined (VXWORKS)
00252 #     define ACE_DEFAULT_FILE_PERMS (S_IRUSR | S_IWUSR| S_IRGRP| S_IROTH)
00253 #   else
00254 #     define ACE_DEFAULT_FILE_PERMS 0644
00255 #   endif /* ACE_WIN32 */
00256 # endif /* ACE_DEFAULT_FILE_PERMS */
00257 
00258 // Default directory permissions.
00259 # if !defined (ACE_DEFAULT_DIR_PERMS)
00260 #   define ACE_DEFAULT_DIR_PERMS 0755
00261 # endif /* ACE_DEFAULT_DIR_PERMS */
00262 
00263 # if !defined (ACE_DEFAULT_TIMEPROBE_TABLE_SIZE)
00264 #   define ACE_DEFAULT_TIMEPROBE_TABLE_SIZE 8 * 1024
00265 # endif /* ACE_DEFAULT_TIMEPROBE_TABLE_SIZE */
00266 
00267 // Default size of the ACE Map_Manager.
00268 # if !defined (ACE_DEFAULT_MAP_SIZE)
00269 #   define ACE_DEFAULT_MAP_SIZE 1024
00270 # endif /* ACE_DEFAULT_MAP_SIZE */
00271 
00272 // Defaults for ACE Timer Wheel
00273 # if !defined (ACE_DEFAULT_TIMER_WHEEL_SIZE)
00274 #   define ACE_DEFAULT_TIMER_WHEEL_SIZE 1024
00275 # endif /* ACE_DEFAULT_TIMER_WHEEL_SIZE */
00276 
00277 # if !defined (ACE_DEFAULT_TIMER_WHEEL_RESOLUTION)
00278 #   define ACE_DEFAULT_TIMER_WHEEL_RESOLUTION 100
00279 # endif /* ACE_DEFAULT_TIMER_WHEEL_RESOLUTION */
00280 
00281 // Default size for ACE Timer Hash table
00282 # if !defined (ACE_DEFAULT_TIMER_HASH_TABLE_SIZE)
00283 #   define ACE_DEFAULT_TIMER_HASH_TABLE_SIZE 1024
00284 # endif /* ACE_DEFAULT_TIMER_HASH_TABLE_SIZE */
00285 
00286 // Defaults for the ACE Free List
00287 # if !defined (ACE_DEFAULT_FREE_LIST_PREALLOC)
00288 #   define ACE_DEFAULT_FREE_LIST_PREALLOC 0
00289 # endif /* ACE_DEFAULT_FREE_LIST_PREALLOC */
00290 
00291 # if !defined (ACE_DEFAULT_FREE_LIST_LWM)
00292 #   define ACE_DEFAULT_FREE_LIST_LWM 0
00293 # endif /* ACE_DEFAULT_FREE_LIST_LWM */
00294 
00295 # if !defined (ACE_DEFAULT_FREE_LIST_HWM)
00296 #   define ACE_DEFAULT_FREE_LIST_HWM 25000
00297 # endif /* ACE_DEFAULT_FREE_LIST_HWM */
00298 
00299 # if !defined (ACE_DEFAULT_FREE_LIST_INC)
00300 #   define ACE_DEFAULT_FREE_LIST_INC 100
00301 # endif /* ACE_DEFAULT_FREE_LIST_INC */
00302 
00303 # if !defined (ACE_UNIQUE_NAME_LEN)
00304 #   define ACE_UNIQUE_NAME_LEN 100
00305 # endif /* ACE_UNIQUE_NAME_LEN */
00306 
00307 # if !defined (ACE_MAX_DGRAM_SIZE)
00308    // This is just a guess.  8k is the normal limit on
00309    // most machines because that's what NFS expects.
00310 #   define ACE_MAX_DGRAM_SIZE 8192
00311 # endif /* ACE_MAX_DGRAM_SIZE */
00312 
00313 # if !defined (ACE_DEFAULT_ARGV_BUFSIZ)
00314 #   define ACE_DEFAULT_ARGV_BUFSIZ 1024 * 4
00315 # endif /* ACE_DEFAULT_ARGV_BUFSIZ */
00316 
00317 // A free list which create more elements when there aren't enough
00318 // elements.
00319 # define ACE_FREE_LIST_WITH_POOL 1
00320 
00321 // A simple free list which doen't allocate/deallocate elements.
00322 # define ACE_PURE_FREE_LIST 2
00323 
00324 
00325 # if defined (ACE_WIN32)
00326 
00327 #define ACE_MAX_USERID 32
00328 
00329 // This is necessary to work around bugs with Win32 non-blocking
00330 // connects...
00331 #   if !defined (ACE_NON_BLOCKING_BUG_DELAY)
00332 #     define ACE_NON_BLOCKING_BUG_DELAY 35000
00333 #   endif /* ACE_NON_BLOCKING_BUG_DELAY */
00334 # endif /*ACE_WIN32*/
00335 
00336 // Max size of an ACE Log Record data buffer.  This can be reset in
00337 // the config.h file if you'd like to increase or decrease the size.
00338 # if !defined (ACE_MAXLOGMSGLEN)
00339 #   define ACE_MAXLOGMSGLEN 4 * 1024
00340 # endif /* ACE_MAXLOGMSGLEN */
00341 
00342 // Max size of an ACE Token.
00343 # define ACE_MAXTOKENNAMELEN 40
00344 
00345 // Max size of an ACE Token client ID.
00346 # define ACE_MAXCLIENTIDLEN MAXHOSTNAMELEN + 20
00347 
00348 /**
00349  * @name Default values to control CDR classes memory allocation strategies
00350  */
00351 //@{
00352 
00353 /// Control the initial size of all CDR buffers, application
00354 /// developers may want to optimize this value to fit their request
00355 /// size
00356 #if !defined (ACE_DEFAULT_CDR_BUFSIZE)
00357 #  define ACE_DEFAULT_CDR_BUFSIZE 512
00358 #endif /* ACE_DEFAULT_CDR_BUFSIZE */
00359 
00360 /// Stop exponential growth of CDR buffers to avoid overallocation
00361 #if !defined (ACE_DEFAULT_CDR_EXP_GROWTH_MAX)
00362 #  define ACE_DEFAULT_CDR_EXP_GROWTH_MAX 65536
00363 #endif /* ACE_DEFAULT_CDR_EXP_GROWTH_MAX */
00364 
00365 /// Control CDR buffer growth after maximum exponential growth is
00366 /// reached
00367 #if !defined (ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK)
00368 #  define ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK 65536
00369 #endif /* ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK */
00370 //@}
00371 
00372 /// Control the zero-copy optimizations for octet sequences
00373 /**
00374  * Large octet sequences can be sent without any copies by chaining
00375  * them in the list of message blocks that represent a single CDR
00376  * stream.  However, if the octet sequence is too small the zero copy
00377  * optimizations actually hurt performance.  Octet sequences smaller
00378  * than this value will be copied.
00379  */
00380 #if !defined (ACE_DEFAULT_CDR_MEMCPY_TRADEOFF)
00381 #define ACE_DEFAULT_CDR_MEMCPY_TRADEOFF 256
00382 #endif /* ACE_DEFAULT_CDR_MEMCPY_TRADEOFF */
00383 
00384 #include "ace/post.h"
00385 #endif /*ACE_DEFAULT_CONSTANTS_H*/

Generated on Mon Jun 16 11:19:33 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002