suricata
app-layer-htp-libhtp.h File Reference
#include "suricata-common.h"
Include dependency graph for app-layer-htp-libhtp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HTP_STATUS_OK   HTP_OK
 
#define HTP_STATUS_ERROR   HTP_ERROR
 
#define HTP_SERVER_PERSONALITY_APACHE_2   HTP_SERVER_APACHE_2
 
#define HTP_SERVER_PERSONALITY_MINIMAL   HTP_SERVER_MINIMAL
 
#define HTP_SERVER_PERSONALITY_GENERIC   HTP_SERVER_GENERIC
 
#define HTP_SERVER_PERSONALITY_IDS   HTP_SERVER_IDS
 
#define HTP_SERVER_PERSONALITY_IIS_4_0   HTP_SERVER_IIS_4_0
 
#define HTP_SERVER_PERSONALITY_IIS_5_0   HTP_SERVER_IIS_5_0
 
#define HTP_SERVER_PERSONALITY_IIS_5_1   HTP_SERVER_IIS_5_1
 
#define HTP_SERVER_PERSONALITY_IIS_6_0   HTP_SERVER_IIS_6_0
 
#define HTP_SERVER_PERSONALITY_IIS_7_0   HTP_SERVER_IIS_7_0
 
#define HTP_SERVER_PERSONALITY_IIS_7_5   HTP_SERVER_IIS_7_5
 
#define HTP_FLAGS_REQUEST_INVALID_T_E   HTP_REQUEST_INVALID_T_E
 
#define HTP_FLAGS_REQUEST_INVALID_C_L   HTP_REQUEST_INVALID_C_L
 
#define HTP_FLAGS_HOST_MISSING   HTP_HOST_MISSING
 
#define HTP_FLAGS_HOST_AMBIGUOUS   HTP_HOST_AMBIGUOUS
 
#define HTP_FLAGS_HOSTU_INVALID   HTP_HOSTU_INVALID
 
#define HTP_FLAGS_HOSTH_INVALID   HTP_HOSTH_INVALID
 
#define HTP_AUTH_TYPE_UNRECOGNIZED   HTP_AUTH_UNRECOGNIZED
 
#define HTP_METHOD_UNKNOWN   HTP_M_UNKNOWN
 
#define HTP_METHOD_GET   HTP_M_GET
 
#define HTP_METHOD_POST   HTP_M_POST
 
#define HTP_METHOD_PUT   HTP_M_PUT
 
#define HTP_METHOD_CONNECT   HTP_M_CONNECT
 
#define HTP_STREAM_STATE_ERROR   HTP_STREAM_ERROR
 
#define HTP_STREAM_STATE_TUNNEL   HTP_STREAM_TUNNEL
 
#define HTP_PROTOCOL_V1_1   HTP_PROTOCOL_1_1
 
#define HTP_PROTOCOL_V1_0   HTP_PROTOCOL_1_0
 
#define HTP_PROTOCOL_V0_9   HTP_PROTOCOL_0_9
 
#define HTP_REQUEST_PROGRESS_LINE   HTP_REQUEST_LINE
 
#define HTP_REQUEST_PROGRESS_HEADERS   HTP_REQUEST_HEADERS
 
#define HTP_REQUEST_PROGRESS_BODY   HTP_REQUEST_BODY
 
#define HTP_REQUEST_PROGRESS_TRAILER   HTP_REQUEST_TRAILER
 
#define HTP_REQUEST_PROGRESS_COMPLETE   HTP_REQUEST_COMPLETE
 
#define HTP_RESPONSE_PROGRESS_LINE   HTP_RESPONSE_LINE
 
#define HTP_RESPONSE_PROGRESS_HEADERS   HTP_RESPONSE_HEADERS
 
#define HTP_RESPONSE_PROGRESS_BODY   HTP_RESPONSE_BODY
 
#define HTP_RESPONSE_PROGRESS_TRAILER   HTP_RESPONSE_TRAILER
 
#define HTP_RESPONSE_PROGRESS_COMPLETE   HTP_RESPONSE_COMPLETE
 
#define HTP_LOG_CODE_UNKNOWN   HTTP_DECODER_EVENT_UNKNOWN_ERROR
 
#define HTP_LOG_CODE_GZIP_DECOMPRESSION_FAILED   HTTP_DECODER_EVENT_GZIP_DECOMPRESSION_FAILED
 
#define HTP_LOG_CODE_REQUEST_FIELD_MISSING_COLON   HTTP_DECODER_EVENT_REQUEST_FIELD_MISSING_COLON
 
#define HTP_LOG_CODE_RESPONSE_FIELD_MISSING_COLON   HTTP_DECODER_EVENT_RESPONSE_FIELD_MISSING_COLON
 
#define HTP_LOG_CODE_INVALID_REQUEST_CHUNK_LEN   HTTP_DECODER_EVENT_INVALID_REQUEST_CHUNK_LEN
 
#define HTP_LOG_CODE_INVALID_RESPONSE_CHUNK_LEN   HTTP_DECODER_EVENT_INVALID_RESPONSE_CHUNK_LEN
 
