Esempio n. 1
0
/**
**  This function resets the global parameters, THIS IS NOT THE GLOBAL
**  SERVER CONFIGURATION.
**
**  @param GlobalConf pointer to the global configuration structure
**
**  @return integer
**
**  @return HI_SUCCESS function successful
*/
int hi_ui_config_reset_global(HTTPINSPECT_GLOBAL_CONF *GlobalConf)
{
    GlobalConf->iis_unicode_map = 0;
    http_cmd_lookup_cleanup(&(GlobalConf->global_server->cmd_lookup));

    return HI_SUCCESS;
}
Esempio n. 2
0
/**
**  This function resets a server construct.
**
**  @param ServerConf pointer to the HTTPINSPECT_CONF structure
**
**  @return integer
**
**  @return HI_SUCCESS function successful
*/
int hi_ui_config_reset_server(HTTPINSPECT_CONF *ServerConf)
{
    http_cmd_lookup_cleanup(&ServerConf->cmd_lookup);
    memset(ServerConf, 0x00, sizeof(HTTPINSPECT_CONF));
    http_cmd_lookup_init(&ServerConf->cmd_lookup);

    return HI_SUCCESS;
}
Esempio n. 3
0
/**
**  This function resets a server construct.
**
**  @param ServerConf pointer to the HTTPINSPECT_CONF structure
**
**  @return integer
**
**  @return HI_SUCCESS function successful
*/
int hi_ui_config_reset_server(HTTPINSPECT_CONF *ServerConf)
{
    int i;

    for( i=0; i<HTTP_MAX_XFF_FIELDS; i++ )
        if( ServerConf->xff_headers[i] != NULL )
        {
            free( ServerConf->xff_headers[i] );
            ServerConf->xff_headers[i] = NULL;
        }

    http_cmd_lookup_cleanup(&ServerConf->cmd_lookup);
    memset(ServerConf, 0x00, sizeof(HTTPINSPECT_CONF));
    http_cmd_lookup_init(&ServerConf->cmd_lookup);

    return HI_SUCCESS;
}
Esempio n. 4
0
/**Free pData buffer, which may be referenced multiple times. ReferenceCount
 * is the number of times the buffer is referenced.  For freeing the buffer,
 * we just decrement referenceCount till it reaches 0, at which time the
 * buffer is also freed.
 */
static void serverConfFree(void *pData)
{
    HTTPINSPECT_CONF *ServerConf = (HTTPINSPECT_CONF *)pData;

    if (ServerConf)
    {
        ServerConf->referenceCount--;
        if (ServerConf->referenceCount == 0)
        {
            http_cmd_lookup_cleanup(&ServerConf->cmd_lookup);
            if (ServerConf->iis_unicode_map_filename)
            {
                free(ServerConf->iis_unicode_map_filename);
            }

            free(ServerConf);
        }
    }
}
Esempio n. 5
0
/**
**  This function resets the cmd lookup for http_methods
**
**  @param ServerConf pointer to the HTTPINSPECT_CONF structure
**
**  @return integer
**
**  @return None
*/
void hi_ui_config_reset_http_methods(HTTPINSPECT_CONF *ServerConf)
{
    http_cmd_lookup_cleanup(&ServerConf->cmd_lookup);
    http_cmd_lookup_init(&ServerConf->cmd_lookup);
}