htp.h File Reference

#include <sys/time.h>
#include "htp_version.h"
#include "htp_core.h"
#include "bstr.h"
#include "htp_base64.h"
#include "htp_config.h"
#include "htp_connection_parser.h"
#include "htp_decompressors.h"
#include "htp_hooks.h"
#include "htp_list.h"
#include "htp_multipart.h"
#include "htp_table.h"
#include "htp_transaction.h"
#include "htp_urlencoded.h"
#include "htp_utf8_decoder.h"

Go to the source code of this file.

Data Structures

struct  htp_conn_t
struct  htp_file_t
struct  htp_file_data_t
struct  htp_log_t
struct  htp_header_t
struct  htp_param_t
struct  htp_tx_t
struct  htp_tx_data_t
struct  htp_uri_t

Functions

void htp_uri_free (htp_uri_t *uri)
htp_uri_thtp_uri_alloc (void)
void htp_log (htp_connp_t *connp, const char *file, int line, enum htp_log_level_t level, int code, const char *fmt,...)
htp_status_t htp_urldecode_inplace (htp_cfg_t *cfg, enum htp_decoder_ctx_t ctx, bstr *input, uint64_t *flags)
htp_status_t htp_urldecode_inplace_ex (htp_cfg_t *cfg, enum htp_decoder_ctx_t ctx, bstr *input, uint64_t *flags, int *expected_status_code)
char * htp_get_version (void)

Detailed Description

Author:
Ivan Ristic <ivanr@webkreator.com>

Function Documentation

char* htp_get_version ( void   ) 

Returns the LibHTP version string.

Returns:
LibHTP version, for example "LibHTP v0.5.x".
void htp_log ( htp_connp_t connp,
const char *  file,
int  line,
enum htp_log_level_t  level,
int  code,
const char *  fmt,
  ... 
)

Creates a new log entry and stores it with the connection. The file and line parameters are typically auto-generated using the HTP_LOG_MARK macro.

Parameters:
[in] connp 
[in] file 
[in] line 
[in] level 
[in] code 
[in] fmt 
[in] ... Records one log message.
[in] connp 
[in] file 
[in] line 
[in] level 
[in] code 
[in] fmt 
htp_uri_t* htp_uri_alloc ( void   ) 

Allocates and initializes a new htp_uri_t structure.

Returns:
New structure, or NULL on memory allocation failure.
void htp_uri_free ( htp_uri_t uri  ) 

Frees all data contained in the uri, and then the uri itself.

Parameters:
[in] uri 
htp_status_t htp_urldecode_inplace ( htp_cfg_t cfg,
enum htp_decoder_ctx_t  ctx,
bstr input,
uint64_t *  flags 
)

Performs in-place decoding of the input string, according to the configuration specified by cfg and ctx. On output, various flags (HTP_URLEN_*) might be set.

Parameters:
[in] cfg 
[in] ctx 
[in] input 
[out] flags 
Returns:
HTP_OK on success, HTP_ERROR on failure.
htp_status_t htp_urldecode_inplace_ex ( htp_cfg_t cfg,
enum htp_decoder_ctx_t  ctx,
bstr input,
uint64_t *  flags,
int *  expected_status_code 
)

Performs in-place decoding of the input string, according to the configuration specified by cfg and ctx. On output, various flags (HTP_URLEN_*) might be set. If something in the input would cause a particular server to respond with an error, the appropriate status code will be set.

Parameters:
[in] cfg 
[in] ctx 
[in] input 
[out] flags 
[out] expected_status_code 0 by default, or status code as necessary
Returns:
HTP_OK on success, HTP_ERROR on failure.

Generated on 15 Jul 2018 for HTP by  doxygen 1.6.1