#define HTP_LOG_CODE_INVALID_TRANSFER_ENCODING_VALUE_IN_REQUEST   HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_REQUEST
 
#define HTP_LOG_CODE_INVALID_TRANSFER_ENCODING_VALUE_IN_RESPONSE   HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_RESPONSE
 
#define HTP_LOG_CODE_INVALID_CONTENT_LENGTH_FIELD_IN_REQUEST   HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_REQUEST
 
#define HTP_LOG_CODE_INVALID_CONTENT_LENGTH_FIELD_IN_RESPONSE   HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_RESPONSE
 
#define HTP_LOG_CODE_DUPLICATE_CONTENT_LENGTH_FIELD_IN_REQUEST   HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_REQUEST
 
#define HTP_LOG_CODE_DUPLICATE_CONTENT_LENGTH_FIELD_IN_RESPONSE   HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_RESPONSE
 
#define HTP_LOG_CODE_CONTINUE_ALREADY_SEEN   HTTP_DECODER_EVENT_100_CONTINUE_ALREADY_SEEN
 
#define HTP_LOG_CODE_UNABLE_TO_MATCH_RESPONSE_TO_REQUEST   HTTP_DECODER_EVENT_UNABLE_TO_MATCH_RESPONSE_TO_REQUEST
 
#define HTP_LOG_CODE_INVALID_SERVER_PORT_IN_REQUEST   HTTP_DECODER_EVENT_INVALID_SERVER_PORT_IN_REQUEST
 
#define HTP_LOG_CODE_INVALID_AUTHORITY_PORT   HTTP_DECODER_EVENT_INVALID_AUTHORITY_PORT
 
#define HTP_LOG_CODE_REQUEST_HEADER_INVALID   HTTP_DECODER_EVENT_REQUEST_HEADER_INVALID
 
#define HTP_LOG_CODE_RESPONSE_HEADER_INVALID   HTTP_DECODER_EVENT_RESPONSE_HEADER_INVALID
 
#define HTP_LOG_CODE_MISSING_HOST_HEADER   HTTP_DECODER_EVENT_MISSING_HOST_HEADER
 
#define HTP_LOG_CODE_HOST_HEADER_AMBIGUOUS   HTTP_DECODER_EVENT_HOST_HEADER_AMBIGUOUS
 
#define HTP_LOG_CODE_INVALID_REQUEST_FIELD_FOLDING   HTTP_DECODER_EVENT_INVALID_REQUEST_FIELD_FOLDING
 
#define HTP_LOG_CODE_INVALID_RESPONSE_FIELD_FOLDING   HTTP_DECODER_EVENT_INVALID_RESPONSE_FIELD_FOLDING
 
#define HTP_LOG_CODE_REQUEST_FIELD_TOO_LONG   HTTP_DECODER_EVENT_REQUEST_FIELD_TOO_LONG
 
#define HTP_LOG_CODE_RESPONSE_FIELD_TOO_LONG   HTTP_DECODER_EVENT_RESPONSE_FIELD_TOO_LONG
 
#define HTP_LOG_CODE_FILE_NAME_TOO_LONG   HTTP_DECODER_EVENT_FILE_NAME_TOO_LONG
 
#define HTP_LOG_CODE_REQUEST_LINE_INVALID   HTTP_DECODER_EVENT_REQUEST_LINE_INVALID
 
#define HTP_LOG_CODE_REQUEST_BODY_UNEXPECTED   HTTP_DECODER_EVENT_REQUEST_BODY_UNEXPECTED
 
#define HTP_LOG_CODE_REQUEST_SERVER_PORT_TCP_PORT_MISMATCH   HTTP_DECODER_EVENT_REQUEST_SERVER_PORT_TCP_PORT_MISMATCH
 
#define HTP_LOG_CODE_URI_HOST_INVALID   HTTP_DECODER_EVENT_URI_HOST_INVALID
 
#define HTP_LOG_CODE_HEADER_HOST_INVALID   HTTP_DECODER_EVENT_HEADER_HOST_INVALID
 
#define HTP_LOG_CODE_AUTH_UNRECOGNIZED   HTTP_DECODER_EVENT_AUTH_UNRECOGNIZED
 
#define HTP_LOG_CODE_REQUEST_HEADER_REPETITION   HTTP_DECODER_EVENT_REQUEST_HEADER_REPETITION
 
#define HTP_LOG_CODE_RESPONSE_HEADER_REPETITION   HTTP_DECODER_EVENT_RESPONSE_HEADER_REPETITION
 
#define HTP_LOG_CODE_DOUBLE_ENCODED_URI   HTTP_DECODER_EVENT_DOUBLE_ENCODED_URI
 
#define HTP_LOG_CODE_URI_DELIM_NON_COMPLIANT   HTTP_DECODER_EVENT_URI_DELIM_NON_COMPLIANT
 
#define HTP_LOG_CODE_METHOD_DELIM_NON_COMPLIANT   HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT
 
#define HTP_LOG_CODE_REQUEST_LINE_LEADING_WHITESPACE   HTTP_DECODER_EVENT_REQUEST_LINE_LEADING_WHITESPACE
 
