\lstinline'EDG_WLL_PARAM_X509_KEY' &
Key file to use for authentication.
\par {\it Type: } \lstinline'char *'
-\par {\it Env. variable: } \lstinline'X509_USER_KEY'
+\par {\it Environment: } \lstinline'X509_USER_KEY'
\\
\lstinline'EDG_WLL_PARAM_X509_CERT' &
Certificate file to use for authentication.
\par {\it Type: } \lstinline'char *'
-\par {\it Env. variable: } \lstinline'X509_USER_CERT'
+\par {\it Environment: } \lstinline'X509_USER_CERT'
\\
\lstinline'EDG_WLL_PARAM_CONNPOOL_SIZE' &
Maximum number of open connections maintained by the library.
\par {\it Type: } \lstinline'int'
-\\
+\par {\it Environment: } \\
\end{tabularx}
\caption{Common context parameters}
\label{t:cparam}
\subsubsection{Event}
\label{s:edg_wll_Event}
The transparent data structure \verb'edg_wll_Event' represents \LB
-event, atomic data unit received and processed by \LB. It is a set of
-attributes (\ie key--value pairs) with predefined structure -- there
-are common attributes and each defined event type allows for specific
-set of additional attributes. The most important common event
-attributes are listed in table~\ref{t:cevent},
+event, atomic data unit received and processed by \LB. It is a union of
+common structure and structures for all event types:
+\begin{lstlisting}
+union _edg_wll_Event {
+ edg_wll_EventCode type;
+ edg_wll_AnyEvent any;
+ edg_wll_TransferEvent transfer;
+ edg_wll_AcceptedEvent accepted;
+ //* \dots {\it more follows} \dots
+}
+typedef union _edg_wll_Event edg_wll_Event;
+\end{lstlisting}
+
+The most important common event attributes are listed in
+table~\ref{t:cevent}, the following example shows access:
+\begin{lstlisting}
+edg_wll_Event event;
+
+event.type = 0;
+event.any.user = "me";
+\end{lstlisting}
\begin{table}[h]
\begin{tabularx}{\textwidth}{llX}
\verb'edg_wll_Event' structure it can be viewed as a set of
attributes, where some attributes are common and some specific
for a given job state (but unlike the \verb'edg_wll_Event' it is not
-implemented as union of structs but rather as one big struct). Most
-important common attributes are summarized in table~\ref{t:cstatus}.
+implemented as union of structs but rather as one big struct).
+Generally speaking, when the attribute value is set, it is a valid
+part of job state description. Most important common attributes are
+summarized in table~\ref{t:cstatus}.
+
-\TODO{Is somewhere documented what attributes are filled in for given
-job type and status?}
\begin{table}[h]
\begin{tabularx}{\linewidth}{llX}
The following example prints out the states of jobs given in the input
list; the job states are printed together with their subjobs on the
same input list:
-\lstinputlisting[firstline=12,numbers=left]{util.c}
+\lstinputlisting[title={\bf File: }\lstname,firstline=12,numbers=left]{util.c}
For more information see file \verb'include/glite/lb/jobstat.h'
The table~\ref{t:pcontext} summarizes context parameters relevant to the
event logging. If parameter is not set in the context explicitly, the
\LB\ library will search for value of corresponding environment
-variable. The symbolic C names should be prepended with
-\verb'EDG_WLL_PARAM_' prefix, \ie\ \verb'EDG_WLL_PARAM_HOST'.
+variable.
\begin{table}[h]
\begin{tabularx}{\textwidth}{lX}
{\bf Name} & {\bf Description} \\
\hline
-\lstinline'HOST' & Hostname that appears as event origin. \par {\it
-Type: \lstinline'char*'} \par {\it Environment: } \\
-\lstinline'SOURCE' & Event source component. \par {\it Type:
-\lstinline'edg_wll_Source'} \par {\it Environment: } \\
-\lstinline'DESTINATION' & Hostname of machine running
-locallogger/interlogger. \par {\it Type: \lstinline'char*'} \par {\it
-Environment: \lstinline'GLITE_WMS_LOG_DESTINATION'} \\
-\lstinline'DESTINATION_PORT' & Port the locallogger is listening
-on. \par {\it Type: \lstinline'int'} \par {\it Environment:
-\lstinline'GLITE_WMS_LOG_DESTINATION'} \\
-\lstinline'LOG_TIMEOUT' & Logging timeout for asynchronous
-logging. \par {\it Type: \lstinline'struct timeval'} \par {\it
-Environment: \lstinline'GLITE_WMS_LOG_TIMEOUT'} \\
-\lstinline'LOG_SYNC_TIMEOUT' & Logging timeout for synchronous
-logging. \par {\it Type: \lstinline'struct timeval'} \par {\it
-Environment: \lstinline'GLITE_WMS_LOG_SYNC_TIMEOUT'} \\
-\lstinline'LBPROXY_STORE_SOCK' & \LB\ Proxy store socket
-path (if logging through \LB\ Proxy) \par {\it Type:
-\lstinline'char*'} \par {\it Environment: \lstinline'GLITE_WMS_LBPROXY_STORE_SOCK'} \\
-\lstinline'LBPROXY_USER' & Certificate subject of the user (if logging
-through \LB\ proxy). \par {\it Type: \lstinline'char*'} \par {\it
-Environment: \lstinline'GLITE_WMS_LBPROXY_USER'} \\
+\lstinline'EDG_WLL_PARAM_HOST' &
+Hostname that appears as event origin.
+\par {\it Type: } \lstinline'char*'
+\par {\it Environment: } \\
+\lstinline'EDG_WLL_PARAM_SOURCE' &
+Event source component.
+\par {\it Type: }\lstinline'edg_wll_Source'
+\par {\it Environment: } \\
+\lstinline'EDG_WLL_PARAM_DESTINATION' &
+Hostname of machine running locallogger/interlogger.
+\par {\it Type: }\lstinline'char*'
+\par {\it Environment: }\lstinline'GLITE_WMS_LOG_DESTINATION' \\
+\lstinline'EDG_WLL_PARAM_DESTINATION_PORT' &
+Port the locallogger is listening on.
+\par {\it Type: } \lstinline'int'
+\par {\it Environment: }\lstinline'GLITE_WMS_LOG_DESTINATION' \\
+\lstinline'EDG_WLL_LOG_TIMEOUT' &
+Logging timeout for asynchronous logging.
+\par {\it Type: }\lstinline'struct timeval'
+\par {\it Environment: }\lstinline'GLITE_WMS_LOG_TIMEOUT' \\
+\lstinline'EDG_WLL_LOG_SYNC_TIMEOUT' &
+Logging timeout for synchronous logging.
+\par {\it Type: }\lstinline'struct timeval'
+\par {\it Environment: }\lstinline'GLITE_WMS_LOG_SYNC_TIMEOUT' \\
+\lstinline'EDG_WLL_LBPROXY_STORE_SOCK' &
+\LB\ Proxy store socket path (if logging through \LB\ Proxy)
+\par {\it Type: }\lstinline'char*'
+\par {\it Environment: }\lstinline'GLITE_WMS_LBPROXY_STORE_SOCK' \\
+\lstinline'EDG_WLL_LBPROXY_USER' &
+Certificate subject of the user (if logging through \LB\ proxy).
+\par {\it Type: }\lstinline'char*'
+\par {\it Environment: }\lstinline'GLITE_WMS_LBPROXY_USER' \\
\end{tabularx}
\caption{Producer specific context parameters}
\label{t:pcontext}
the \LB.
First we have to include neccessary headers:
-\lstinputlisting[numbers=left,linerange=headers-end\ headers]{prod_example1.c}
+\lstinputlisting[title={\bf File: }\lstname,numbers=left,linerange=headers-end\ headers]{prod_example1.c}
Initialize context and set parameters:
-\lstinputlisting[numbers=left,linerange=context-end\ context]{prod_example1.c}
+\lstinputlisting[title={\bf File: }\lstname,numbers=left,linerange=context-end\ context]{prod_example1.c}
\TODO{proper setting of sequence codes}
-\lstinputlisting[numbers=left,linerange=sequence-end\ sequence]{prod_example1.c}
+\lstinputlisting[title={\bf File: }\lstname,numbers=left,linerange=sequence-end\ sequence]{prod_example1.c}
Log the event:
-\lstinputlisting[numbers=left,linerange=log-end\ log]{prod_example1.c}
+\lstinputlisting[title={\bf File: }\lstname,numbers=left,linerange=log-end\ log]{prod_example1.c}
The \verb'edg_wll_LogEvent()' function is defined as follows:
\begin{lstlisting}[numbers=none]