#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "hi_util_xmalloc.h"
#include "hi_util_kmap.h"
#include "hi_ui_config.h"
#include "hi_return_codes.h"
Go to the source code of this file.
Functions | |
int | hi_ui_server_lookup_init (SERVER_LOOKUP **ServerLookup) |
int | hi_ui_server_lookup_add (SERVER_LOOKUP *ServerLookup, unsigned long Ip, HTTPINSPECT_CONF *ServerConf) |
HTTPINSPECT_CONF * | hi_ui_server_lookup_find (SERVER_LOOKUP *ServerLookup, unsigned long Ip, int *iError) |
HTTPINSPECT_CONF * | hi_ui_server_lookup_first (SERVER_LOOKUP *ServerLookup, int *iError) |
HTTPINSPECT_CONF * | hi_ui_server_lookup_next (SERVER_LOOKUP *ServerLookup, int *iError) |
NOTES:
Definition in file hi_ui_server_lookup.c.
|
Add a server configuration to the list. We add these keys like you would normally think to add them, because on low endian machines the least significant byte is compared first. This is what we want to compare IPs backward, doesn't work on high endian machines, but oh well. Our platform is Intel.
Definition at line 79 of file hi_ui_server_lookup.c. References HI_INVALID_ARG, HI_MEM_ALLOC_FAIL, HI_NONFATAL_ERR, HI_SUCCESS, and KMapAdd(). Referenced by hi_ui_config_add_server(). |
|
Find a server configuration given a IP. We look up a server configuration given an IP and return a pointer to that server configuration if found.
Definition at line 127 of file hi_ui_server_lookup.c. References HI_INVALID_ARG, HI_NOT_FOUND, HI_SUCCESS, KMapFind(), and NULL. Referenced by InitServerConf(). |
|
This lookups the first server configuration, so we can iterate through the configurations.
Definition at line 170 of file hi_ui_server_lookup.c. References HI_INVALID_ARG, HI_NOT_FOUND, HI_SUCCESS, KMapFindFirst(), and NULL. |
|
Initialize the server_lookup structure. We need to initialize the server_lookup structure for the server configuration access. Don't want a NULL pointer flying around, when we have to look for server configs.
Definition at line 44 of file hi_ui_server_lookup.c. References HI_MEM_ALLOC_FAIL, HI_SUCCESS, KMapNew(), and NULL. Referenced by hi_ui_config_init_global_conf(). |
|
Iterates to the next configuration, like a list it just returns the next config in the config list.
Definition at line 213 of file hi_ui_server_lookup.c. References HI_INVALID_ARG, HI_NOT_FOUND, HI_SUCCESS, KMapFindNext(), and NULL. |