HTP
0.5
|
#include <htp_connection_parser_private.h>
Connection parser structure.
htp_cfg_t* htp_connp_t::cfg |
Current parser configuration structure.
htp_conn_t* htp_connp_t::conn |
The connection structure associated with this parser.
int64_t htp_connp_t::in_body_data_left |
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.
size_t htp_connp_t::in_buf_size |
Stores the size of the buffer. Valid only when htp_tx_t::in_buf is not NULL.
size_t htp_connp_t::in_chunk_count |
How many data chunks does the inbound connection stream consist of?
size_t htp_connp_t::in_chunk_request_index |
The index of the first chunk used in the current request.
int64_t htp_connp_t::in_chunked_length |
Holds the amount of data that needs to be read from the current data chunk. Only used with chunked request bodies.
int64_t htp_connp_t::in_content_length |
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.
int64_t htp_connp_t::in_current_consume_offset |
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.
unsigned char* htp_connp_t::in_current_data |
Pointer to the current request data chunk.
int64_t htp_connp_t::in_current_len |
The length of the current request data chunk.
int64_t htp_connp_t::in_current_read_offset |
The offset of the next byte in the request data chunk to read.
int64_t htp_connp_t::in_current_receiver_offset |
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).
htp_hook_t* htp_connp_t::in_data_receiver_hook |
The hook that should be receiving raw connection data.
bstr* htp_connp_t::in_header |
Stores the current value of a folded request header. Such headers span multiple lines, and are processed only when all data is available.
int htp_connp_t::in_next_byte |
The value of the request byte currently being processed. This field is populated when the IN_NEXT_* or IN_PEEK_* macros are invoked.
int(* htp_connp_t::in_state)(htp_connp_t *) |
Current request parser state.
int(* htp_connp_t::in_state_previous)(htp_connp_t *) |
Previous request parser state. Used to detect state changes.
enum htp_stream_state_t htp_connp_t::in_status |
Parser inbound status. Starts as HTP_OK, but may turn into HTP_ERROR.
int64_t htp_connp_t::in_stream_offset |
The offset, in the entire connection stream, of the next request byte.
htp_time_t htp_connp_t::in_timestamp |
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.
htp_tx_t* htp_connp_t::in_tx |
Ongoing inbound transaction.
htp_log_t* htp_connp_t::last_error |
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.
int64_t htp_connp_t::out_body_data_left |
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.
size_t htp_connp_t::out_buf_size |
Stores the size of the buffer. Valid only when htp_tx_t::out_buf is not NULL.
int64_t htp_connp_t::out_chunked_length |
Holds the amount of data that needs to be read from the current response data chunk. Only used with chunked response bodies.
int64_t htp_connp_t::out_content_length |
The length of the current response body as presented in the Content-Length response header.
int64_t htp_connp_t::out_current_consume_offset |
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.
unsigned char* htp_connp_t::out_current_data |
Pointer to the current response data chunk.
int64_t htp_connp_t::out_current_len |
The length of the current response data chunk.
int64_t htp_connp_t::out_current_read_offset |
The offset of the next byte in the response data chunk to consume.
int64_t htp_connp_t::out_current_receiver_offset |
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).
unsigned int htp_connp_t::out_data_other_at_tx_end |
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.
htp_hook_t* htp_connp_t::out_data_receiver_hook |
The hook that should be receiving raw connection data.
htp_decompressor_t* htp_connp_t::out_decompressor |
Response decompressor used to decompress response body data.
bstr* htp_connp_t::out_header |
Stores the current value of a folded response header. Such headers span multiple lines, and are processed only when all data is available.
int htp_connp_t::out_next_byte |
The value of the response byte currently being processed.
size_t htp_connp_t::out_next_tx_index |
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.
int(* htp_connp_t::out_state)(htp_connp_t *) |
Current response parser state.
int(* htp_connp_t::out_state_previous)(htp_connp_t *) |
Previous response parser state.
enum htp_stream_state_t htp_connp_t::out_status |
Parser output status. Starts as HTP_OK, but may turn into HTP_ERROR.
int64_t htp_connp_t::out_stream_offset |
The offset, in the entire connection stream, of the next response byte.
htp_time_t htp_connp_t::out_timestamp |
The time when the last response data chunk was received. Can be NULL.
htp_tx_t* htp_connp_t::out_tx |
Ongoing outbound transaction
htp_file_t* htp_connp_t::put_file |
On a PUT request, this field contains additional file data.
const void* htp_connp_t::user_data |
Opaque user data associated with this parser.