Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

lcmaps_setup.h File Reference

library to setup LCMAPS environment More...

Go to the source code of this file.

Defines

#define LCMAPS_SETUP_ERROR_OPEN   1
#define LCMAPS_SETUP_ERROR_READ   2
#define LCMAPS_SETUP_ERROR_READ_SIZE   3
#define LCMAPS_SETUP_ERROR_CLOSE   4
#define LCMAPS_SETUP_ERROR_PARSE   5
#define LCMAPS_SETUP_ERROR_ARGUMENT   6

Functions

LCMAPS_SETUP_C_STORAGE_CLASS
int 
lcmaps_setup (const char *config_file)
 Setup of the LCMAPS environment.


Detailed Description

library to setup LCMAPS environment

Author:
Martijn Steenbakkers for the EU DataGrid.
This file contains the routines to setup the LCMAPS environment. The procedure is as follows: 1. If a configuration file is given, parameters will be read from there and the corresponding environment variables will be set. 2. Variables that are not set in the configuration file, but that are set already as an environment variable will be left untouched. 3. Variables that are not set in the configuration file and that are not set in the environment yet, will be set to (sensible) default values and the corresponding environment variables will be set.

Definition in file lcmaps_setup.h.


Define Documentation

#define LCMAPS_SETUP_ERROR_ARGUMENT   6
 

Error in parameters in configuration file

Definition at line 52 of file lcmaps_setup.h.

Referenced by lcmaps_setup().

#define LCMAPS_SETUP_ERROR_CLOSE   4
 

Error closing configuration file

Definition at line 50 of file lcmaps_setup.h.

Referenced by lcmaps_setup().

#define LCMAPS_SETUP_ERROR_OPEN   1
 

Error opening configuration file

Definition at line 47 of file lcmaps_setup.h.

Referenced by lcmaps_setup().

#define LCMAPS_SETUP_ERROR_PARSE   5
 

Error parsing configuration file

Definition at line 51 of file lcmaps_setup.h.

Referenced by lcmaps_setup().

#define LCMAPS_SETUP_ERROR_READ   2
 

Error reading configuration file

Definition at line 48 of file lcmaps_setup.h.

Referenced by lcmaps_setup().

#define LCMAPS_SETUP_ERROR_READ_SIZE   3
 

Error reading too large configuration file

Definition at line 49 of file lcmaps_setup.h.

Referenced by lcmaps_setup().


Function Documentation

LCMAPS_SETUP_C_STORAGE_CLASS int lcmaps_setup const char *  config_file  ) 
 

Setup of the LCMAPS environment.

This function sets the following environment variables:

  1. LCMAPS_LOG_FILE: Name and location of the logfile
  2. LCMAPS_LOG_TYPE: Type of logging (logfile, syslog, both or none)
  3. LCMAPS_LOG_STRING: Log string to be prepended to the logging lines
  4. LCMAPS_DB_FILE: Name of the lcmaps policy file
  5. LCMAPS_DEBUG_LEVEL: Debug level (0-5)
  6. LCMAPS_MOD_DIR: Location of the LCMAPS library
  7. LCMAPS_DIR: Location of the LCMAPS config files
  8. LCMAPS_ETC_DIR: Location of the LCMAPS config files (=LCMAPS_DIR)
  9. LCMAPS_POLICY_STRING The list of policies (default = NULL)
  10. LCMAPS_POLICY_ACQ_STRING The list of acquisition policies (default = acquisition_policy)
  11. LCMAPS_POLICY_ENF_STRING The list of enforcement policies (default = enforcement_policy)

Parameters:
config_file name of the configuration file that contains the parameters to be read
Return values:
0 setup succeeded.
1 setup failed.

Definition at line 167 of file lcmaps_setup.c.

References DO_SYSLOG, DO_USRLOG, lcmaps_genfilename(), LCMAPS_MAXARGS, LCMAPS_SETUP_ERROR_ARGUMENT, LCMAPS_SETUP_ERROR_CLOSE, LCMAPS_SETUP_ERROR_OPEN, LCMAPS_SETUP_ERROR_PARSE, LCMAPS_SETUP_ERROR_READ, LCMAPS_SETUP_ERROR_READ_SIZE, and lcmaps_tokenize().


Generated on Sun May 29 21:22:12 2005 for lcmaps by doxygen 1.3.5