HTP  0.3
Data Fields
htp_cfg_t Struct Reference

#include <htp.h>

Collaboration diagram for htp_cfg_t:
Collaboration graph
[legend]

Data Fields

size_t field_limit_hard
size_t field_limit_soft
int log_level
int tx_auto_destroy
int spersonality
int(* parse_request_line )(htp_connp_t *connp)
int(* parse_response_line )(htp_connp_t *connp)
int(* process_request_header )(htp_connp_t *connp)
int(* process_response_header )(htp_connp_t *connp)
int(* parameter_processor )(table_t *params, bstr *name, bstr *value)
int path_backslash_separators
int path_case_insensitive
int path_compress_separators
int path_control_char_handling
int path_convert_utf8
int path_decode_separators
int path_decode_u_encoding
int path_invalid_encoding_handling
int path_invalid_utf8_handling
int path_nul_encoded_handling
int path_nul_raw_handling
unsigned char bestfit_replacement_char
int params_decode_u_encoding
int params_invalid_encoding_handling
int params_nul_encoded_handling
int params_nul_raw_handling
int path_unicode_mapping
int path_utf8_overlong_handling
unsigned char * bestfit_map
int generate_request_uri_normalized
int response_decompression_enabled
char * request_encoding
char * internal_encoding
int parse_request_cookies
int parse_request_http_authentication
int extract_request_files
char * tmpdir
htp_hook_thook_transaction_start
htp_hook_thook_request_line
htp_hook_thook_request_uri_normalize
htp_hook_thook_request_headers
htp_hook_thook_request_body_data
htp_hook_thook_request_file_data
htp_hook_thook_request_trailer
htp_hook_thook_request
htp_hook_thook_response_line
htp_hook_thook_response_headers
htp_hook_thook_response_body_data
htp_hook_thook_response_trailer
htp_hook_thook_response
htp_hook_thook_log
void * user_data

Field Documentation

unsigned char* htp_cfg_t::bestfit_map

The best-fit map to use to decode u-encoded characters.

unsigned char htp_cfg_t::bestfit_replacement_char

The replacement character used when there is no best-fit mapping.

int htp_cfg_t::extract_request_files
size_t htp_cfg_t::field_limit_hard

Hard field limit length. If the parser encounters a line that's longer than this value it will give up parsing. Do note that the line limit is not the same thing as header length limit. Because of header folding, a header can end up being longer than the line limit.

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.

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

Request hook, invoked after a complete request is seen.

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_file_data
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_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_uri_normalize

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

htp_hook_t* htp_cfg_t::hook_response

Response hook, invoked after a response has been seen. There isn't a separate transaction hook, use this hook to do something whenever a transaction is complete.

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_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_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_transaction_start

Transaction start hook, invoked when the parser receives the first byte of a new transaction.

char* htp_cfg_t::internal_encoding
int 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)(table_t *params, bstr *name, bstr *value)

The function to use to transform parameters after parsing.

int htp_cfg_t::params_decode_u_encoding
int htp_cfg_t::params_invalid_encoding_handling
int htp_cfg_t::params_nul_encoded_handling
int htp_cfg_t::params_nul_raw_handling
int htp_cfg_t::parse_request_cookies
int htp_cfg_t::parse_request_http_authentication
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::path_backslash_separators

Should we treat backslash characters as path segment separators?

int htp_cfg_t::path_case_insensitive

Should we treat paths as case insensitive?

int htp_cfg_t::path_compress_separators

Should we compress multiple path segment separators into one?

int htp_cfg_t::path_control_char_handling

This parameter is used to predict how a server will react when control characters are present in a request path, but does not affect path normalization.

int htp_cfg_t::path_convert_utf8

Should the parser convert UTF-8 into a single-byte stream, using best-fit?

int htp_cfg_t::path_decode_separators

Should we URL-decode encoded path segment separators?

int htp_cfg_t::path_decode_u_encoding

Should we decode u-encoded characters?

int htp_cfg_t::path_invalid_encoding_handling

How do handle invalid encodings: URL_DECODER_LEAVE_PERCENT, URL_DECODER_REMOVE_PERCENT or URL_DECODER_DECODE_INVALID.

int htp_cfg_t::path_invalid_utf8_handling

Controls how invalid UTF-8 characters are handled.

int htp_cfg_t::path_nul_encoded_handling

Controls how encoded NUL bytes are handled.

int htp_cfg_t::path_nul_raw_handling

Controls how raw NUL bytes are handled.

int htp_cfg_t::path_unicode_mapping

How will the server handle UCS-2 characters?

int htp_cfg_t::path_utf8_overlong_handling

TODO Unused

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

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

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

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

char* htp_cfg_t::request_encoding
int htp_cfg_t::response_decompression_enabled

Whether to automatically decompress compressed response bodies.

int htp_cfg_t::spersonality

Server personality ID.

char* htp_cfg_t::tmpdir
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: