sensor

Name

sensor -- 

Synopsis



void        prelude_sensor_send_msg         (prelude_msg_t *msg);
void        prelude_sensor_send_msg_async   (prelude_msg_t *msg);
prelude_msg_t* prelude_sensor_get_option_msg
                                            (void);
int         prelude_sensor_init             (const char *sname,
                                             const char *filename,
                                             int argc,
                                             char **argv);
uint64_t    prelude_sensor_get_ident        (void);
void        prelude_sensor_set_ident        (uint64_t *ident);
void        prelude_set_sensor_name         (const char *sname);
void        prelude_sensor_notify_mgr_connection
                                            (void (*cb) (struct list_head *clist));
void        prelude_heartbeat_register_cb   (void (*cb) (void *data),
                                             void *data);
int         prelude_heartbeat_send          (void);
int         prelude_analyzer_fill_infos     (idmef_analyzer_t *analyzer);

Description

Details

prelude_sensor_send_msg ()

void        prelude_sensor_send_msg         (prelude_msg_t *msg);

Send msg to all Manager server we're connected to.

msg :

Pointer on a message to send.


prelude_sensor_send_msg_async ()

void        prelude_sensor_send_msg_async   (prelude_msg_t *msg);

Asynchronously send msg to all Manager server we're connected to. When this function return, msg is invalid and shouldn't be used anymore. prelude_async_init() should be called prior to using this function.

msg :

Pointer on a message to send.


prelude_sensor_get_option_msg ()

prelude_msg_t* prelude_sensor_get_option_msg
                                            (void);

Returns :


prelude_sensor_init ()

int         prelude_sensor_init             (const char *sname,
                                             const char *filename,
                                             int argc,
                                             char **argv);

Init the sensor library, connect to the manager.

sname :

Name of the sensor.

filename :

Configuration file of the calling sensor.

argc :

Argument count provided to the calling sensor.

argv :

Argument array provided to the calling sensor.

Returns :

0 on success, -1 on error.


prelude_sensor_get_ident ()

uint64_t    prelude_sensor_get_ident        (void);

Returns :


prelude_sensor_set_ident ()

void        prelude_sensor_set_ident        (uint64_t *ident);

ident :


prelude_set_sensor_name ()

void        prelude_set_sensor_name         (const char *sname);

sname :


prelude_sensor_notify_mgr_connection ()

void        prelude_sensor_notify_mgr_connection
                                            (void (*cb) (struct list_head *clist));

Tell the prelude library to call the cb callback whenever the connection state change.

cb :

Callback function to call on notice.


prelude_heartbeat_register_cb ()

void        prelude_heartbeat_register_cb   (void (*cb) (void *data),
                                             void *data);

prelude_heartbeat_register_cb() will make cb called each time the heartbeat timeout expire.

cb :

callback function for heartbeat sending.

data :

Pointer to data to be passed to the callback.


prelude_heartbeat_send ()

int         prelude_heartbeat_send          (void);

Returns :


prelude_analyzer_fill_infos ()

int         prelude_analyzer_fill_infos     (idmef_analyzer_t *analyzer);

analyzer :

Returns :