htp_request.c File Reference

#include <stdlib.h>
#include "htp.h"
Include dependency graph for htp_request.c:

Functions

int htp_connp_REQ_CONNECT_CHECK (htp_connp_t *connp)
int htp_connp_REQ_CONNECT_WAIT_RESPONSE (htp_connp_t *connp)
int htp_connp_REQ_BODY_CHUNKED_DATA_END (htp_connp_t *connp)
int htp_connp_REQ_BODY_CHUNKED_DATA (htp_connp_t *connp)
int htp_connp_REQ_BODY_CHUNKED_LENGTH (htp_connp_t *connp)
int htp_connp_REQ_BODY_IDENTITY (htp_connp_t *connp)
int htp_connp_REQ_BODY_DETERMINE (htp_connp_t *connp)
int htp_connp_REQ_HEADERS (htp_connp_t *connp)
int htp_connp_REQ_PROTOCOL (htp_connp_t *connp)
int htp_connp_REQ_LINE (htp_connp_t *connp)
int htp_connp_REQ_IDLE (htp_connp_t *connp)
size_t htp_connp_req_data_consumed (htp_connp_t *connp)
int htp_connp_req_data (htp_connp_t *connp, htp_time_t *timestamp, unsigned char *data, size_t len)

Detailed Description

Author:
Ivan Ristic <ivanr@webkreator.com>

Function Documentation

int htp_connp_REQ_BODY_CHUNKED_DATA ( htp_connp_t connp  ) 

Processes a chunk of data.

Parameters:
connp 
Returns:
HTP_OK on state change, HTTP_ERROR on error, or HTP_DATA when more data is needed.

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_REQ_BODY_CHUNKED_DATA_END ( htp_connp_t connp  ) 

Consumes bytes until the end of the current line.

Parameters:
connp 
Returns:
HTP_OK on state change, HTTP_ERROR on error, or HTP_DATA when more data is needed.

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_REQ_BODY_CHUNKED_LENGTH ( htp_connp_t connp  ) 

Extracts chunk length.

Parameters:
connp 
Returns:
HTP_OK on state change, HTTP_ERROR on error, or HTP_DATA when more data is needed.

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_REQ_BODY_DETERMINE ( htp_connp_t connp  ) 

Determines presence (and encoding) of a request body.

Parameters:
connp 
Returns:
HTP_OK on state change, HTTP_ERROR on error, or HTP_DATA when more data is needed.

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_REQ_BODY_IDENTITY ( htp_connp_t connp  ) 

Processes identity request body.

Parameters:
connp 
Returns:
HTP_OK on state change, HTTP_ERROR on error, or HTP_DATA when more data is needed.

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_REQ_CONNECT_CHECK ( htp_connp_t connp  ) 

Performs check for a CONNECT transaction to decide whether inbound parsing needs to be suspended.

Parameters:
connp 
Returns:
HTP_OK if the request does not use CONNECT, HTP_DATA_OTHER if inbound parsing needs to be suspended until we hear from the other side

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_REQ_CONNECT_WAIT_RESPONSE ( htp_connp_t connp  ) 

Determines whether inbound parsing, which was suspended after encountering a CONNECT transaction, can proceed (after receiving the response).

Parameters:
connp 
Returns:
HTP_OK if the parser can resume parsing, HTP_DATA_OTHER if it needs to continue waiting.

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_req_data ( htp_connp_t connp,
htp_time_t timestamp,
unsigned char *  data,
size_t  len 
)

Process a chunk of inbound (client or request) data.

Parameters:
connp 
timestamp 
data 
len 
Returns:
STREAM_STATE_DATA, STREAM_STATE_ERROR or STEAM_STATE_DATA_OTHER (see QUICK_START). STREAM_STATE_CLOSED and STREAM_STATE_TUNNEL are also possible.

Here is the call graph for this function:

Here is the caller graph for this function:

size_t htp_connp_req_data_consumed ( htp_connp_t connp  ) 

Returns how many bytes from the current data chunks were consumed so far.

Parameters:
connp 
Returns:
The number of bytes consumed.
int htp_connp_REQ_HEADERS ( htp_connp_t connp  ) 

Parses request headers.

Parameters:
connp 
Returns:
HTP_OK on state change, HTTP_ERROR on error, or HTP_DATA when more data is needed.

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_REQ_IDLE ( htp_connp_t connp  ) 

The idle state is invoked before and after every transaction. Consequently, it will start a new transaction when data is available and finalise a transaction which has been processed.

Parameters:
connp 
Returns:
HTP_OK on state change, HTTP_ERROR on error, or HTP_DATA when more data is needed.

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_REQ_LINE ( htp_connp_t connp  ) 

Parses request line.

Parameters:
connp 
Returns:
HTP_OK on state change, HTTP_ERROR on error, or HTP_DATA when more data is needed.

Todo:
Would be nice to reference request_line_raw data

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_connp_REQ_PROTOCOL ( htp_connp_t connp  ) 

Determines request protocol.

Parameters:
connp 
Returns:
HTP_OK on state change, HTTP_ERROR on error, or HTP_DATA when more data is needed.

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on 28 Jan 2013 for HTP by  doxygen 1.6.1