common probe entry point More...
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <signal.h>
#include <errno.h>
#include <config.h>
#include <alloc.h>
#include "_probe-api.h"
#include "probe-entcmp.h"
#include "encache.h"
Data Structures | |
struct | probe_varref_ctx |
struct | probe_varref_ctx_ent |
Defines | |
#define | PROBE_SIGEXIT_CLEAN 1 |
#define | PROBE_SIGEXIT_UNCLEAN 2 |
#define | MAX_EVAL_DEPTH 8 |
maximum recursion depth for set evaluation | |
#define | probe_set_foreach(elm_var, set_list) SEXP_sublist_foreach (elm_var, set_list, 2, 1000) |
#define | CASE(__c1, __rest) case (__c1): if (strcmp (__rest, member_name + 1) == 0) |
Functions | |
volatile int | OSCAP_GSYM (sigexit)=0 |
signal exit flag | |
SEAP_CTX_t * | OSCAP_GSYM (ctx) |
SEAP context. | |
int | OSCAP_GSYM (sd) |
SEAP descriptor. | |
pcache_t * | OSCAP_GSYM (pcache) |
probe item cache | |
void * | OSCAP_GSYM (probe_arg) |
pointer for probe_main, provided by probe_init | |
encache_t * | OSCAP_GSYM (encache) |
element name cache | |
struct id_desc_t | OSCAP_GSYM (id_desc) |
void * | probe_worker (void *arg) |
Worker thread function. | |
int | main (void) |
Common probe entry point. |
common probe entry point
int main | ( | void | ) |
Common probe entry point.
This is the common main function of all probe processes that initializes all the stuff needed at probe runtime. This function also contains the main loop which listens for new request and in case the result was already evaluated (it is stored in the item cache) it replies to the request immediately. In the other case a new thread is spawned which takes care of the evaluation and reply.
void * probe_worker | ( | void * | arg | ) |
Worker thread function.
This functions handles the evalution of objects and sets.
arg | SEAP message with the request which contains the object to be evaluated |