XTA: API Reference for C language

lixa_config.h File Reference
#include <config.h>
#include "lixa_inst_conf.h"
Include dependency graph for lixa_config.h:

Go to the source code of this file.

Data Structures

union  lixa_job_u
 

Macros

#define LIXA_JOB_RAW_LEN
 
#define LIXA_JOB_SOURCE_IP_LEN   15
 
#define LIXA_TRACE_MODULE   LIXA_TRACE_MOD_COMMON_CONFIG
 
#define LIXA_TRACE_MODULE   LIXA_TRACE_MODULE_SAVE
 
#define LIXA_TRACE_MODULE_SAVE   LIXA_TRACE_MODULE
 
#define MD5_DIGEST_LENGTH   16
 

Typedefs

typedef union lixa_job_u lixa_job_t
 
typedef char md5_digest_hex_t [MD5_DIGEST_LENGTH *2+1]
 
typedef guint8 md5_digest_t [MD5_DIGEST_LENGTH]
 

Functions

int lixa_config_digest (int fd, const char *profile, md5_digest_hex_t digest)
 
int lixa_config_retrieve_domain (xmlNode *cur_node, int *domain)
 
int lixa_config_retrieve_generic_long (xmlNode *cur_node, const xmlChar *property, long *value)
 
int lixa_config_retrieve_port (xmlNode *cur_node, in_port_t *port)
 
static const char * lixa_job_get_raw (const lixa_job_t *job)
 
static void lixa_job_reset (lixa_job_t *job)
 
static void lixa_job_set_config_digest (lixa_job_t *job, const char *config_digest)
 
int lixa_job_set_raw (lixa_job_t *job, const char *raw_job)
 
int lixa_job_set_source_ip (lixa_job_t *job, int fd)
 

Variables

const char * LIXA_NULL_STRING
 
const xmlChar * LIXA_XML_CONFIG_ADDRESS_PROPERTY
 
const xmlChar * LIXA_XML_CONFIG_CLIENT
 
const xmlChar * LIXA_XML_CONFIG_CLIENT_CONNECTION_TIMEOUT
 
const xmlChar * LIXA_XML_CONFIG_DOMAIN_AF_INET_VALUE
 
const xmlChar * LIXA_XML_CONFIG_DOMAIN_PROPERTY
 
const xmlChar * LIXA_XML_CONFIG_LISTENER
 
const xmlChar * LIXA_XML_CONFIG_MANAGER
 
const xmlChar * LIXA_XML_CONFIG_MANAGER_STATUS
 
const xmlChar * LIXA_XML_CONFIG_NAME_PROPERTY
 
const xmlChar * LIXA_XML_CONFIG_PORT_PROPERTY
 
const xmlChar * LIXA_XML_CONFIG_PROFILE
 
const xmlChar * LIXA_XML_CONFIG_PROFILE_PROPERTY
 
const xmlChar * LIXA_XML_CONFIG_PROFILES
 
const xmlChar * LIXA_XML_CONFIG_RSRMGR
 
const xmlChar * LIXA_XML_CONFIG_RSRMGRS
 
const xmlChar * LIXA_XML_CONFIG_SERVER
 
const xmlChar * LIXA_XML_CONFIG_SERVER_MAX_EST
 
const xmlChar * LIXA_XML_CONFIG_SERVER_MIN_EST
 
const xmlChar * LIXA_XML_CONFIG_SERVER_PID
 
const xmlChar * LIXA_XML_CONFIG_STTSRV
 
const xmlChar * LIXA_XML_CONFIG_STTSRVS
 
const xmlChar * LIXA_XML_CONFIG_SWITCH_FILE_PROPERTY
 
const xmlChar * LIXA_XML_CONFIG_XA_CLOSE_INFO_PROPERTY
 
const xmlChar * LIXA_XML_CONFIG_XA_OPEN_INFO_PROPERTY
 

Macro Definition Documentation

