HTP  0.3
Data Fields
htp_tx_t Struct Reference

#include <htp.h>

Collaboration diagram for htp_tx_t:
Collaboration graph
[legend]

Data Fields

htp_connp_tconnp
htp_conn_tconn
htp_cfg_tcfg
int is_cfg_shared
void * user_data
unsigned int request_ignored_lines
bstrrequest_line
bstrrequest_line_raw
int request_line_nul
int request_line_nul_offset
bstrrequest_method
int request_method_number
bstrrequest_uri
bstrrequest_uri_normalized
bstrrequest_protocol
int request_protocol_number
int protocol_is_simple
htp_uri_tparsed_uri
htp_uri_tparsed_uri_incomplete
size_t request_message_len
size_t request_entity_len
size_t request_nonfiledata_len
size_t request_filedata_len
list_trequest_header_lines
size_t request_header_lines_no_trailers
table_trequest_headers
bstrrequest_headers_raw
size_t request_headers_raw_lines
bstrrequest_headers_sep
int request_transfer_coding
int request_content_encoding
bstrrequest_content_type
htp_hook_thook_request_body_data
htp_hook_thook_response_body_data
htp_urlenp_trequest_urlenp_query
htp_urlenp_trequest_urlenp_body
htp_mpartp_trequest_mpartp
table_trequest_params_query
int request_params_query_reused
table_trequest_params_body
int request_params_body_reused
table_trequest_cookies
int request_auth_type
bstrrequest_auth_username
bstrrequest_auth_password
unsigned int response_ignored_lines
bstrresponse_line
bstrresponse_line_raw
bstrresponse_protocol
int response_protocol_number
bstrresponse_status
int response_status_number
int response_status_expected_number
bstrresponse_message
int seen_100continue
list_tresponse_header_lines
table_tresponse_headers
bstrresponse_headers_sep
size_t response_message_len
size_t response_entity_len
int response_transfer_coding
int response_content_encoding
unsigned int flags
unsigned int progress

Field Documentation

htp_cfg_t* htp_tx_t::cfg

The configuration structure associated with this transaction.

htp_conn_t* htp_tx_t::conn

The connection to which this transaction belongs.

htp_connp_t* htp_tx_t::connp

The connection parsed associated with this transaction.

unsigned int htp_tx_t::flags

Parsing flags: HTP_INVALID_CHUNKING, HTP_INVALID_FOLDING, HTP_REQUEST_SMUGGLING, HTP_MULTI_PACKET_HEAD, HTP_FIELD_UNPARSEABLE.

htp_hook_t* htp_tx_t::hook_request_body_data

Transaction-specific REQUEST_BODY_DATA hook. Behaves as the configuration hook with the same name.

htp_hook_t* htp_tx_t::hook_response_body_data

Transaction-specific RESPONSE_BODY_DATA hook. Behaves as the configuration hook with the same name.

int htp_tx_t::is_cfg_shared

Is the configuration structure shared with other transactions or connections? As a rule of thumb transactions will initially share their configuration structure, but copy-on-write may be used when an attempt to modify configuration is detected.

htp_uri_t* htp_tx_t::parsed_uri

This structure holds a parsed request_uri, with the missing information added (e.g., adding port number from the TCP information) and the fields normalized. This structure should be used to make decisions about a request. To inspect raw data, either use request_uri, or parsed_uri_incomplete.

htp_uri_t* htp_tx_t::parsed_uri_incomplete

This structure holds the individual components parsed out of the request URI. No attempt is made to normalize the contents or replace the missing pieces with defaults. The purpose of this field is to allow you to look at the data as it was supplied. Use parsed_uri when you need to act on data. Note that this field will never have the port as a number.

unsigned int htp_tx_t::progress

Transaction progress. Look for the TX_PROGRESS_* constants for more information.

int htp_tx_t::protocol_is_simple

Is this request using a short-style HTTP/0.9 request?

bstr* htp_tx_t::request_auth_password
int htp_tx_t::request_auth_type
bstr* htp_tx_t::request_auth_username
int htp_tx_t::request_content_encoding

Compression: COMPRESSION_NONE, COMPRESSION_GZIP or COMPRESSION_DEFLATE.

bstr* htp_tx_t::request_content_type

This field will contain the request content type when that information is available in request headers. The contents of the field will be converted to lowercase and any parameters (e.g., character set information) removed.

table_t* htp_tx_t::request_cookies

Request cookies

size_t htp_tx_t::request_entity_len

The actual entity length (the length before transformations have been applied). This field will change as a request body is being received, with the final value available once the entire body has been received.

size_t htp_tx_t::request_filedata_len

TODO The length of the files uploaded using multipart/form-data, or in a request that uses PUT (in which case this field will be equal to the entity length field). This field will be zero in all other cases.

