TFS Configuration Functions
Collaboration diagram for TFS Configuration Functions:

Functions

RDM_RETCODE rdm_tfsGetOption (RDM_TFS tfs, const char *keyword, char *optValue, size_t bytesIn, size_t *bytesOut)
Get a single TFS option into a string. More...
RDM_RETCODE rdm_tfsGetOptions (RDM_TFS tfs, char *optString, size_t bytesIn, size_t *bytesOut)
Get TFS options. More...
RDM_RETCODE rdm_tfsSetOption (RDM_TFS tfs, const char *keyword, const char *strValue)
Set a single TFS option from a string. More...
RDM_RETCODE rdm_tfsSetOptions (RDM_TFS tfs, const char *optString)
Set TFS options. More...
RDM_RETCODE rdm_tfsGetCapability (RDM_TFS tfs, const char *name, bool *pvalue)
Get a TFS library capability. More...
RDM_RETCODE rdm_tfsSetCertificate (RDM_TFS tfs, const char *certificate)
Set an SSL certificate for an RDM_TFS instance. More...
RDM_RETCODE rdm_tfsSetKey (RDM_TFS tfs, const char *private_key)
Set an SSL private key for an RDM_TFS instance. More...

Detailed Description

The TFS configuration API. The functions here are located in Transactional File Server Interface Library. Linker option:

    -lrdmtfs

Function Documentation

rdm_tfsGetCapability()

RDM_RETCODE rdm_tfsGetCapability ( RDM_TFS tfs,
const char * name,
bool * pvalue
)

#include <rdmtfsapi.h>

Get a TFS library capability.

There are several versions of the TFS library that can be linked with the application. Each library may have different combinations of the above capabilities. This function queries the status of the name capability in the linked TFS library and returns a boolean value.

The list of name options that can be queried are:

name Description
connect Can the TFS connect to a remote TFS
disk Can the TFS support disk-based databases
embed Does the TFS have embed capabilities
inmem Can the TFS support in-memory databases
listen Can the TFS listen for remote connections
local Does the TFS have local capabilities
rdm Does the TFS have RaimaDB client capabilities
shm Can the TFS used shared memory transport
sql Does the TFS have SQL support
tcp Can the TFS use the TCP transport
Return values
sOKAY Normal, successful return.
eINVOPTION Invalid option identifier is specified.
Parameters
[in] tfs A valid RDM_TFS
[in] name single option keyword
[out] pvalue option value in string

rdm_tfsGetOption()

RDM_RETCODE rdm_tfsGetOption ( RDM_TFS tfs,
const char * keyword,
char * optValue,
size_t bytesIn,
size_t * bytesOut
)

#include <rdmtfsapi.h>

Get a single TFS option into a string.

This function retrieves a single runtime TFS option into a string value. The keyword parameter accepts the key for the option to get. The options are inherited by the database and/or SQL handles derived from this TFS handle.

Options are defined using keys or properties. Every key has a name and a value, delimited by an equals sign (=). The key name appears to the left of the equals sign. Key names are not case-sensitive. Unless otherwise noted, values are not case-sensitive.

Key Value Description
docroot Specify the Document Root directory.
force_ssl Specify if server allows any connection or only SSL
logfilelevel The log severity to use when writing to logfile.
logerrlevel The log severity to use when writing to stderr.
logcategory The log categories to use.
logfile Log File Spec
listen Enable the listener for remote TFS connections.
readonly Read-only mode for TFS.
sharedmem Enable shared memory communication protocol.
tcp Enable TCP/IP communication protocol.
name Specify TCP/IP port or shared memory protocol name.
keep_alive_on Enable TCP keepalives for tcp communication.
tos Enable ToS
disable_rest_api Disable REST API
client_io Client I/O mode for TFS
Return values
sOKAY Normal, successful return.
eINVOPTION Invalid option identifier is specified.
eRANGE Numeric value out of range.
See also
rdm_tfsSetOption
rdm_rdmAllocTFS
rdm_tfsGetEncrypt
rdm_tfsGetOptions
rdm_tfsSetOptions
rdm_tfsFree
Parameters
[in] tfs A valid RDM_TFS
[in] keyword single option keyword
[out] optValue option value in string
[in] bytesIn # of bytes for pszValue
[out] bytesOut A pointer to the number of bytes returned in optValue (can be NULL)

rdm_tfsGetOptions()

RDM_RETCODE rdm_tfsGetOptions ( RDM_TFS tfs,
char * optString,
size_t bytesIn,
size_t * bytesOut
)

#include <rdmtfsapi.h>

Get TFS options.

The function returns a semicolon-delimited list of options in the pair of keyword and value for the options specified in optString.

optString should be a list of option values. If optString is NULL, the function returns the pairs for all available options. If\ optString is an empty string, the function returns an empty string.

Options are defined using keys or properties. Every key has a name and a value, delimited by an equals sign (=). The key name appears to the left of the equals sign. Key names are not case-sensitive. Unless otherwise noted, values are not case-sensitive.

