HTP
0.5
|
Functions | |
htp_hook_t * | htp_hook_copy (const htp_hook_t *hook) |
htp_hook_t * | htp_hook_create (void) |
void | htp_hook_destroy (htp_hook_t *hook) |
htp_status_t | htp_hook_register (htp_hook_t **hook, const htp_callback_fn_t callback_fn) |
htp_status_t | htp_hook_run_all (htp_hook_t *hook, void *user_data) |
htp_status_t | htp_hook_run_one (htp_hook_t *hook, void *user_data) |
htp_hook_t* htp_hook_copy | ( | const htp_hook_t * | hook | ) |
Creates a copy of the provided hook. The hook is allowed to be NULL, in which case this function simply returns a NULL.
[in] | hook |
htp_hook_t* htp_hook_create | ( | void | ) |
Creates a new hook.
void htp_hook_destroy | ( | htp_hook_t * | hook | ) |
Destroys an existing hook. It is all right to send a NULL to this method because it will simply return straight away.
[in] | hook |
htp_status_t htp_hook_register | ( | htp_hook_t ** | hook, |
const htp_callback_fn_t | callback_fn | ||
) |
Registers a new callback with the hook.
[in] | hook | |
[in] | callback_fn |
htp_status_t htp_hook_run_all | ( | htp_hook_t * | hook, |
void * | user_data | ||
) |
Runs all the callbacks associated with a given hook. Only stops if one of the callbacks returns an error (HTP_ERROR) or stop (HTP_STOP).
[in] | hook | |
[in] | user_data |
htp_status_t htp_hook_run_one | ( | htp_hook_t * | hook, |
void * | user_data | ||
) |
Run callbacks one by one until one of them accepts to service the hook.
[in] | hook | |
[in] | user_data |