HTP  0.5
htp_hooks.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (c) 2009-2010 Open Information Security Foundation
3  * Copyright (c) 2010-2013 Qualys, Inc.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  *
10  * - Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12 
13  * - Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in the
15  * documentation and/or other materials provided with the distribution.
16 
17  * - Neither the name of the Qualys, Inc. nor the names of its
18  * contributors may be used to endorse or promote products derived from
19  * this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  ***************************************************************************/
33 
39 #ifndef _HOOKS_H
40 #define _HOOKS_H
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 typedef struct htp_hook_t htp_hook_t;
48 typedef int (*htp_callback_fn_t) (void *);
49 
50 #include "htp.h"
51 
52 struct htp_hook_t {
54 };
55 
58 };
59 
69 htp_hook_t *htp_hook_copy(const htp_hook_t *hook);
70 
77 
84 void htp_hook_destroy(htp_hook_t *hook);
85 
94 
105 htp_status_t htp_hook_run_all(htp_hook_t *hook, void *user_data);
106 
116 htp_status_t htp_hook_run_one(htp_hook_t *hook, void *user_data);
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif /* _HOOKS_H */
htp_hook_t * htp_hook_create(void)
Definition: htp_hooks.c:60
void htp_hook_destroy(htp_hook_t *hook)
Definition: htp_hooks.c:73
int htp_status_t
Definition: htp_core.h:46
Definition: htp_list_private.h:50
htp_status_t htp_hook_run_all(htp_hook_t *hook, void *user_data)
Definition: htp_hooks.c:120
htp_status_t htp_hook_run_one(htp_hook_t *hook, void *user_data)
Definition: htp_hooks.c:140
htp_list_array_t * callbacks
Definition: htp_hooks.h:53
htp_callback_fn_t fn
Definition: htp_hooks.h:57
htp_status_t htp_hook_register(htp_hook_t **hook, const htp_callback_fn_t callback_fn)
Definition: htp_hooks.c:85
int(* htp_callback_fn_t)(void *)
Definition: htp_hooks.h:48
htp_hook_t * htp_hook_copy(const htp_hook_t *hook)
Definition: htp_hooks.c:43
Definition: htp_hooks.h:52
Definition: htp_hooks.h:56