HTP  0.3
Functions
htp_connection_parser.c File Reference
#include "htp.h"
Include dependency graph for htp_connection_parser.c:

Functions

void htp_connp_clear_error (htp_connp_t *connp)
void htp_connp_close (htp_connp_t *connp, htp_time_t *timestamp)
htp_connp_thtp_connp_create (htp_cfg_t *cfg)
htp_connp_thtp_connp_create_copycfg (htp_cfg_t *cfg)
void htp_connp_destroy (htp_connp_t *connp)
void htp_connp_destroy_all (htp_connp_t *connp)
void * htp_connp_get_user_data (htp_connp_t *connp)
htp_log_thtp_connp_get_last_error (htp_connp_t *connp)
void htp_connp_open (htp_connp_t *connp, const char *remote_addr, int remote_port, const char *local_addr, int local_port, htp_time_t *timestamp)
void htp_connp_set_user_data (htp_connp_t *connp, void *user_data)

Detailed Description

Author
Ivan Ristic ivanr.nosp@m.@web.nosp@m.kreat.nosp@m.or.c.nosp@m.om

Function Documentation

void htp_connp_clear_error ( htp_connp_t connp)

Clears an existing parser error, if any.

Parameters
connp
void htp_connp_close ( htp_connp_t connp,
htp_time_t timestamp 
)

Closes the connection associated with the supplied parser.

Parameters
connp
timestamp

Here is the call graph for this function:

htp_connp_t* htp_connp_create ( htp_cfg_t cfg)

Creates a new connection parser using the provided configuration. Because the configuration structure is used directly, in a multithreaded environment you are not allowed to change the structure, ever. If you have a need to change configuration on per-connection basis, make a copy of the configuration structure to go along with every connection parser.

Parameters
cfg
Returns
A pointer to a newly created htp_connp_t instance.

Here is the call graph for this function:

Here is the caller graph for this function:

htp_connp_t* htp_connp_create_copycfg ( htp_cfg_t cfg)

Creates a new configuration parser, making a copy of the supplied configuration structure.

Parameters
cfg
Returns
A pointer to a newly created htp_connp_t instance.

Here is the call graph for this function:

void htp_connp_destroy ( htp_connp_t connp)

Destroys the connection parser and its data structures, leaving the connection data intact.

Parameters
connp

Here is the call graph for this function:

Here is the caller graph for this function:

void htp_connp_destroy_all ( htp_connp_t connp)

Destroys the connection parser, its data structures, as well as the connection and its transactions.

Parameters
connp

Here is the call graph for this function:

htp_log_t* htp_connp_get_last_error ( htp_connp_t connp)

Returns the last error that occurred with this connection parser. Do note, however, that the value in this field will only be valid immediately after an error condition, but it is not guaranteed to remain valid if the parser is invoked again.

Parameters
connp
Returns
A pointer to an htp_log_t instance if there is an error, or NULL if there isn't.
void* htp_connp_get_user_data ( htp_connp_t connp)

Retrieve the user data associated with this connection parser.

Parameters
connp
Returns
User data, or NULL if there isn't any.
void htp_connp_open ( htp_connp_t connp,
const char *  remote_addr,
int  remote_port,
const char *  local_addr,
int  local_port,
htp_time_t timestamp 
)

Opens connection.

Parameters
connp
remote_addrRemote address
remote_portRemote port
local_addrLocal address
local_portLocal port
timestamp

Here is the call graph for this function:

void htp_connp_set_user_data ( htp_connp_t connp,
void *  user_data 
)

Associate user data with the supplied parser.

Parameters
connp
user_data