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

Context


Defines

#define EDG_WLL_SOURCE_WM_PROXY   EDG_WLL_SOURCE_NETWORK_SERVER
#define EDG_WLL_SEQ_NORMAL   1
#define EDG_WLL_SEQ_DUPLICATE   11
#define EDG_WLL_SEQ_BIGHELPER_INITIAL   "UI=2:NS=0:WM=0:BH=1:JSS=0:LM=0:LRMS=0:APP=0"

Typedefs

typedef _edg_wll_Context * edg_wll_Context
typedef enum _edg_wll_ContextParam edg_wll_ContextParam
typedef enum _edg_wll_QueryResults edg_wll_QueryResults
typedef enum _edg_wll_Source edg_wll_Source
typedef enum _edg_wll_ErrorCode edg_wll_ErrorCode

Enumerations

enum  _edg_wll_ContextParam {
  EDG_WLL_PARAM_HOST, EDG_WLL_PARAM_SOURCE, EDG_WLL_PARAM_INSTANCE, EDG_WLL_PARAM_LEVEL,
  EDG_WLL_PARAM_DESTINATION, EDG_WLL_PARAM_DESTINATION_PORT, EDG_WLL_PARAM_LOG_TIMEOUT, EDG_WLL_PARAM_LOG_SYNC_TIMEOUT,
  EDG_WLL_PARAM_QUERY_SERVER, EDG_WLL_PARAM_QUERY_SERVER_PORT, EDG_WLL_PARAM_QUERY_SERVER_OVERRIDE, EDG_WLL_PARAM_QUERY_TIMEOUT,
  EDG_WLL_PARAM_QUERY_JOBS_LIMIT, EDG_WLL_PARAM_QUERY_EVENTS_LIMIT, EDG_WLL_PARAM_QUERY_RESULTS, EDG_WLL_PARAM_QUERY_CONNECTIONS,
  EDG_WLL_PARAM_NOTIF_SERVER, EDG_WLL_PARAM_NOTIF_SERVER_PORT, EDG_WLL_PARAM_NOTIF_TIMEOUT, EDG_WLL_PARAM_X509_PROXY,
  EDG_WLL_PARAM_X509_KEY, EDG_WLL_PARAM_X509_CERT, EDG_WLL_PARAM_LBPROXY_STORE_SOCK, EDG_WLL_PARAM_LBPROXY_SERVE_SOCK,
  EDG_WLL_PARAM_LBPROXY_USER, EDG_WLL_PARAM_JPREG_TMPDIR, EDG_WLL_PARAM__LAST
}
enum  _edg_wll_QueryResults {
  EDG_WLL_QUERYRES_UNDEF, EDG_WLL_QUERYRES_NONE, EDG_WLL_QUERYRES_ALL, EDG_WLL_QUERYRES_LIMITED,
  EDG_WLL_QUERYRES__LAST
}
enum  _edg_wll_Source {
  EDG_WLL_SOURCE_NONE, EDG_WLL_SOURCE_USER_INTERFACE, EDG_WLL_SOURCE_NETWORK_SERVER, EDG_WLL_SOURCE_WORKLOAD_MANAGER,
  EDG_WLL_SOURCE_BIG_HELPER, EDG_WLL_SOURCE_JOB_SUBMISSION, EDG_WLL_SOURCE_LOG_MONITOR, EDG_WLL_SOURCE_LRMS,
  EDG_WLL_SOURCE_APPLICATION, EDG_WLL_SOURCE__LAST
}
enum  _edg_wll_ErrorCode {
  EDG_WLL_ERROR_BASE = GLITE_WMS_LOGGING_ERROR_BASE, EDG_WLL_ERROR_PARSE_BROKEN_ULM, EDG_WLL_ERROR_PARSE_EVENT_UNDEF, EDG_WLL_ERROR_PARSE_MSG_INCOMPLETE,
  EDG_WLL_ERROR_PARSE_KEY_DUPLICITY, EDG_WLL_ERROR_PARSE_KEY_MISUSE, EDG_WLL_ERROR_PARSE_OK_WITH_EXTRA_FIELDS, EDG_WLL_ERROR_XML_PARSE,
  EDG_WLL_ERROR_SERVER_RESPONSE, EDG_WLL_ERROR_JOBID_FORMAT, EDG_WLL_ERROR_DB_CALL, EDG_WLL_ERROR_URL_FORMAT,
  EDG_WLL_ERROR_MD5_CLASH, EDG_WLL_ERROR_GSS, EDG_WLL_ERROR_DNS, EDG_WLL_ERROR_NOJOBID,
  EDG_WLL_ERROR_NOINDEX, EDG_WLL_IL_PROTO, EDG_WLL_IL_SYS, EDG_WLL_IL_EVENTS_WAITING,
  EDG_WLL_ERROR_COMPARE_EVENTS, EDG_WLL_ERROR_SQL_PARSE
}