Key Value Description
docroot Specify the Document Root directory.
force_ssl Specify if server allows any connection or only SSL
logfilelevel The log severity to use when writing to logfile.
logerrlevel The log severity to use when writing to stderr.
logcategory The log categories to use.
logfile Log File Spec
listen Enable the listener for remote TFS connections.
readonly Read-only mode for TFS.
sharedmem Enable shared memory communication protocol.
tcp Enable TCP/IP communication protocol.
name Specify TCP/IP port or shared memory protocol name.
keep_alive_on Enable TCP keepalives for tcp communication.
tos Enable ToS
disable_rest_api Disable REST API
client_io Client I/O mode for TFS
Return values
sOKAY Normal, successful return.
eINVOPTION Invalid option identifier is specified.
eRANGE Numeric value out of range.
See also
rdm_rdmAllocTFS
rdm_tfsGetOptions
rdm_tfsSetOptions
rdm_tfsFree
Parameters
[in] tfs A valid RDM_TFS
[out] optString option string
[in] bytesIn Number of bytes for optString
[out] bytesOut A pointer to the number of bytes returned in optString (can be NULL)

rdm_tfsSetCertificate()

RDM_RETCODE rdm_tfsSetCertificate ( RDM_TFS tfs,
const char * certificate
)

#include <rdmtfsapi.h>

Set an SSL certificate for an RDM_TFS instance.

Parameters
tfs [in] An allocated RDM_TFS
certificate [in] character string that contains an SSL certificate
Returns
a RaimaDB return code

Set the certificate to be used for any client connecting over a transport to this RDM_TFS instance. The certificate has to match the key set using rdm_tfsSetKey().

The certificate has to be in PEM format, base64 encoded.

The memory buffer for the certificate has to be valid until another certificate is set or the server have shut down.

Return values
sOKAY Normal, successful return.
See also
rdm_tfsSetKey
Examples
core40Example_main.c.

rdm_tfsSetKey()

RDM_RETCODE rdm_tfsSetKey ( RDM_TFS tfs,
const char * private_key
)

#include <rdmtfsapi.h>

Set an SSL private key for an RDM_TFS instance.

Parameters
tfs [in] An allocated RDM_TFS
private_key [in] character string that contains an SSL private key
Returns
a RaimaDB return code

Set the SSL private key to be used on the server side for any client connecting over a transport to this RDM_TFS instance. The key has to match the certificate set using rdm_tfsSetCertificate().

The key has to be in PEM format, base64 encoded.

The memory buffer for the key has to be valid until another key is set or the server have shut down.

Return values
sOKAY Normal, successful return.
See also
rdm_tfsSetCertificate
Examples
core40Example_main.c.

rdm_tfsSetOption()

RDM_RETCODE rdm_tfsSetOption ( RDM_TFS tfs,
const char * keyword,
const char * strValue
)

#include <rdmtfsapi.h>

Set a single TFS option from a string.

This function sets a single TFS option from a string value. The keyword parameter accepts the key for the option to set. The options are inherited by the database and/or SQL handle derived from this TFS handle.

Options are defined using keys or properties. Every key has a name and a value, delimited by an equals sign (=). The key name appears to the left of the equals sign. Key names are not case-sensitive. Unless otherwise noted, values are not case-sensitive.

Key Value Description
docroot Specify the Document Root directory.
force_ssl Specify if server allows any connection or only SSL
logfilelevel The log severity to use when writing to logfile.
logerrlevel The log severity to use when writing to stderr.
logcategory The log categories to use.
logfile Log File Spec
listen Enable the listener for remote TFS connections.
readonly Read-only mode for TFS.
sharedmem Enable shared memory communication protocol.
tcp Enable TCP/IP communication protocol.
name Specify TCP/IP port or shared memory protocol name.
keep_alive_on Enable TCP keepalives for tcp communication.
tos Enable ToS
disable_rest_api Disable REST API
client_io Client I/O mode for TFS
Return values
sOKAY Normal, successful return.
eINVOPTION Invalid option identifier is specified.
eINVOPTIONVALUE Invalid option value.
See also
rdm_rdmAllocTFS
rdm_tfsGetOption
rdm_tfsSetOptions
Parameters
[in] tfs A valid RDM_TFS
[in] keyword Single option keyword
[in] strValue option value in string
Examples
core40Example_main.c, cpp55Example_main.cpp, and learn/bookStore_vxWorks7.c.

rdm_tfsSetOptions()

RDM_RETCODE rdm_tfsSetOptions ( RDM_TFS tfs,
const char * optString
)

#include <rdmtfsapi.h>

Set TFS options.

This function is used to set any RaimaDB TFS options. The optString is a key/value pair in the form of "key=value". The options are inherited by the database and/or SQL handle derived from this TFS handle.

Options are defined using keys or properties. Every key has a name and a value, delimited by an equals sign (=). The key name appears to the left of the equals sign. Key names are not case-sensitive. Unless otherwise noted, values are not case-sensitive.

Key Value Description
docroot Specify the Document Root directory.
force_ssl Specify if server allows any connection or only SSL
logfilelevel The log severity to use when writing to logfile.
logerrlevel The log severity to use when writing to stderr.
logcategory The log categories to use.
logfile Log File Spec
listen Enable the listener for remote TFS connections.
readonly Read-only mode for TFS.
sharedmem Enable shared memory communication protocol.
tcp Enable TCP/IP communication protocol.
name Specify TCP/IP port or shared memory protocol name.
keep_alive_on Enable TCP keepalives for tcp communication.
tos Enable ToS
disable_rest_api Disable REST API
client_io Client I/O mode for TFS
Return values
sOKAY Normal, successful return.
eINVOPTION Invalid option identifier is specified.
eINVOPTIONVALUE Invalid option value.
See also
rdm_rdmAllocTFS
rdm_tfsSetOption
rdm_tfsGetOptions
Parameters
[in] tfs A valid TFS handle
[in] optString The option string
Examples
core38Example_main.c.