HTP  0.3
Data Structures | Macros | Typedefs | Functions
htp_urlencoded.h File Reference
#include "htp.h"
Include dependency graph for htp_urlencoded.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  htp_urlenp_t
struct  htp_urlen_param_t

Macros

#define HTP_URLENP_DEFAULT_PARAMS_SIZE   32
#define HTP_URLENP_STATE_KEY   1
#define HTP_URLENP_STATE_VALUE   2
#define HTP_URLENCODED_MIME_TYPE   "application/x-www-form-urlencoded"

Typedefs

typedef struct htp_urlenp_t htp_urlenp_t
typedef struct htp_urlen_param_t htp_urlen_param_t

Functions

htp_urlenp_thtp_urlenp_create (htp_tx_t *tx)
void htp_urlenp_destroy (htp_urlenp_t **urlenp)
void htp_urlenp_set_argument_separator (htp_urlenp_t *urlenp, unsigned char argument_separator)
void htp_urlenp_set_decode_url_encoding (htp_urlenp_t *urlenp, int decode_url_encoding)
int htp_urlenp_parse_partial (htp_urlenp_t *urlenp, unsigned char *data, size_t len)
int htp_urlenp_parse_complete (htp_urlenp_t *urlenp, unsigned char *data, size_t len)
int htp_urlenp_finalize (htp_urlenp_t *urlenp)
int htp_ch_urlencoded_callback_request_line (htp_connp_t *connp)
int htp_ch_urlencoded_callback_request_headers (htp_connp_t *connp)

Detailed Description

Author
Ivan Ristic ivanr.nosp@m.@web.nosp@m.kreat.nosp@m.or.c.nosp@m.om

Macro Definition Documentation

#define HTP_URLENCODED_MIME_TYPE   "application/x-www-form-urlencoded"
#define HTP_URLENP_DEFAULT_PARAMS_SIZE   32
#define HTP_URLENP_STATE_KEY   1
#define HTP_URLENP_STATE_VALUE   2

Typedef Documentation

typedef struct htp_urlenp_t htp_urlenp_t

Function Documentation

int htp_ch_urlencoded_callback_request_headers ( htp_connp_t connp)

Determine if the request has a URLENCODED body, then create and attach the URLENCODED parser if it does.

Here is the call graph for this function:

int htp_ch_urlencoded_callback_request_line ( htp_connp_t connp)

Parse query string, if available. This method is invoked after the request line has been processed.

Parameters
connp

Here is the call graph for this function:

htp_urlenp_t* htp_urlenp_create ( htp_tx_t tx)

Creates a new URLENCODED parser.

Returns
New parser, or NULL on memory allocation failure.

Here is the call graph for this function:

Here is the caller graph for this function:

void htp_urlenp_destroy ( htp_urlenp_t **  _urlenp)

Destroys an existing URLENCODED parser.

Parameters
urlenp

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_urlenp_finalize ( htp_urlenp_t urlenp)

Finalizes parsing, forcing the parser to convert any outstanding data into parameters. This method should be invoked at the end of a parsing operation that used htp_urlenp_parse_partial().

Parameters
urlenp
Returns
Success indication

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_urlenp_parse_complete ( htp_urlenp_t urlenp,
unsigned char *  data,
size_t  len 
)

Parses the provided data chunk under the assumption that it contains all the data that will be parsed. When this method is used for parsing the finalization method should not be invoked.

Parameters
urlenp
data
len
Returns

Here is the call graph for this function:

Here is the caller graph for this function:

int htp_urlenp_parse_partial ( htp_urlenp_t urlenp,
unsigned char *  data,
size_t  len 
)

Parses the provided data chunk, keeping state to allow streaming parsing, i.e., the parsing where only partial information is available at any one time. The method htp_urlenp_finalize() must be invoked at the end to finalize parsing.

Parameters
urlenp
data
len
Returns

Here is the caller graph for this function:

void htp_urlenp_set_argument_separator ( htp_urlenp_t urlenp,
unsigned char  argument_separator 
)
void htp_urlenp_set_decode_url_encoding ( htp_urlenp_t urlenp,
int  decode_url_encoding 
)