HTP  0.5
htp_connection_parser.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 HTP_CONNECTION_PARSER_H
40 #define HTP_CONNECTION_PARSER_H
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
52 
59 void htp_connp_close(htp_connp_t *connp, const htp_time_t *timestamp);
60 
72 
79 void htp_connp_destroy(htp_connp_t *connp);
80 
88 
96 
106 
117 
127 
134 void *htp_connp_get_user_data(const htp_connp_t *connp);
135 
146 void htp_connp_open(htp_connp_t *connp, const char *client_addr, int client_port, const char *server_addr,
147  int server_port, htp_time_t *timestamp);
148 
155 void htp_connp_set_user_data(htp_connp_t *connp, const void *user_data);
156 
166 int htp_connp_req_data(htp_connp_t *connp, const htp_time_t *timestamp, const void *data, size_t len);
167 
179 
189 int htp_connp_res_data(htp_connp_t *connp, const htp_time_t *timestamp, const void *data, size_t len);
190 
202 
210 
211 #ifdef __cplusplus
212 }
213 #endif
214 
215 #endif /* HTP_CONNECTION_PARSER_H */
Definition: htp_config_private.h:123
int htp_connp_res_data(htp_connp_t *connp, const htp_time_t *timestamp, const void *data, size_t len)
Definition: htp_response.c:1041
size_t htp_connp_res_data_consumed(htp_connp_t *connp)
Definition: htp_response.c:970
void htp_connp_open(htp_connp_t *connp, const char *client_addr, int client_port, const char *server_addr, int server_port, htp_time_t *timestamp)
Definition: htp_connection_parser.c:162
void htp_connp_destroy_all(htp_connp_t *connp)
Definition: htp_connection_parser.c:119
struct timeval htp_time_t
Definition: htp_core.h:60
void htp_connp_clear_error(htp_connp_t *connp)
Definition: htp_connection_parser.c:43
htp_conn_t * htp_connp_get_connection(const htp_connp_t *connp)
Definition: htp_connection_parser.c:130
htp_tx_t * htp_connp_get_in_tx(const htp_connp_t *connp)
Definition: htp_connection_parser.c:135
size_t htp_connp_req_data_consumed(htp_connp_t *connp)
Definition: htp_request.c:844
void htp_connp_destroy(htp_connp_t *connp)
Definition: htp_connection_parser.c:90
Definition: htp.h:67
void htp_connp_close(htp_connp_t *connp, const htp_time_t *timestamp)
Definition: htp_connection_parser.c:47
htp_tx_t * htp_connp_get_out_tx(const htp_connp_t *connp)
Definition: htp_connection_parser.c:145
htp_tx_t * htp_connp_tx_create(htp_connp_t *connp)
Definition: htp_connection_parser.c:186
Definition: htp_connection_parser_private.h:51
void * htp_connp_get_user_data(const htp_connp_t *connp)
Definition: htp_connection_parser.c:150
void htp_connp_set_user_data(htp_connp_t *connp, const void *user_data)
Definition: htp_connection_parser.c:181
htp_log_t * htp_connp_get_last_error(const htp_connp_t *connp)
Definition: htp_connection_parser.c:140
htp_connp_t * htp_connp_create(htp_cfg_t *cfg)
Definition: htp_connection_parser.c:65
int htp_connp_req_data(htp_connp_t *connp, const htp_time_t *timestamp, const void *data, size_t len)
Definition: htp_request.c:848
Definition: htp.h:208
Definition: htp.h:145