#include <sys/types.h>
#include "hi_include.h"
#include "hi_ui_config.h"
#include "hi_si.h"
Go to the source code of this file.
Functions | |
int | hi_norm_init (HTTPINSPECT_GLOBAL_CONF *GlobalConf) |
int | hi_normalization (HI_SESSION *Session, int iInspectMode) |
int | hi_norm_uri (HI_SESSION *Session, u_char *uribuf, int *uribuf_size, u_char *uri, int uri_size) |
NOTES:
Definition in file hi_norm.h.
|
Initialize the arrays neccessary to normalize the HTTP protocol fields. Currently, we set a hex_lookup array where we can convert the hex encoding that we encounter in the URI into numbers we deal with.
Definition at line 1477 of file hi_norm.c. References BASE36_VAL, hex_lookup, HEX_VAL, HI_SUCCESS, memset, NO_HEX_VAL, and valid_lookup. Referenced by HttpInspectInit(). |
|
Normalize the URI into the URI normalize buffer. This is the routine that users call to normalize the URI. It iterates through the URI buffer decoding the next character and is then checked for any directory problems before writing the decoded character into the normalizing buffer. We return the length of the normalized URI buffer in the variable, uribuf_size. This value is passed in as the max size of the normalization buffer, which we then set in iMaxUriBufSize for later reference. If there was some sort of problem during normalizing we set the normalized URI buffer size to 0 and return HI_NONFATAL_ERR.
Definition at line 1376 of file hi_norm.c. References CheckLongDir(), s_URI_NORM_STATE::dir_count, END_OF_BUFFER, GetDecodedByte(), hi_eo_client_event_log(), HI_EO_CLIENT_NON_RFC_CHAR, hi_eo_generate_event(), HI_NONFATAL_ERR, HI_SUCCESS, hi_util_in_bounds(), InspectUriChar(), s_HTTPINSPECT_CONF::non_rfc_chars, NULL, s_URI_NORM_STATE::param, and s_HI_SESSION::server_conf. Referenced by UriNorm(). |
|
Wrap the logic for normalizing different inspection modes. We call the various normalization modes here, and adjust the appropriate Session constructs.
Definition at line 1555 of file hi_norm.c. References hi_client_norm(), HI_INVALID_ARG, HI_SI_CLIENT_MODE, and HI_SUCCESS. Referenced by SnortHttpInspect(). |