#define LIXA_JOB_RAW_LEN
Value:
(MD5_DIGEST_LENGTH * 2 + 1 + \
#define LIXA_JOB_SOURCE_IP_LEN
Definition: lixa_config.h:69
#define MD5_DIGEST_LENGTH
Definition: lixa_config.h:62

All the job string length

Definition at line 76 of file lixa_config.h.

Referenced by lixa_job_reset().

#define LIXA_JOB_SOURCE_IP_LEN   15

IP address len: 3 + 1 + 3 + 1 + 3 + 1 + 3

Definition at line 69 of file lixa_config.h.

#define LIXA_TRACE_MODULE   LIXA_TRACE_MOD_COMMON_CONFIG

Definition at line 361 of file lixa_config.h.

#define LIXA_TRACE_MODULE   LIXA_TRACE_MODULE_SAVE

Definition at line 361 of file lixa_config.h.

#define LIXA_TRACE_MODULE_SAVE   LIXA_TRACE_MODULE

Definition at line 52 of file lixa_config.h.

#define MD5_DIGEST_LENGTH   16

Number of bytes necessary to store an MD5 digest

Definition at line 62 of file lixa_config.h.

Referenced by lixa_job_set_config_digest(), and xta_transaction_redigest().

Typedef Documentation

typedef union lixa_job_u lixa_job_t

This type is defined because lixa_job_u must be used as an opaque object

Definition at line 237 of file lixa_config.h.

typedef char md5_digest_hex_t[MD5_DIGEST_LENGTH *2+1]

This type is used to store an hex printable MD5 digest

Definition at line 215 of file lixa_config.h.

typedef guint8 md5_digest_t[MD5_DIGEST_LENGTH]

This type is used to store a binary raw MD5 digest

Definition at line 211 of file lixa_config.h.

Function Documentation

int lixa_config_digest ( int  fd,
const char *  profile,
md5_digest_hex_t  digest 
)

Compute the digest of the file associated to a passed file descriptor

Parameters
fdIN file descriptor
profileIN the string containing the profile assigned to the process
digestOUT computed digest
Returns
a standardized return code
int lixa_config_retrieve_domain ( xmlNode *  cur_node,
int *  domain 
)

Retrieve the value of the "domain" property from configuration

Parameters
cur_nodeIN a valid node of the XML tree
domainOUT the domain value retrieved by the function
Returns
a standardized return code
int lixa_config_retrieve_generic_long ( xmlNode *  cur_node,
const xmlChar *  property,
long *  value 
)

Retrieve a generic long value for a specified label from configuration

Parameters
cur_nodeIN a valid node of the XML tree
propertyIN the label associated to the property that must be retrieved
valueOUT the value associated to property
Returns
a standardized return code (LIXA_RC_OBJ_NOT_FOUND) if the property is not available in config
int lixa_config_retrieve_port ( xmlNode *  cur_node,
in_port_t *  port 
)

Retrieve the value of the "port" property from configuration

Parameters
cur_nodeIN a valid node of the XML tree
portOUT the domain value retrieved by the function
Returns
a standardized return code
static const char* lixa_job_get_raw ( const lixa_job_t job)
inlinestatic

Retrieve the raw string of the job; the object must initialized with lixa_job_reset before this method can be called!

Parameters
jobIN reference to object
Returns
the raw job string

Definition at line 311 of file lixa_config.h.

References lixa_job_u::raw.

Referenced by xta_transaction_redigest().

static void lixa_job_reset ( lixa_job_t job)
inlinestatic

Reset the content of the object

Parameters
jobIN/OUT reference to object

Definition at line 299 of file lixa_config.h.

References LIXA_JOB_RAW_LEN, and lixa_job_u::raw.

Referenced by xta_transaction_redigest().

static void lixa_job_set_config_digest ( lixa_job_t job,
const char *  config_digest 
)
inlinestatic

Set path and profile

Parameters
jobIN/OUT reference to object
config_digestIN config file (lixac_conf.xml) & profile digest
Returns
a standardized return code

Definition at line 333 of file lixa_config.h.

References lixa_job_u::config_digest, lixa_job_u::fields, MD5_DIGEST_LENGTH, and lixa_job_u::terminator.

Referenced by xta_transaction_redigest().

int lixa_job_set_raw ( lixa_job_t job,
const char *  raw_job 
)

Set the job specifying the raw string (this can be used when the job is not computed, but retrieved from an environment var)

Parameters
jobIN/OUT reference to object
raw_jobIN the raw string for job
Returns
a standardized return code
int lixa_job_set_source_ip ( lixa_job_t job,
int  fd 
)

Set source ip

Parameters
jobIN/OUT reference to object
fdIN file descriptor of the socket connected to the server
Returns
a standardized return code

Referenced by xta_transaction_redigest().

Variable Documentation

const char* LIXA_NULL_STRING

NULL string for output messages

const xmlChar* LIXA_XML_CONFIG_ADDRESS_PROPERTY

Label used to specify "address" property

const xmlChar* LIXA_XML_CONFIG_CLIENT

Label used to specify "client" tag

const xmlChar* LIXA_XML_CONFIG_CLIENT_CONNECTION_TIMEOUT

label used to specify "connection_timeout" property in "client" tag

const xmlChar* LIXA_XML_CONFIG_DOMAIN_AF_INET_VALUE

Label used to specify "AF_INET" value for "domain" property

const xmlChar* LIXA_XML_CONFIG_DOMAIN_PROPERTY

Label used to specify "domain" property

const xmlChar* LIXA_XML_CONFIG_LISTENER

Label used to specify "listener" tag

const xmlChar* LIXA_XML_CONFIG_MANAGER

Label used to specify "manager" tag

const xmlChar* LIXA_XML_CONFIG_MANAGER_STATUS

Label used to specify "status_file" property in "manager" tag

const xmlChar* LIXA_XML_CONFIG_NAME_PROPERTY

Label used to specify "name" property

const xmlChar* LIXA_XML_CONFIG_PORT_PROPERTY

Label used to specify "port" property

const xmlChar* LIXA_XML_CONFIG_PROFILE

Label used to specify "profile" tag

const xmlChar* LIXA_XML_CONFIG_PROFILE_PROPERTY

Label used to specify "profile" property in "sttsrv" tag

const xmlChar* LIXA_XML_CONFIG_PROFILES

Label used to specify "profiles" tag

const xmlChar* LIXA_XML_CONFIG_RSRMGR

Label used to specify "rsrmgr" tag

const xmlChar* LIXA_XML_CONFIG_RSRMGRS

Label used to specify "rsrmgrs" tag

const xmlChar* LIXA_XML_CONFIG_SERVER

Label used to specify "server" tag

const xmlChar* LIXA_XML_CONFIG_SERVER_MAX_EST

Label used to specify "max_elapsed_sync_time" property in "server" tag

const xmlChar* LIXA_XML_CONFIG_SERVER_MIN_EST

Label used to specify "min_elapsed_sync_time" property in "server" tag

const xmlChar* LIXA_XML_CONFIG_SERVER_PID

Label used to specify "pid_file" property in "server" tag

const xmlChar* LIXA_XML_CONFIG_STTSRV

Label used to specify "sttsrv" tag

const xmlChar* LIXA_XML_CONFIG_STTSRVS

Label used to specify "sttsrvs" tag

const xmlChar* LIXA_XML_CONFIG_SWITCH_FILE_PROPERTY

Label used to specify "switch_file" property

const xmlChar* LIXA_XML_CONFIG_XA_CLOSE_INFO_PROPERTY

Label used to specify "xa_close_info" property

const xmlChar* LIXA_XML_CONFIG_XA_OPEN_INFO_PROPERTY

Label used to specify "xa_open_info" property


Copyright © 2009-2019, Christian Ferrari tiian@users.sourceforge.net http://www.tiian.org/