#define HTP_LOG_CODE_TOO_MANY_ENCODING_LAYERS   HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS
 
#define HTP_LOG_CODE_ABNORMAL_CE_HEADER   HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER
 
#define HTP_LOG_CODE_RESPONSE_MULTIPART_BYTERANGES   HTTP_DECODER_EVENT_RESPONSE_MULTIPART_BYTERANGES
 
#define HTP_LOG_CODE_RESPONSE_ABNORMAL_TRANSFER_ENCODING   HTTP_DECODER_EVENT_RESPONSE_ABNORMAL_TRANSFER_ENCODING
 
#define HTP_LOG_CODE_RESPONSE_CHUNKED_OLD_PROTO   HTTP_DECODER_EVENT_RESPONSE_CHUNKED_OLD_PROTO
 
#define HTP_LOG_CODE_RESPONSE_INVALID_PROTOCOL   HTTP_DECODER_EVENT_RESPONSE_INVALID_PROTOCOL
 
#define HTP_LOG_CODE_RESPONSE_INVALID_STATUS   HTTP_DECODER_EVENT_RESPONSE_INVALID_STATUS
 
#define HTP_LOG_CODE_REQUEST_LINE_INCOMPLETE   HTTP_DECODER_EVENT_REQUEST_LINE_INCOMPLETE
 
#define HTP_LOG_CODE_LZMA_MEMLIMIT_REACHED   HTTP_DECODER_EVENT_LZMA_MEMLIMIT_REACHED
 
#define HTP_LOG_CODE_COMPRESSION_BOMB   HTTP_DECODER_EVENT_COMPRESSION_BOMB
 
#define htp_tx_flags(tx)   (tx)->flags
 
#define htp_tx_is_protocol_0_9(tx)   (tx)->is_protocol_0_9
 
#define htp_tx_request_auth_type(tx)   (tx)->request_auth_type
 
#define htp_tx_request_hostname(tx)   (tx)->request_hostname
 
#define htp_tx_request_line(tx)   (tx)->request_line
 
#define htp_tx_request_message_len(tx)   (tx)->request_message_len
 
#define htp_tx_request_method(tx)   (tx)->request_method
 
#define htp_tx_request_method_number(tx)   tx->request_method_number
 
#define htp_tx_request_port_number(tx)   (tx)->request_port_number
 
#define htp_tx_request_progress(tx)   (tx)->request_progress
 
#define htp_tx_request_protocol(tx)   (tx)->request_protocol
 
#define htp_tx_request_protocol_number(tx)   (tx)->request_protocol_number
 
#define htp_tx_request_uri(tx)   (tx)->request_uri
 
#define htp_tx_request_headers(tx)   (tx)->request_headers
 
#define htp_tx_response_headers(tx)   (tx)->response_headers
 
#define htp_tx_response_protocol(tx)   (tx)->response_protocol
 
#define htp_tx_response_line(tx)   (tx)->response_line
 
#define htp_tx_response_message(tx)   (tx)->response_message
 
#define htp_tx_response_message_len(tx)   (tx)->response_message_len
 
#define htp_tx_response_status(tx)   (tx)->response_status
 
#define htp_tx_response_status_number(tx)   (tx)->response_status_number
 
#define htp_tx_response_progress(tx)   (tx)->response_progress
 
#define htp_tx_response_protocol_number(tx)   (tx)->response_protocol_number
 
#define htp_tx_request_header(tx, header)   htp_table_get_c((tx)->request_headers, header)
 
#define htp_tx_response_header(tx, header)   htp_table_get_c((tx)->response_headers, header)
 
#define htp_header_name_len(h)   bstr_len((h)->name)
 
#define htp_header_name_ptr(h)   bstr_ptr((h)->name)
 
#define htp_header_name(h)   (h)->name
 
#define htp_header_value_len(h)   bstr_len((h)->value)
 
#define htp_header_value_ptr(h)   bstr_ptr((h)->value)
 
#define htp_header_value(h)   (h)->value
 
#define htp_headers_size(headers)   htp_table_size(headers)
 
#define htp_headers_get_index(headers, index)   htp_table_get_index(headers, index, NULL)
 
#define htp_tx_request_headers_size(tx)   htp_table_size((tx)->request_headers)
 
#define htp_tx_request_header_index(tx, i)   htp_table_get_index((tx)->request_headers, i, NULL);
 
#define htp_headers_t   htp_table_t
 
#define htp_tx_data_len(d)   (d)->len
 
#define htp_tx_data_data(d)   (d)->data
 
#define htp_tx_data_tx(d)   (d)->tx
 
#define htp_conn_request_data_counter(c)   (c)->in_data_counter
 
#define htp_conn_response_data_counter(c)   (c)->out_data_counter
 

Functions

bstr * SCHTPGenerateNormalizedUri (htp_tx_t *tx, htp_uri_t *uri, bool uri_include_all)
 Generates the normalized uri. More...
 

Detailed Description

Author
Anoop Saldanha anoop.nosp@m.sald.nosp@m.anha@.nosp@m.gmai.nosp@m.l.com

