HTP  0.5
Data Fields
htp_cfg_t Struct Reference

#include <htp_config_private.h>

Data Fields

size_t field_limit_hard
 
size_t field_limit_soft
 
enum htp_log_level_t log_level
 
int tx_auto_destroy
 
enum htp_server_personality_t server_personality
 
int(* parse_request_line )(htp_connp_t *connp)
 
int(* parse_response_line )(htp_connp_t *connp)
 
int(* process_request_header )(htp_connp_t *connp, unsigned char *data, size_t len)
 
int(* process_response_header )(htp_connp_t *connp, unsigned char *data, size_t len)
 
int(* parameter_processor )(htp_param_t *param)
 
htp_decoder_cfg_t decoder_cfgs [HTP_DECODER_CONTEXTS_MAX]
 
int generate_request_uri_normalized
 
int response_decompression_enabled
 
char * request_encoding
 
char * internal_encoding
 
int parse_request_cookies
 
int parse_request_auth
 
int extract_request_files
 
int extract_request_files_limit
 
char * tmpdir
 
htp_hook_thook_request_start
 
htp_hook_thook_request_line
 
htp_hook_thook_request_uri_normalize
 
htp_hook_thook_request_header_data
 
htp_hook_thook_request_headers
 
htp_hook_thook_request_body_data
 
htp_hook_thook_request_file_data
 
htp_hook_thook_request_trailer_data
 
htp_hook_thook_request_trailer
 
htp_hook_thook_request_complete
 
htp_hook_thook_response_start
 
htp_hook_thook_response_line
 
htp_hook_thook_response_header_data
 
htp_hook_thook_response_headers
 
htp_hook_thook_response_body_data
 
htp_hook_thook_response_trailer_data
 
htp_hook_thook_response_trailer
 
htp_hook_thook_response_complete
 
htp_hook_thook_transaction_complete
 
htp_hook_thook_log
 
void * user_data
 
enum htp_unwanted_t requestline_leading_whitespace_unwanted
 
int response_decompression_layer_limit
 

Field Documentation

htp_decoder_cfg_t htp_cfg_t::decoder_cfgs[HTP_DECODER_CONTEXTS_MAX]

Decoder configuration array, one per context.

int htp_cfg_t::extract_request_files

Whether to extract files from requests using Multipart encoding.

int htp_cfg_t::extract_request_files_limit

How many extracted files are allowed in a single Multipart request?

size_t htp_cfg_t::field_limit_hard

The maximum size of the buffer that is used when the current input chunk does not contain all the necessary data (e.g., a very header line that spans several packets).

size_t htp_cfg_t::field_limit_soft

Soft field limit length. If this limit is reached the parser will issue a warning but continue to run. NOT IMPLEMENTED.

int htp_cfg_t::generate_request_uri_normalized

Whether to generate the request_uri_normalized field.

htp_hook_t* htp_cfg_t::hook_log

Log hook, invoked every time the library wants to log.

htp_hook_t* htp_cfg_t::hook_request_body_data

Request body data hook, invoked every time body data is available. Each invocation will provide a htp_tx_data_t instance. Chunked data will be dechunked before the data is passed to this hook. Decompression is not currently implemented. At the end of the request body there will be a call with the data pointer set to NULL.

htp_hook_t* htp_cfg_t::hook_request_complete

Request hook, invoked after a complete request is seen.

htp_hook_t* htp_cfg_t::hook_request_file_data

Request file data hook, which is invoked whenever request file data is available. Currently used only by the Multipart parser.

htp_hook_t* htp_cfg_t::hook_request_header_data