Functions

int edg_wll_InitContext (edg_wll_Context *context)
void edg_wll_FreeContext (edg_wll_Context context)
int edg_wll_SetParam (edg_wll_Context context, edg_wll_ContextParam param,...)
int edg_wll_SetParamInt (edg_wll_Context ctx, edg_wll_ContextParam param, int val)
int edg_wll_SetParamString (edg_wll_Context ctx, edg_wll_ContextParam param, const char *val)
int edg_wll_SetParamTime (edg_wll_Context ctx, edg_wll_ContextParam param, const struct timeval *val)
int edg_wll_GetParam (edg_wll_Context context, edg_wll_ContextParam param,...)
int edg_wll_Error (edg_wll_Context context, char **errText, char **errDesc)
char * edg_wll_SourceToString (edg_wll_Source src)
edg_wll_Source edg_wll_StringToSource (const char *name)
char * edg_wll_QResultToString (edg_wll_QueryResults res)
edg_wll_QueryResults edg_wll_StringToQResult (const char *name)
char * edg_wll_GetSequenceCode (const edg_wll_Context context)
int edg_wll_GetLoggingJob (const edg_wll_Context context, edg_wlc_JobId *jobid_out)

Define Documentation

#define EDG_WLL_SEQ_BIGHELPER_INITIAL   "UI=2:NS=0:WM=0:BH=1:JSS=0:LM=0:LRMS=0:APP=0"
 

initial sequence code for BigHelper

#define EDG_WLL_SEQ_DUPLICATE   11
 

#define EDG_WLL_SEQ_NORMAL   1
 

type of sequence code (used when setting to the context)

#define EDG_WLL_SOURCE_WM_PROXY   EDG_WLL_SOURCE_NETWORK_SERVER
 

Currently an alias. Will be replaced when migration NS -> WMProxy is finished.


Typedef Documentation

typedef struct _edg_wll_Context* edg_wll_Context
 

Opaque context type

typedef enum _edg_wll_ContextParam edg_wll_ContextParam
 

Constants defining the context parameters

typedef enum _edg_wll_ErrorCode edg_wll_ErrorCode
 

L&B subsystem specific error codes. Besides them L&B functions return standard errno codes in their usual meaning.

typedef enum _edg_wll_QueryResults edg_wll_QueryResults
 

sets returned query results

typedef enum _edg_wll_Source edg_wll_Source
 

identification of logging component


Enumeration Type Documentation

enum _edg_wll_ContextParam
 

Constants defining the context parameters

Enumeration values:
EDG_WLL_PARAM_HOST  hostname to appear as event orgin
EDG_WLL_PARAM_SOURCE  event source component
EDG_WLL_PARAM_INSTANCE  instance of the source component
EDG_WLL_PARAM_LEVEL  logging level
EDG_WLL_PARAM_DESTINATION  logging destination host
EDG_WLL_PARAM_DESTINATION_PORT  logging destination port
EDG_WLL_PARAM_LOG_TIMEOUT  logging timeout (asynchronous)
EDG_WLL_PARAM_LOG_SYNC_TIMEOUT  logging timeout (synchronous)
EDG_WLL_PARAM_QUERY_SERVER  default server name to query
EDG_WLL_PARAM_QUERY_SERVER_PORT  default server port to query
EDG_WLL_PARAM_QUERY_SERVER_OVERRIDE  host:port parameter setting override even values in jobid (useful for debugging & hacking only)
EDG_WLL_PARAM_QUERY_TIMEOUT  query timeout
EDG_WLL_PARAM_QUERY_JOBS_LIMIT  maximal query jobs result size
EDG_WLL_PARAM_QUERY_EVENTS_LIMIT  maximal query events result size
EDG_WLL_PARAM_QUERY_RESULTS  maximal query result size
EDG_WLL_PARAM_QUERY_CONNECTIONS  maximal number of open connections in ctx->connPoll
EDG_WLL_PARAM_NOTIF_SERVER  default notification server name
EDG_WLL_PARAM_NOTIF_SERVER_PORT  default notification server port
EDG_WLL_PARAM_NOTIF_TIMEOUT  notif timeout
EDG_WLL_PARAM_X509_PROXY  proxy file to use for authentication
EDG_WLL_PARAM_X509_KEY  key file to use for authentication
EDG_WLL_PARAM_X509_CERT  certificate file to use for authentication
EDG_WLL_PARAM_LBPROXY_STORE_SOCK  lbproxy store socket path
EDG_WLL_PARAM_LBPROXY_SERVE_SOCK  lbproxy serve socket path
EDG_WLL_PARAM_LBPROXY_USER  user credentials when logging to L&B Proxy
EDG_WLL_PARAM_JPREG_TMPDIR  maildir storage path
EDG_WLL_PARAM__LAST  marker, LB internal use only

enum _edg_wll_ErrorCode
 

L&B subsystem specific error codes. Besides them L&B functions return standard errno codes in their usual meaning.

Enumeration values:
EDG_WLL_ERROR_BASE  Base for L&B specific code. Use the constant from common/
EDG_WLL_ERROR_PARSE_BROKEN_ULM  Parsing ULM line into edg_wll_Event structure
EDG_WLL_ERROR_PARSE_EVENT_UNDEF  Undefined event name
EDG_WLL_ERROR_PARSE_MSG_INCOMPLETE  Incomplete message (missing fields)
EDG_WLL_ERROR_PARSE_KEY_DUPLICITY  Duplicate entry in message
EDG_WLL_ERROR_PARSE_KEY_MISUSE  Entry not allowed for this message type
EDG_WLL_ERROR_PARSE_OK_WITH_EXTRA_FIELDS  Additional, not understood fields found in message. The rest is OK therefore this is not a true error.
EDG_WLL_ERROR_XML_PARSE  Error in parsing XML protocol.
EDG_WLL_ERROR_SERVER_RESPONSE  Generic failure on server. See syslog on the server machine for details.
EDG_WLL_ERROR_JOBID_FORMAT  Malformed jobid
EDG_WLL_ERROR_DB_CALL  Failure of underlying database engine. See errDesc returned by edg_wll_ErrorCode().
EDG_WLL_ERROR_URL_FORMAT  Malformed URL
EDG_WLL_ERROR_MD5_CLASH  MD5 hash same for different strings. Very unlikely :-).
EDG_WLL_ERROR_GSS  Generic GSSAPI error. See errDesc returned by edg_wll_Error().
EDG_WLL_ERROR_DNS  DNS resolver error. See errDesc returned by edg_wll_Error().
EDG_WLL_ERROR_NOJOBID  Attmepted call requires calling edg_wll_SetLoggingJob() first.
EDG_WLL_ERROR_NOINDEX  Query does not contain any conidion on indexed attribute.
EDG_WLL_IL_PROTO  Lbserver (proxy) store communication protocol error.
EDG_WLL_IL_SYS  Interlogger internal error.
EDG_WLL_IL_EVENTS_WAITING  Interlogger still has events pending delivery.
EDG_WLL_ERROR_COMPARE_EVENTS  Two compared events differ.
EDG_WLL_ERROR_SQL_PARSE  Error in SQL parsing.

enum _edg_wll_QueryResults
 

sets returned query results

