htp_connp_t Struct Reference

#include <htp_connection_parser_private.h>

Data Fields

htp_cfg_tcfg
htp_conn_tconn
const void * user_data
htp_log_tlast_error
enum htp_stream_state_t in_status
enum htp_stream_state_t out_status
unsigned int out_data_other_at_tx_end
htp_time_t in_timestamp
unsigned char * in_current_data
int64_t in_current_len
int64_t in_current_read_offset
int64_t in_current_consume_offset
int64_t in_current_receiver_offset
size_t in_chunk_count
size_t in_chunk_request_index
int64_t in_stream_offset
int in_next_byte
unsigned char * in_buf
size_t in_buf_size
bstrin_header
htp_tx_tin_tx
int64_t in_content_length
int64_t in_body_data_left
int64_t in_chunked_length
int(* in_state )(htp_connp_t *)
int(* in_state_previous )(htp_connp_t *)
htp_hook_tin_data_receiver_hook
size_t out_next_tx_index
htp_time_t out_timestamp
unsigned char * out_current_data
int64_t out_current_len
int64_t out_current_read_offset
int64_t out_current_consume_offset
int64_t out_current_receiver_offset
int64_t out_stream_offset
int out_next_byte
unsigned char * out_buf
size_t out_buf_size
bstrout_header
htp_tx_tout_tx
int64_t out_content_length
int64_t out_body_data_left
int64_t out_chunked_length
int(* out_state )(htp_connp_t *)
int(* out_state_previous )(htp_connp_t *)
htp_hook_tout_data_receiver_hook
htp_decompressor_tout_decompressor
htp_file_tput_file

Detailed Description

Connection parser structure.


Field Documentation

Current parser configuration structure.

The connection structure associated with this parser.

Holds the remaining request body length that we expect to read. This field will be available only when the length of a request body is known in advance, i.e. when request headers contain a Content-Length header.

unsigned char* htp_connp_t::in_buf

Used to buffer a line of inbound data when buffering cannot be avoided.

Stores the size of the buffer. Valid only when htp_tx_t::in_buf is not NULL.

How many data chunks does the inbound connection stream consist of?

The index of the first chunk used in the current request.

Holds the amount of data that needs to be read from the current data chunk. Only used with chunked request bodies.

The request body length declared in a valid request header. The key here is "valid". This field will not be populated if the request contains both a Transfer-Encoding header and a Content-Length header.

The starting point of the data waiting to be consumed. This field is used in the states where reading data is not the same as consumption.

Pointer to the current request data chunk.

The length of the current request data chunk.

The offset of the next byte in the request data chunk to read.

Marks the starting point of raw data within the inbound data chunk. Raw data (e.g., complete headers) is sent to appropriate callbacks (e.g., REQUEST_HEADER_DATA).

The hook that should be receiving raw connection data.

Stores the current value of a folded request header. Such headers span multiple lines, and are processed only when all data is available.

The value of the request byte currently being processed. This field is populated when the IN_NEXT_* or IN_PEEK_* macros are invoked.

Current request parser state.

Previous request parser state. Used to detect state changes.

Parser inbound status. Starts as HTP_OK, but may turn into HTP_ERROR.

The offset, in the entire connection stream, of the next request byte.

The time when the last request data chunk was received. Can be NULL if the upstream code is not providing the timestamps when calling us.

Ongoing inbound transaction.

On parser failure, this field will contain the error information. Do note, however, that the value in this field will only be valid immediately after an error condition, but it is not guaranteed to remain valid if the parser is invoked again.

The remaining length of the current response body, if known. Set to -1 otherwise.

unsigned char* htp_connp_t::out_buf

Used to buffer a line of outbound data when buffering cannot be avoided.

Stores the size of the buffer. Valid only when htp_tx_t::out_buf is not NULL.

Holds the amount of data that needs to be read from the current response data chunk. Only used with chunked response bodies.

The length of the current response body as presented in the Content-Length response header.

The starting point of the data waiting to be consumed. This field is used in the states where reading data is not the same as consumption.

Pointer to the current response data chunk.

The length of the current response data chunk.

The offset of the next byte in the response data chunk to consume.

Marks the starting point of raw data within the outbound data chunk. Raw data (e.g., complete headers) is sent to appropriate callbacks (e.g., RESPONSE_HEADER_DATA).

When true, this field indicates that there is unprocessed inbound data, and that the response parsing code should stop at the end of the current request in order to allow more requests to be produced.

The hook that should be receiving raw connection data.

Response decompressor used to decompress response body data.

Stores the current value of a folded response header. Such headers span multiple lines, and are processed only when all data is available.

The value of the response byte currently being processed.

Response counter, incremented with every new response. This field is used to match responses to requests. The expectation is that for every response there will already be a transaction (request) waiting.

Current response parser state.

Previous response parser state.

Parser output status. Starts as HTP_OK, but may turn into HTP_ERROR.

The offset, in the entire connection stream, of the next response byte.

The time when the last response data chunk was received. Can be NULL.

Ongoing outbound transaction

On a PUT request, this field contains additional file data.

Opaque user data associated with this parser.


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

Generated on 1 Jan 2017 for HTP by  doxygen 1.6.1