Go to the source code of this file.
typedef int(* htp_callback_fn_t)(void *) |
Creates a copy of the provided hook. The hook is allowed to be NULL, in which case this function simply returns a NULL.
- Parameters
-
- Returns
- A copy of the hook, or NULL (if the provided hook was NULL or, if it wasn't, if there was a memory allocation problem while constructing a copy).
Creates a new hook.
- Returns
- New htp_hook_t structure on success, NULL on failure.
Destroys an existing hook. It is all right to send a NULL to this method because it will simply return straight away.
- Parameters
-
Registers a new callback with the hook.
- Parameters
-
- Returns
- HTP_OK on success, HTP_ERROR on memory allocation error.
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).
- Parameters
-
- Returns
- HTP_OK if at least one hook ran successfully, HTP_STOP if there was no error but processing should stop, and HTP_ERROR or any other value less than zero on error.
Run callbacks one by one until one of them accepts to service the hook.
- Parameters
-
- Returns
- HTP_OK if a hook was found to process the callback, HTP_DECLINED if no hook could be found, HTP_STOP if a hook signalled the processing to stop, and HTP_ERROR or any other value less than zero on error.