Enumeration values:
EDG_WLL_QUERYRES_UNDEF 
EDG_WLL_QUERYRES_NONE 
EDG_WLL_QUERYRES_ALL 
EDG_WLL_QUERYRES_LIMITED 
EDG_WLL_QUERYRES__LAST 

enum _edg_wll_Source
 

identification of logging component

Enumeration values:
EDG_WLL_SOURCE_NONE 
EDG_WLL_SOURCE_USER_INTERFACE 
EDG_WLL_SOURCE_NETWORK_SERVER 
EDG_WLL_SOURCE_WORKLOAD_MANAGER 
EDG_WLL_SOURCE_BIG_HELPER 
EDG_WLL_SOURCE_JOB_SUBMISSION 
EDG_WLL_SOURCE_LOG_MONITOR 
EDG_WLL_SOURCE_LRMS 
EDG_WLL_SOURCE_APPLICATION 
EDG_WLL_SOURCE__LAST 


Function Documentation

int edg_wll_Error edg_wll_Context  context,
char **  errText,
char **  errDesc
 

Retrieve error details on recent API call

Parameters:
in] context context to work with
out] errText standard error text (may be NULL - no text returned)
out] errDesc additional error description (may be NULL - no text returned)
Returns:
Error code of the recent error

void edg_wll_FreeContext edg_wll_Context  context  ) 
 

Destroy and free context object. Also performs necessary cleanup (closing connections etc.)

Parameters:
in] context context to free

int edg_wll_GetLoggingJob const edg_wll_Context  context,
edg_wlc_JobId *  jobid_out
 

retrieve the current logging JobId from the context

int edg_wll_GetParam edg_wll_Context  context,
edg_wll_ContextParam  param,
... 
 

Get current parameter value.

Parameters:
in,out] context context to work with
in] param parameter to retrieve
out] ... pointer to output variable
Return values:
0 success
EINVAL param is not a valid parameter

char* edg_wll_GetSequenceCode const edg_wll_Context  context  ) 
 

Retrieve current sequence code from the context

int edg_wll_InitContext edg_wll_Context context  ) 
 

Allocate an initialize a new context object.

Parameters:
out] context returned context
Returns:
0 on success, ENOMEM if malloc() fails

char* edg_wll_QResultToString edg_wll_QueryResults  res  ) 
 

Convert Query result code to printable string

int edg_wll_SetParam edg_wll_Context  context,
edg_wll_ContextParam  param,
... 
 

Set a context parameter.

Parameters:
in,out] context context to work with
in] param parameter to set
in] ... value to set (if NULL or 0, default is used)
Return values:
0 success
EINVAL param is not a valid parameter, or invalid value

int edg_wll_SetParamInt edg_wll_Context  ctx,
edg_wll_ContextParam  param,
int  val
 

Set a context parameter of type int.

Parameters:
in,out] ctx context to work with
in] param parameter to set
in] val value to set
Return values:
0 success
EINVAL param is not a valid parameter, or invalid value

int edg_wll_SetParamString edg_wll_Context  ctx,
edg_wll_ContextParam  param,
const char *  val
 

Set a context parameter of type string.

Parameters:
in,out] ctx context to work with
in] param parameter to set
in] val value to set (if NULL, default is used)
Return values:
0 success
EINVAL param is not a valid parameter, or invalid value

int edg_wll_SetParamTime edg_wll_Context  ctx,
edg_wll_ContextParam  param,
const struct timeval *  val
 

Set a context parameter of type timeval.

Parameters:
in,out] ctx context to work with
in] param parameter to set
in] val value to set (if NULL, default is used)
Return values:
0 success
EINVAL param is not a valid parameter, or invalid value

char* edg_wll_SourceToString edg_wll_Source  src  ) 
 

Convert source code to printable string

edg_wll_QueryResults edg_wll_StringToQResult const char *  name  ) 
 

Convert name to Query result code

Returns:
Matching code or EDG_WLL_SOURCE_NONE

edg_wll_Source edg_wll_StringToSource const char *  name  ) 
 

Convert name to source code

Returns:
Matching code or EDG_WLL_SOURCE_NONE


Generated on Thu May 11 20:44:16 2006 for Glite LB Client: C - Interface by doxygen 1.3.5