Functions | |
int | indexOf (u_int32 ip, u_int32 wccount, u_int32 *ips) |
Get the index of the given IP address in the given array of IPs. More... | |
char* | hinfo2str (WCCP1_HINFO hinfo, char *buf) |
Convert a WCCP1_HINFO structure to a hexadecimal string. More... | |
void | enableWCCP () |
Enable the WCCP version 1 WebCache redirection engine. More... | |
void | disableWCCP () |
Disable the WCCP version 1 WebCache redirection engine. More... | |
void | enableCache (WCCP1_CLIENT *client) |
Enable a WCCP version 1 WebCache. More... | |
void | disableCache (WCCP1_CLIENT *client) |
Disable a WCCP version 1 WebCache. More... | |
void | changeCache (WCCP1_CLIENT *client, WCCP1_HINFO hash) |
Change WCCP version 1 cache information. More... | |
void | WCCP1Init () |
Initialize WCCP version 1 client database. | |
WCCP1_CLIENT* | WCCP1GetClientByIP (u_int32 ip) |
Get a WCCP version 1 client by IP address. More... | |
WCCP1_CLIENT* | WCCP1AddClient (u_int32 ip) |
Adds a WCCP version 1 client with the given IP address to the list of clients. More... | |
void | WCCP1UpdateChangeNumber () |
Update the global WCCP version 1 change number. More... | |
u_int32 | WCCP1GetChangeNumber () |
Get the current global WCCP version 1 change number. More... | |
u_int32 | WCCP1GetUsableCacheCount () |
Gets a count of usable client caches. More... | |
void | WCCP1GetUsableCacheData (struct iovec *iov) |
Gets the data to be sent for each usable client cache. More... | |
void | WCCP1UpdateHashInfo (u_int32 wccount, u_int32 *ips, WCCP1_HINFO hashes[]) |
Update the hash information with the given IPs and hashes. More... | |
int | WCCP1TimeOutEntries () |
Expire timed-out clints, and get when will the next timeout will be. More... | |
void | WCCP1ClearAllClients () |
Disables all WebCaches and clears the clients database. | |
Variables | |
WCCP1_CLIENT* | client_list = NULL |
The list of clients. | |
u_int32 | changeNumber = 1 |
Change number, updated every time a usable cache is added or deleted, or it's hash information changes. | |
WCCP1_HINFO | emptyHINFO = { 0, 0, 0, 0, 0, 0, 0, 0 } |
An empty Hash Information to compare. More... | |
int | assignedClients = 0 |
Current number of assigned clients. |
|
Adds a WCCP version 1 client with the given IP address to the list of clients.
|
|
Disables all WebCaches and clears the clients database.
|
|
Get the current global WCCP version 1 change number.
|
|
Get a WCCP version 1 client by IP address.
|
|
Gets a count of usable client caches. Usable caches are those for which reachability has been tested.
|
|
Gets the data to be sent for each usable client cache. Usable caches are those for which reachability has been tested. It fills the given iov vector with pointers to the data element of each client. It is assumed that enough iov entries were provided. This function will typically be called after WCCP1GetUsableCacheCount.
|
|
Initialize WCCP version 1 client database.
|
|
Expire timed-out clints, and get when will the next timeout will be.
|
|
Update the global WCCP version 1 change number. According to the specs, the change number must be updated each time a usable cache is added, deleted, or changes it's hash information. |
|
Update the hash information with the given IPs and hashes. The caller must ensure that all the given IPs in the list belong to valid and usable clients before calling this function.
|
|
Change WCCP version 1 cache information. This function is called when a cache's hash information is changed. It is only when after an enableCache call, and before the disableCache. This function also copies the new hash information into the existing client data structure.
|
|
Disable a WCCP version 1 WebCache. This function is called when a cache must be disabled (no buckets assigned to it).
|
|
Disable the WCCP version 1 WebCache redirection engine. This function is called just after the last cache is disabled. |
|
Enable a WCCP version 1 WebCache. This function is called when a cache must be enabled (buckets assigned to it, and not previously assigned).
|
|
Enable the WCCP version 1 WebCache redirection engine. This function is called just before the first cache is enabled. |
|
Convert a WCCP1_HINFO structure to a hexadecimal string.
|
|
Get the index of the given IP address in the given array of IPs.
|
|
Current number of assigned clients.
|
|
Change number, updated every time a usable cache is added or deleted, or it's hash information changes.
|
|
The list of clients.
|
|
An empty Hash Information to compare. (to choose between changeCache and disableCache) |