list_t* htp_tx_t::request_header_lines

Original request header lines. This list stores instances of htp_header_line_t.

size_t htp_tx_t::request_header_lines_no_trailers

How many request headers were there before trailers?

table_t* htp_tx_t::request_headers

Parsed request headers.

bstr* htp_tx_t::request_headers_raw

Contains raw request headers. This field is generated on demand, use htp_tx_get_request_headers_raw() to get it.

size_t htp_tx_t::request_headers_raw_lines

How many request header lines have been included in the raw buffer (above).

bstr* htp_tx_t::request_headers_sep

Contains request header separator.

unsigned int htp_tx_t::request_ignored_lines
bstr* htp_tx_t::request_line

The first line of this request.

int htp_tx_t::request_line_nul

How many NUL bytes are there in the request line?

int htp_tx_t::request_line_nul_offset

The offset of the first NUL byte.

bstr* htp_tx_t::request_line_raw

The first line of this request including ws+line terminator(s).

size_t htp_tx_t::request_message_len

The actual message length (the length after transformations have been applied). This field will change as a request body is being received, with the final value available once the entire body has been received.

bstr* htp_tx_t::request_method

Request method.

int htp_tx_t::request_method_number

Request method, as number. Available only if we were able to recognize the request method.

htp_mpartp_t* htp_tx_t::request_mpartp

Request body MULTIPART parser. Available only when the body is in the multipart/form-data format and when the parser was invoked in configuration.

size_t htp_tx_t::request_nonfiledata_len

TODO The length of the data transmitted in a request body, minus the length of the files (if any). At worst, this field will be equal to the entity length if the entity encoding is not recognized. If we recognise the encoding (e.g., if it is application/x-www-form-urlencoded or multipart/form-data), the decoder may be able to separate the data from everything else, in which case the value in this field will be lower.

table_t* htp_tx_t::request_params_body

Parameters from request body.

int htp_tx_t::request_params_body_reused
table_t* htp_tx_t::request_params_query

Parameters from the query string.

int htp_tx_t::request_params_query_reused
bstr* htp_tx_t::request_protocol

Request protocol, as text.

int htp_tx_t::request_protocol_number

Protocol version as a number: -1 means unknown, 9 (HTTP_0_9) means 0.9, 100 (HTTP_1_0) means 1.0 and 101 (HTTP_1_1) means 1.1.

int htp_tx_t::request_transfer_coding

Request transfer coding: IDENTITY or CHUNKED. Only available on requests that have bodies (-1 otherwise).

bstr* htp_tx_t::request_uri

Request URI, raw, as given to us on the request line.

bstr* htp_tx_t::request_uri_normalized

Normalized request URI as a single string. The availability of this field depends on configuration. Use htp_config_set_generate_request_uri_normalized() to ask for the field to be generated.

htp_urlenp_t* htp_tx_t::request_urlenp_body

Request body URLENCODED parser. Available only when the request body is in the application/x-www-form-urlencoded format.

htp_urlenp_t* htp_tx_t::request_urlenp_query

Query string URLENCODED parser. Available only when the query string is not NULL and not empty.

int htp_tx_t::response_content_encoding

Compression; currently COMPRESSION_NONE or COMPRESSION_GZIP.

size_t htp_tx_t::response_entity_len

The actual entity length (the length before transformations have been applied). This field will change as a request body is being received, with the final value available once the entire body has been received.

list_t* htp_tx_t::response_header_lines

Original response header lines.

table_t* htp_tx_t::response_headers

Parsed response headers.

bstr* htp_tx_t::response_headers_sep

Contains response header separator.

unsigned int htp_tx_t::response_ignored_lines

How many empty lines did we ignore before reaching the status line?

bstr* htp_tx_t::response_line

Response line.

bstr* htp_tx_t::response_line_raw

Response line including ws+line terminator(s).

bstr* htp_tx_t::response_message

The message associated with the response status code.

size_t htp_tx_t::response_message_len

The actual message length (the length after transformations have been applied). This field will change as a request body is being received, with the final value available once the entire body has been received.

bstr* htp_tx_t::response_protocol

Response protocol, as text.

int htp_tx_t::response_protocol_number

Response protocol as number. Only available if we were able to parse the protocol version.

bstr* htp_tx_t::response_status

Response status code, as text.

int htp_tx_t::response_status_expected_number

This field is set by the protocol decoder with it thinks that the backend server will reject a request with a particular status code.

int htp_tx_t::response_status_number

Response status code, available only if we were able to parse it.

int htp_tx_t::response_transfer_coding

Response transfer coding: IDENTITY or CHUNKED. Only available on responses that have bodies.

int htp_tx_t::seen_100continue

Have we seen the server respond with a 100 response?

void* htp_tx_t::user_data

The user data associated with this transaction.


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