Receives raw request header data, starting immediately after the request line, including all headers as they are seen on the TCP connection, and including the terminating empty line. Not available on genuine HTTP/0.9 requests (because they don't use headers).

htp_hook_t* htp_cfg_t::hook_request_headers

Request headers hook, invoked after all request headers are seen.

htp_hook_t* htp_cfg_t::hook_request_line

Request line hook, invoked after a request line has been parsed.

htp_hook_t* htp_cfg_t::hook_request_start

Request start hook, invoked when the parser receives the first byte of a new request. Because in HTTP a transaction always starts with a request, this hook doubles as a transaction start hook.

htp_hook_t* htp_cfg_t::hook_request_trailer

Request trailer hook, invoked after all trailer headers are seen, and if they are seen (not invoked otherwise).

htp_hook_t* htp_cfg_t::hook_request_trailer_data

Receives raw request trailer data, which can be available on requests that have chunked bodies. The data starts immediately after the zero-length chunk and includes the terminating empty line.

htp_hook_t* htp_cfg_t::hook_request_uri_normalize

Request URI normalization hook, for overriding default normalization of URI.

htp_hook_t* htp_cfg_t::hook_response_body_data

Response body data hook, invoked every time body data is available. Each invocation will provide a htp_tx_data_t instance. Chunked data will be dechunked before the data is passed to this hook. By default, compressed data will be decompressed, but decompression can be disabled in configuration. At the end of the response body there will be a call with the data pointer set to NULL.

htp_hook_t* htp_cfg_t::hook_response_complete

Response hook, invoked after a response has been seen. Because sometimes servers respond before receiving complete requests, a response_complete callback may be invoked prior to a request_complete callback.

htp_hook_t* htp_cfg_t::hook_response_header_data

Receives raw response header data, starting immediately after the status line and including all headers as they are seen on the TCP connection, and including the terminating empty line. Not available on genuine HTTP/0.9 responses (because they don't have response headers).

htp_hook_t* htp_cfg_t::hook_response_headers

Response headers book, invoked after all response headers have been seen.

htp_hook_t* htp_cfg_t::hook_response_line

Response line hook, invoked after a response line has been parsed.

htp_hook_t* htp_cfg_t::hook_response_start

Response startup hook, invoked when a response transaction is found and processing started.

htp_hook_t* htp_cfg_t::hook_response_trailer

Response trailer hook, invoked after all trailer headers have been processed, and only if the trailer exists.

htp_hook_t* htp_cfg_t::hook_response_trailer_data

Receives raw response trailer data, which can be available on responses that have chunked bodies. The data starts immediately after the zero-length chunk and includes the terminating empty line.

htp_hook_t* htp_cfg_t::hook_transaction_complete

Transaction complete hook, which is invoked once the entire transaction is considered complete (request and response are both complete). This is always the last hook to be invoked.

char* htp_cfg_t::internal_encoding

Not fully implemented at the moment.

enum htp_log_level_t htp_cfg_t::log_level

Log level, which will be used when deciding whether to store or ignore the messages issued by the parser.

int(* htp_cfg_t::parameter_processor)(htp_param_t *param)

The function to use to transform parameters after parsing.

int htp_cfg_t::parse_request_auth

Whether to parse HTTP Authentication headers.

int htp_cfg_t::parse_request_cookies

Whether to parse request cookies.

int(* htp_cfg_t::parse_request_line)(htp_connp_t *connp)

The function used for request line parsing. Depends on the personality.

int(* htp_cfg_t::parse_response_line)(htp_connp_t *connp)

The function used for response line parsing. Depends on the personality.

int(* htp_cfg_t::process_request_header)(htp_connp_t *connp, unsigned char *data, size_t len)

The function used for request header parsing. Depends on the personality.

int(* htp_cfg_t::process_response_header)(htp_connp_t *connp, unsigned char *data, size_t len)

The function used for response header parsing. Depends on the personality.

char* htp_cfg_t::request_encoding

Not fully implemented at the moment.

enum htp_unwanted_t htp_cfg_t::requestline_leading_whitespace_unwanted

Reaction to leading whitespace on the request line

int htp_cfg_t::response_decompression_enabled

Whether to decompress compressed response bodies.

int htp_cfg_t::response_decompression_layer_limit

How many layers of compression we will decompress (0 => no limit).

enum htp_server_personality_t htp_cfg_t::server_personality

Server personality identifier.

char* htp_cfg_t::tmpdir

The location on disk where temporary files will be created.

int htp_cfg_t::tx_auto_destroy

Whether to delete each transaction after the last hook is invoked. This feature should be used when parsing traffic streams in real time.

void* htp_cfg_t::user_data

Opaque user data associated with this configuration structure.


The documentation for this struct was generated from the following file: