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.

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

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.

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

Whether to generate the request_uri_normalized field.

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

Request hook, invoked after a complete request is seen.

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.

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

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

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

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

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.

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.

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

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

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

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

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.

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

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

Should we treat backslash characters as path segment separators?

Should we treat paths as case insensitive?

Should we compress multiple path segment separators into one?

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.

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

Should we URL-decode encoded path segment separators?

Should we decode u-encoded characters?

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

Controls how invalid UTF-8 characters are handled.

Controls how encoded NUL bytes are handled.

Controls how raw NUL bytes are handled.

How will the server handle UCS-2 characters?

TODO Unused

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

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

Whether to automatically decompress compressed response bodies.

Server personality ID.

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

Opaque user data associated with this configuration structure.


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

Generated on 17 Aug 2012 for HTP by  doxygen 1.6.1