APIs from libhtp 0.5.x.

Definition in file app-layer-htp-libhtp.h.

Macro Definition Documentation

◆ HTP_AUTH_TYPE_UNRECOGNIZED

#define HTP_AUTH_TYPE_UNRECOGNIZED   HTP_AUTH_UNRECOGNIZED

Definition at line 74 of file app-layer-htp-libhtp.h.

◆ htp_conn_request_data_counter

#define htp_conn_request_data_counter (   c)    (c)->in_data_counter

Definition at line 209 of file app-layer-htp-libhtp.h.

◆ htp_conn_response_data_counter

#define htp_conn_response_data_counter (   c)    (c)->out_data_counter

Definition at line 210 of file app-layer-htp-libhtp.h.

◆ HTP_FLAGS_HOST_AMBIGUOUS

#define HTP_FLAGS_HOST_AMBIGUOUS   HTP_HOST_AMBIGUOUS

Definition at line 70 of file app-layer-htp-libhtp.h.

◆ HTP_FLAGS_HOST_MISSING

#define HTP_FLAGS_HOST_MISSING   HTP_HOST_MISSING

Definition at line 69 of file app-layer-htp-libhtp.h.

◆ HTP_FLAGS_HOSTH_INVALID

#define HTP_FLAGS_HOSTH_INVALID   HTP_HOSTH_INVALID

Definition at line 72 of file app-layer-htp-libhtp.h.

◆ HTP_FLAGS_HOSTU_INVALID

#define HTP_FLAGS_HOSTU_INVALID   HTP_HOSTU_INVALID

Definition at line 71 of file app-layer-htp-libhtp.h.

◆ HTP_FLAGS_REQUEST_INVALID_C_L

#define HTP_FLAGS_REQUEST_INVALID_C_L   HTP_REQUEST_INVALID_C_L

Definition at line 68 of file app-layer-htp-libhtp.h.

◆ HTP_FLAGS_REQUEST_INVALID_T_E

#define HTP_FLAGS_REQUEST_INVALID_T_E   HTP_REQUEST_INVALID_T_E

Definition at line 67 of file app-layer-htp-libhtp.h.

◆ htp_header_name

#define htp_header_name (   h)    (h)->name

Definition at line 191 of file app-layer-htp-libhtp.h.

◆ htp_header_name_len

#define htp_header_name_len (   h)    bstr_len((h)->name)

Definition at line 189 of file app-layer-htp-libhtp.h.

◆ htp_header_name_ptr

#define htp_header_name_ptr (   h)    bstr_ptr((h)->name)

Definition at line 190 of file app-layer-htp-libhtp.h.

◆ htp_header_value

#define htp_header_value (   h)    (h)->value

Definition at line 194 of file app-layer-htp-libhtp.h.

◆ htp_header_value_len

#define htp_header_value_len (   h)    bstr_len((h)->value)

Definition at line 192 of file app-layer-htp-libhtp.h.

◆ htp_header_value_ptr

#define htp_header_value_ptr (   h)    bstr_ptr((h)->value)

Definition at line 193 of file app-layer-htp-libhtp.h.

◆ htp_headers_get_index

#define htp_headers_get_index (   headers,
  index 
)    htp_table_get_index(headers, index, NULL)

Definition at line 198 of file app-layer-htp-libhtp.h.

◆ htp_headers_size

#define htp_headers_size (   headers)    htp_table_size(headers)

Definition at line 197 of file app-layer-htp-libhtp.h.

◆ htp_headers_t

#define htp_headers_t   htp_table_t

Definition at line 201 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_ABNORMAL_CE_HEADER

#define HTP_LOG_CODE_ABNORMAL_CE_HEADER   HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER

Definition at line 149 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_AUTH_UNRECOGNIZED

#define HTP_LOG_CODE_AUTH_UNRECOGNIZED   HTTP_DECODER_EVENT_AUTH_UNRECOGNIZED

Definition at line 140 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_COMPRESSION_BOMB

#define HTP_LOG_CODE_COMPRESSION_BOMB   HTTP_DECODER_EVENT_COMPRESSION_BOMB

Definition at line 158 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_CONTINUE_ALREADY_SEEN

#define HTP_LOG_CODE_CONTINUE_ALREADY_SEEN   HTTP_DECODER_EVENT_100_CONTINUE_ALREADY_SEEN

Definition at line 118 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_DOUBLE_ENCODED_URI

#define HTP_LOG_CODE_DOUBLE_ENCODED_URI   HTTP_DECODER_EVENT_DOUBLE_ENCODED_URI

Definition at line 143 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_DUPLICATE_CONTENT_LENGTH_FIELD_IN_REQUEST

#define HTP_LOG_CODE_DUPLICATE_CONTENT_LENGTH_FIELD_IN_REQUEST   HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_REQUEST

Definition at line 114 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_DUPLICATE_CONTENT_LENGTH_FIELD_IN_RESPONSE

#define HTP_LOG_CODE_DUPLICATE_CONTENT_LENGTH_FIELD_IN_RESPONSE   HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_RESPONSE

Definition at line 116 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_FILE_NAME_TOO_LONG

#define HTP_LOG_CODE_FILE_NAME_TOO_LONG   HTTP_DECODER_EVENT_FILE_NAME_TOO_LONG

Definition at line 133 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_GZIP_DECOMPRESSION_FAILED

#define HTP_LOG_CODE_GZIP_DECOMPRESSION_FAILED   HTTP_DECODER_EVENT_GZIP_DECOMPRESSION_FAILED

Definition at line 101 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_HEADER_HOST_INVALID

#define HTP_LOG_CODE_HEADER_HOST_INVALID   HTTP_DECODER_EVENT_HEADER_HOST_INVALID

Definition at line 139 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_HOST_HEADER_AMBIGUOUS

#define HTP_LOG_CODE_HOST_HEADER_AMBIGUOUS   HTTP_DECODER_EVENT_HOST_HEADER_AMBIGUOUS

Definition at line 127 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_AUTHORITY_PORT

#define HTP_LOG_CODE_INVALID_AUTHORITY_PORT   HTTP_DECODER_EVENT_INVALID_AUTHORITY_PORT

Definition at line 123 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_CONTENT_LENGTH_FIELD_IN_REQUEST

#define HTP_LOG_CODE_INVALID_CONTENT_LENGTH_FIELD_IN_REQUEST   HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_REQUEST

Definition at line 110 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_CONTENT_LENGTH_FIELD_IN_RESPONSE

#define HTP_LOG_CODE_INVALID_CONTENT_LENGTH_FIELD_IN_RESPONSE   HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_RESPONSE

Definition at line 112 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_REQUEST_CHUNK_LEN

#define HTP_LOG_CODE_INVALID_REQUEST_CHUNK_LEN   HTTP_DECODER_EVENT_INVALID_REQUEST_CHUNK_LEN

Definition at line 104 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_REQUEST_FIELD_FOLDING

#define HTP_LOG_CODE_INVALID_REQUEST_FIELD_FOLDING   HTTP_DECODER_EVENT_INVALID_REQUEST_FIELD_FOLDING

Definition at line 128 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_RESPONSE_CHUNK_LEN

#define HTP_LOG_CODE_INVALID_RESPONSE_CHUNK_LEN   HTTP_DECODER_EVENT_INVALID_RESPONSE_CHUNK_LEN

Definition at line 105 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_RESPONSE_FIELD_FOLDING

#define HTP_LOG_CODE_INVALID_RESPONSE_FIELD_FOLDING   HTTP_DECODER_EVENT_INVALID_RESPONSE_FIELD_FOLDING

Definition at line 129 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_SERVER_PORT_IN_REQUEST

#define HTP_LOG_CODE_INVALID_SERVER_PORT_IN_REQUEST   HTTP_DECODER_EVENT_INVALID_SERVER_PORT_IN_REQUEST

Definition at line 121 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_TRANSFER_ENCODING_VALUE_IN_REQUEST

#define HTP_LOG_CODE_INVALID_TRANSFER_ENCODING_VALUE_IN_REQUEST   HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_REQUEST

Definition at line 106 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_INVALID_TRANSFER_ENCODING_VALUE_IN_RESPONSE

#define HTP_LOG_CODE_INVALID_TRANSFER_ENCODING_VALUE_IN_RESPONSE   HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_RESPONSE

Definition at line 108 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_LZMA_MEMLIMIT_REACHED

#define HTP_LOG_CODE_LZMA_MEMLIMIT_REACHED   HTTP_DECODER_EVENT_LZMA_MEMLIMIT_REACHED

Definition at line 157 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_METHOD_DELIM_NON_COMPLIANT

#define HTP_LOG_CODE_METHOD_DELIM_NON_COMPLIANT   HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT

Definition at line 145 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_MISSING_HOST_HEADER

#define HTP_LOG_CODE_MISSING_HOST_HEADER   HTTP_DECODER_EVENT_MISSING_HOST_HEADER

Definition at line 126 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_REQUEST_BODY_UNEXPECTED

#define HTP_LOG_CODE_REQUEST_BODY_UNEXPECTED   HTTP_DECODER_EVENT_REQUEST_BODY_UNEXPECTED

Definition at line 135 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_REQUEST_FIELD_MISSING_COLON

#define HTP_LOG_CODE_REQUEST_FIELD_MISSING_COLON   HTTP_DECODER_EVENT_REQUEST_FIELD_MISSING_COLON

Definition at line 102 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_REQUEST_FIELD_TOO_LONG

#define HTP_LOG_CODE_REQUEST_FIELD_TOO_LONG   HTTP_DECODER_EVENT_REQUEST_FIELD_TOO_LONG

Definition at line 131 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_REQUEST_HEADER_INVALID

#define HTP_LOG_CODE_REQUEST_HEADER_INVALID   HTTP_DECODER_EVENT_REQUEST_HEADER_INVALID

Definition at line 124 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_REQUEST_HEADER_REPETITION

#define HTP_LOG_CODE_REQUEST_HEADER_REPETITION   HTTP_DECODER_EVENT_REQUEST_HEADER_REPETITION

Definition at line 141 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_REQUEST_LINE_INCOMPLETE

#define HTP_LOG_CODE_REQUEST_LINE_INCOMPLETE   HTTP_DECODER_EVENT_REQUEST_LINE_INCOMPLETE

Definition at line 156 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_REQUEST_LINE_INVALID

#define HTP_LOG_CODE_REQUEST_LINE_INVALID   HTTP_DECODER_EVENT_REQUEST_LINE_INVALID

Definition at line 134 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_REQUEST_LINE_LEADING_WHITESPACE

#define HTP_LOG_CODE_REQUEST_LINE_LEADING_WHITESPACE   HTTP_DECODER_EVENT_REQUEST_LINE_LEADING_WHITESPACE

Definition at line 146 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_REQUEST_SERVER_PORT_TCP_PORT_MISMATCH

#define HTP_LOG_CODE_REQUEST_SERVER_PORT_TCP_PORT_MISMATCH   HTTP_DECODER_EVENT_REQUEST_SERVER_PORT_TCP_PORT_MISMATCH

Definition at line 136 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_RESPONSE_ABNORMAL_TRANSFER_ENCODING

#define HTP_LOG_CODE_RESPONSE_ABNORMAL_TRANSFER_ENCODING   HTTP_DECODER_EVENT_RESPONSE_ABNORMAL_TRANSFER_ENCODING

Definition at line 151 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_RESPONSE_CHUNKED_OLD_PROTO

#define HTP_LOG_CODE_RESPONSE_CHUNKED_OLD_PROTO   HTTP_DECODER_EVENT_RESPONSE_CHUNKED_OLD_PROTO

Definition at line 153 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_RESPONSE_FIELD_MISSING_COLON

#define HTP_LOG_CODE_RESPONSE_FIELD_MISSING_COLON   HTTP_DECODER_EVENT_RESPONSE_FIELD_MISSING_COLON

Definition at line 103 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_RESPONSE_FIELD_TOO_LONG

#define HTP_LOG_CODE_RESPONSE_FIELD_TOO_LONG   HTTP_DECODER_EVENT_RESPONSE_FIELD_TOO_LONG

Definition at line 132 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_RESPONSE_HEADER_INVALID

#define HTP_LOG_CODE_RESPONSE_HEADER_INVALID   HTTP_DECODER_EVENT_RESPONSE_HEADER_INVALID

Definition at line 125 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_RESPONSE_HEADER_REPETITION

#define HTP_LOG_CODE_RESPONSE_HEADER_REPETITION   HTTP_DECODER_EVENT_RESPONSE_HEADER_REPETITION

Definition at line 142 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_RESPONSE_INVALID_PROTOCOL

#define HTP_LOG_CODE_RESPONSE_INVALID_PROTOCOL   HTTP_DECODER_EVENT_RESPONSE_INVALID_PROTOCOL

Definition at line 154 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_RESPONSE_INVALID_STATUS

#define HTP_LOG_CODE_RESPONSE_INVALID_STATUS   HTTP_DECODER_EVENT_RESPONSE_INVALID_STATUS

Definition at line 155 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_RESPONSE_MULTIPART_BYTERANGES

#define HTP_LOG_CODE_RESPONSE_MULTIPART_BYTERANGES   HTTP_DECODER_EVENT_RESPONSE_MULTIPART_BYTERANGES

Definition at line 150 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_TOO_MANY_ENCODING_LAYERS

#define HTP_LOG_CODE_TOO_MANY_ENCODING_LAYERS   HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS

Definition at line 148 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_UNABLE_TO_MATCH_RESPONSE_TO_REQUEST

#define HTP_LOG_CODE_UNABLE_TO_MATCH_RESPONSE_TO_REQUEST   HTTP_DECODER_EVENT_UNABLE_TO_MATCH_RESPONSE_TO_REQUEST

Definition at line 119 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_UNKNOWN

#define HTP_LOG_CODE_UNKNOWN   HTTP_DECODER_EVENT_UNKNOWN_ERROR

Definition at line 100 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_URI_DELIM_NON_COMPLIANT

#define HTP_LOG_CODE_URI_DELIM_NON_COMPLIANT   HTTP_DECODER_EVENT_URI_DELIM_NON_COMPLIANT

Definition at line 144 of file app-layer-htp-libhtp.h.

◆ HTP_LOG_CODE_URI_HOST_INVALID

#define HTP_LOG_CODE_URI_HOST_INVALID   HTTP_DECODER_EVENT_URI_HOST_INVALID

Definition at line 138 of file app-layer-htp-libhtp.h.

◆ HTP_METHOD_CONNECT

#define HTP_METHOD_CONNECT   HTP_M_CONNECT

Definition at line 80 of file app-layer-htp-libhtp.h.

◆ HTP_METHOD_GET

#define HTP_METHOD_GET   HTP_M_GET

Definition at line 77 of file app-layer-htp-libhtp.h.

◆ HTP_METHOD_POST

#define HTP_METHOD_POST   HTP_M_POST

Definition at line 78 of file app-layer-htp-libhtp.h.

◆ HTP_METHOD_PUT

#define HTP_METHOD_PUT   HTP_M_PUT

Definition at line 79 of file app-layer-htp-libhtp.h.

◆ HTP_METHOD_UNKNOWN

#define HTP_METHOD_UNKNOWN   HTP_M_UNKNOWN

Definition at line 76 of file app-layer-htp-libhtp.h.

◆ HTP_PROTOCOL_V0_9

#define HTP_PROTOCOL_V0_9   HTP_PROTOCOL_0_9

Definition at line 87 of file app-layer-htp-libhtp.h.

◆ HTP_PROTOCOL_V1_0

#define HTP_PROTOCOL_V1_0   HTP_PROTOCOL_1_0

Definition at line 86 of file app-layer-htp-libhtp.h.

◆ HTP_PROTOCOL_V1_1

#define HTP_PROTOCOL_V1_1   HTP_PROTOCOL_1_1

Definition at line 85 of file app-layer-htp-libhtp.h.

◆ HTP_REQUEST_PROGRESS_BODY

#define HTP_REQUEST_PROGRESS_BODY   HTP_REQUEST_BODY

Definition at line 91 of file app-layer-htp-libhtp.h.

◆ HTP_REQUEST_PROGRESS_COMPLETE

#define HTP_REQUEST_PROGRESS_COMPLETE   HTP_REQUEST_COMPLETE

Definition at line 93 of file app-layer-htp-libhtp.h.

◆ HTP_REQUEST_PROGRESS_HEADERS

#define HTP_REQUEST_PROGRESS_HEADERS   HTP_REQUEST_HEADERS

Definition at line 90 of file app-layer-htp-libhtp.h.

◆ HTP_REQUEST_PROGRESS_LINE

#define HTP_REQUEST_PROGRESS_LINE   HTP_REQUEST_LINE

Definition at line 89 of file app-layer-htp-libhtp.h.

◆ HTP_REQUEST_PROGRESS_TRAILER

#define HTP_REQUEST_PROGRESS_TRAILER   HTP_REQUEST_TRAILER

Definition at line 92 of file app-layer-htp-libhtp.h.

◆ HTP_RESPONSE_PROGRESS_BODY

#define HTP_RESPONSE_PROGRESS_BODY   HTP_RESPONSE_BODY

Definition at line 96 of file app-layer-htp-libhtp.h.

◆ HTP_RESPONSE_PROGRESS_COMPLETE

#define HTP_RESPONSE_PROGRESS_COMPLETE   HTP_RESPONSE_COMPLETE

Definition at line 98 of file app-layer-htp-libhtp.h.

◆ HTP_RESPONSE_PROGRESS_HEADERS

#define HTP_RESPONSE_PROGRESS_HEADERS   HTP_RESPONSE_HEADERS

Definition at line 95 of file app-layer-htp-libhtp.h.

◆ HTP_RESPONSE_PROGRESS_LINE

#define HTP_RESPONSE_PROGRESS_LINE   HTP_RESPONSE_LINE

Definition at line 94 of file app-layer-htp-libhtp.h.

◆ HTP_RESPONSE_PROGRESS_TRAILER

#define HTP_RESPONSE_PROGRESS_TRAILER   HTP_RESPONSE_TRAILER

Definition at line 97 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_APACHE_2

#define HTP_SERVER_PERSONALITY_APACHE_2   HTP_SERVER_APACHE_2

Definition at line 56 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_GENERIC

#define HTP_SERVER_PERSONALITY_GENERIC   HTP_SERVER_GENERIC

Definition at line 58 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_IDS

#define HTP_SERVER_PERSONALITY_IDS   HTP_SERVER_IDS

Definition at line 59 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_IIS_4_0

#define HTP_SERVER_PERSONALITY_IIS_4_0   HTP_SERVER_IIS_4_0

Definition at line 60 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_IIS_5_0

#define HTP_SERVER_PERSONALITY_IIS_5_0   HTP_SERVER_IIS_5_0

Definition at line 61 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_IIS_5_1

#define HTP_SERVER_PERSONALITY_IIS_5_1   HTP_SERVER_IIS_5_1

Definition at line 62 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_IIS_6_0

#define HTP_SERVER_PERSONALITY_IIS_6_0   HTP_SERVER_IIS_6_0

Definition at line 63 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_IIS_7_0

#define HTP_SERVER_PERSONALITY_IIS_7_0   HTP_SERVER_IIS_7_0

Definition at line 64 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_IIS_7_5

#define HTP_SERVER_PERSONALITY_IIS_7_5   HTP_SERVER_IIS_7_5

Definition at line 65 of file app-layer-htp-libhtp.h.

◆ HTP_SERVER_PERSONALITY_MINIMAL

#define HTP_SERVER_PERSONALITY_MINIMAL   HTP_SERVER_MINIMAL

Definition at line 57 of file app-layer-htp-libhtp.h.

◆ HTP_STATUS_ERROR

#define HTP_STATUS_ERROR   HTP_ERROR

Definition at line 54 of file app-layer-htp-libhtp.h.

◆ HTP_STATUS_OK

#define HTP_STATUS_OK   HTP_OK

Definition at line 53 of file app-layer-htp-libhtp.h.

◆ HTP_STREAM_STATE_ERROR

#define HTP_STREAM_STATE_ERROR   HTP_STREAM_ERROR

Definition at line 82 of file app-layer-htp-libhtp.h.

◆ HTP_STREAM_STATE_TUNNEL

#define HTP_STREAM_STATE_TUNNEL   HTP_STREAM_TUNNEL

Definition at line 83 of file app-layer-htp-libhtp.h.

◆ htp_tx_data_data

#define htp_tx_data_data (   d)    (d)->data

Definition at line 205 of file app-layer-htp-libhtp.h.

◆ htp_tx_data_len

#define htp_tx_data_len (   d)    (d)->len

Definition at line 204 of file app-layer-htp-libhtp.h.

◆ htp_tx_data_tx

#define htp_tx_data_tx (   d)    (d)->tx

Definition at line 206 of file app-layer-htp-libhtp.h.

◆ htp_tx_flags

#define htp_tx_flags (   tx)    (tx)->flags

Definition at line 161 of file app-layer-htp-libhtp.h.

◆ htp_tx_is_protocol_0_9

#define htp_tx_is_protocol_0_9 (   tx)    (tx)->is_protocol_0_9

Definition at line 162 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_auth_type

#define htp_tx_request_auth_type (   tx)    (tx)->request_auth_type

Definition at line 163 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_header

#define htp_tx_request_header (   tx,
  header 
)    htp_table_get_c((tx)->request_headers, header)

Definition at line 185 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_header_index

#define htp_tx_request_header_index (   tx,
 
)    htp_table_get_index((tx)->request_headers, i, NULL);

Definition at line 200 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_headers

#define htp_tx_request_headers (   tx)    (tx)->request_headers

Definition at line 174 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_headers_size

#define htp_tx_request_headers_size (   tx)    htp_table_size((tx)->request_headers)

Definition at line 199 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_hostname

#define htp_tx_request_hostname (   tx)    (tx)->request_hostname

Definition at line 164 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_line

#define htp_tx_request_line (   tx)    (tx)->request_line

Definition at line 165 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_message_len

#define htp_tx_request_message_len (   tx)    (tx)->request_message_len

Definition at line 166 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_method

#define htp_tx_request_method (   tx)    (tx)->request_method

Definition at line 167 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_method_number

#define htp_tx_request_method_number (   tx)    tx->request_method_number

Definition at line 168 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_port_number

#define htp_tx_request_port_number (   tx)    (tx)->request_port_number

Definition at line 169 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_progress

#define htp_tx_request_progress (   tx)    (tx)->request_progress

Definition at line 170 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_protocol

#define htp_tx_request_protocol (   tx)    (tx)->request_protocol

Definition at line 171 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_protocol_number

#define htp_tx_request_protocol_number (   tx)    (tx)->request_protocol_number

Definition at line 172 of file app-layer-htp-libhtp.h.

◆ htp_tx_request_uri

#define htp_tx_request_uri (   tx)    (tx)->request_uri

Definition at line 173 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_header

#define htp_tx_response_header (   tx,
  header 
)    htp_table_get_c((tx)->response_headers, header)

Definition at line 186 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_headers

#define htp_tx_response_headers (   tx)    (tx)->response_headers

Definition at line 175 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_line

#define htp_tx_response_line (   tx)    (tx)->response_line

Definition at line 177 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_message

#define htp_tx_response_message (   tx)    (tx)->response_message

Definition at line 178 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_message_len

#define htp_tx_response_message_len (   tx)    (tx)->response_message_len

Definition at line 179 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_progress

#define htp_tx_response_progress (   tx)    (tx)->response_progress

Definition at line 182 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_protocol

#define htp_tx_response_protocol (   tx)    (tx)->response_protocol

Definition at line 176 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_protocol_number

#define htp_tx_response_protocol_number (   tx)    (tx)->response_protocol_number

Definition at line 183 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_status

#define htp_tx_response_status (   tx)    (tx)->response_status

Definition at line 180 of file app-layer-htp-libhtp.h.

◆ htp_tx_response_status_number

#define htp_tx_response_status_number (   tx)    (tx)->response_status_number

Definition at line 181 of file app-layer-htp-libhtp.h.

Function Documentation

◆ SCHTPGenerateNormalizedUri()

bstr* SCHTPGenerateNormalizedUri ( htp_tx_t *  tx,
htp_uri_t *  uri,
bool  uri_include_all 
)

Generates the normalized uri.

   Libhtp doesn't recreate the whole normalized uri and save it.
   That duty has now been passed to us.  A lot of this code has been
   copied from libhtp.

   Keep an eye out on the tx->parsed_uri struct and how the parameters
   in it are generated, just in case some modifications are made to
   them in the future.
Parameters
uri_include_allboolean to indicate if scheme, username/password, hostname and port should be part of the buffer

Definition at line 64 of file app-layer-htp-libhtp.c.

References flags, and len.