Server properties are stored in a CS_CONTEXT structure. An application sets or retrieves server properties using the Server-Library routine srv_props.
Server properties determine many aspects of an Open Server application’s behavior, including its memory-allocation routines, and the maximum number of physical network connections it can establish.
For server properties to take effect, an application must set them prior to initialization. Open Server raises an error if a server property is set following initialization.
An application’s initialization code must include these steps:
Allocate a CS_CONTEXT structure, through a call to cs_ctx_alloc.
Call srv_version to set the Open Server version number. srv_version takes a pointer to a CS_CONTEXT structure.
Call srv_props to set property defaults.
Call srv_init to initialize the server.
Start the server running with a call to srv_run.
Some properties can be set and retrieved, while others are set-only or retrieve-only. srv_props provides this information.
Property name |
Definition |
Notes |
---|---|---|
SRV_S_ALLOCFUNC |
The address of the routine Open Server will use to allocate memory. |
|
SRV_S_APICHK |
A Boolean indicating whether to enable (CS_TRUE) or disable (CS_FALSE) the validation of Server-Library arguments and state checking. |
Many Server-Library routines internally call CS-Library routines. For this reason, application programmers who want thorough argument and state checking should set the cs_config property CS_NOAPICHK to CS_FALSE. |
SRV_S_ATTNREASON |
The reason an Open Server application’s attention handler was called. |
Returns SRV_ATTENTION if a client attention triggered the SRV_ATTENTION event, and SRV_DISCONNECT if a client disconnect triggered the event. |
SRV_S_CERT_AUTH |
CS_CHAR Specify the path to the file containing trusted CA certificates. |
|
SRV_S_CURTHREAD |
The address of the active thread’s internal control structure. |
|
SRV_S_DEFQUEUESIZE |
Deferred event queue size. |
|
SRV_S_DISCONNECT |
Set this property to CS_TRUE to call an application’s SRV_ATTENTION event handler when a client disconnects. |
The SRV_ATTENTION event handler can be called at interrupt level, if the client disconnect is detected at interrupt time. |
SRV_S_DS_PROVIDER |
The directory service provider name. The default value is platform specific. See the Open Client and Open Server Configuration Guide for your platform. |
|
SRV_S_DS_REGISTER |
Set to CS_TRUE to indicate that Server-Library should register itself with a directory at start-up. Set to CS_FALSE to prevent registration. |
|
SRV_S_ERRHANDLE |
The address of the Open Server error handler. |
|
SRV_S_FREEFUNC |
The address of the routine Open Server uses to free memory. |
|
SRV_S_IFILE |
The name of the interfaces file available for use by Open Server. |
|
SRV_S_LOGFILE |
The name of the log file Open Server writes to. |
|
SRV_S_LOGSIZE |
The maximum size of the log file. If the log exceeds this size, Open Server will move the current contents of the log file to another file with the name currentfilename_old and will truncate the current log to 0 bytes. |
|
SRV_S_MSGPOOL |
The number of messages available to an Open Server application at runtime. |
Open Server applications use messages through srv_putmsgq. A message remains in use until it is received through srv_getmsgq. The value of an application’s SRV_S_MSGPOOL configuration parameter should be based on its use of these two routines. |
SRV_S_NETBUFSIZE |
The maximum size of the network I/O buffer to be used by client connections. |
The actual size of the network buffer used is determined at login time. If a smaller size is requested, Open Server does not resize the memory buffer. It leaves part of it unused. For this reason, do not make this value larger than required or memory will be allocated that will not be used. |
SRV_S_NETTRACEFILE |
Net-Library tracing written to this file. |
|
SRV_S_NUMCONNECTIONS |
The maximum number of physical network connections the Open Sever application will accept. |
A server-to-server connection is only one physical connection, regardless of how many subchannels are used. |
SRV_S_NUMMSGQUEUES |
The number of message queues available to the Open Server application. |
|
SRV_S_NUMMUTEXES |
The number of mutual exclusion semaphores available to the Open Server application. |
|
SRV_S_NUMREMBUF |
The window size used on server-to-server connections. It indicates the maximum number of packets that can be outstanding on a logical subchannel before an acknowledgment is required. |
|
SRV_S_NUMREMSITES |
The maximum number of remote server site handlers that can be active at a given time. |
|
SRV_S_NUMTHREADS |
The maximum number of threads available to an Open Server application. |
|
SRV_S_NUMUSEREVENTS |
The number of user events an application can define. |
|
SRV_S_PREEMPT |
A Boolean. If CS_TRUE, Open Server will use preemptive scheduling. If CS_FALSE, Open Server uses non-preemptive scheduling. |
Preemptive scheduling is not available on all platforms. Use srv_capability to determine whether it is available. |
SRV_S_REALLOCFUNC |
The address of the routine Open Server uses to reallocate memory. |
|
SRV_S_REQUEST_CAP |
The default client requests that the Open Server application accepts. |
See “Capabilities”. |
SRV_S_RESPONSE_CAP |
The default responses to the client that the Open Server application supports. |
See “Capabilities”. |
SRV_S_RETPARMS |
Return parameters are sent if an error occurs during execution |
This server property can be used to limit the behavior to specific threads by using the default (false). |
SRV_S_SEC_KEYTAB |
The keytab file name (including the path name) for use with the DCE security driver. |
You can specify a principal other than the currently logged-in user who is running the application. The property SRV_S_SEC_PRINCIPAL sets the principal name. The DCE utility dcecp allows you to create a keytab file. The keytab file is an ordinary UNIX file, so you need to set permissions on the file to restrict access. The file must be readable by the user who starts the Open Server application. See “Security services” for more information. |
SRV_S_SEC_PRINCIPAL |
The principal name to use when acquiring credentials for the Open Server application. The value of this property defaults to the Open Server application’s network name, which can be specified through srv_init. |
See “Security services” for more information. |
SRV_S_SERVERNAME |
The name of the Open Server application. |
This is the name the Open Server application is known by when it is up and running. It is also the name used to look up its listen address in the interfaces file. |
SRV_S_SSL_CIPHER |
Comma-separated list of CipherSuite names. |
|
SRV_S_SSL_LOCAL_ID |
A structure containing a file name and a password used to decrypt the information in the file. |
. |
SRV_S_SSL_REQUEST_ CLIENT_CERT |
Requires that the client provide a certificate to log in to an Open Server application. |
|
SRV_S_SSL_VERSION |
Must be one of a list of defined values. |
The defined values are:
Adaptive Server only accepts connections using the default, CS_SSLVER_TLS1. |
SRV_S_STACKSIZE |
The size of the stack allocated for each thread. |
|
SRV_S_TDSVERSION |
The Tabular Data Stream protocol version that Open Server uses to negotiate all client connections. |
See “SRV_S_TDSVERSION” for a list of values. |
SRV_S_TIMESLICE |
The number of clock ticks an active thread consumes before the time slice callback routine is called. |
See the srv_callback reference page for information on time slice callbacks. |
SRV_S_TRACEFLAG |
The type of tracing desired. |
See “SRV_S_TRACEFLAG” for a list of flags. |
SRV_S_TRUNCATELOG |
A Boolean. If CS_TRUE, Open Server truncates the log file during start-up. |
|
SRV_S_USERVLANG |
A Boolean. If CS_TRUE, the Open Server application’s native language is used for error messages. If CS_FALSE, the client’s national language is used for error messages. |
|
SRV_S_VERSION |
A character string that contains the name, version date, and copyright information of the Open Server Server-Library in use. |
|
SRV_S_VIRTCLKRATE |
The clock rate, in microseconds, per tick. |
|
SRV_S_VIRTIMER |
A Boolean. If CS_TRUE, the virtual timer is enabled. If CS_FALSE, the virtual timer is disabled. |