Functions | |
struct msghdr* | build_I_SEE_YOU (WCCP1_CLIENT *client) |
Build a I SEE YOU reply packet for the given client. More... | |
struct msghdr* | handle_WCCP1_HERE_I_AM (u_int32 ip, WCCP1_HERE_I_AM_MSG *request) |
Handle a HERE I AM request packet for the given client. More... | |
int | validate_IPs (u_int32 ip, u_int32 wccount, u_int32 *ips) |
Validate that all the IPs are valid, usable caches. More... | |
int | build_hashes (u_int32 ip, u_int32 wccount, WCCP1_ASSIGN_BUCKET_HASHINFO *hinfo, WCCP1_HINFO hashes[]) |
Build the hashes for all the caches. More... | |
void | handle_ASSIGN_BUCKET (u_int32 ip, void *packet, int len) |
Handle a ASSIGN BUCKET request packet for the given client. More... | |
struct msghdr* | WCCP1Receive (u_int32 ip, void *packet, int len) |
Process a received WCCP version 1 packet. More... | |
void | WCCP1FreeReply (struct msghdr *reply) |
Frees a reply from WCCP1Receive. More... |
|
Frees a reply from WCCP1Receive.
|
|
Process a received WCCP version 1 packet. This is the entry point for all WCCP version 1 packet processing. This function does not fill in the msghdr.msg_name and msghdr.msg_namelen, that will be taken care of by the caller. The caller is also responsible of deallocating the reply by calling WCCP1FreeReply.
|
|
Build a I SEE YOU reply packet for the given client. This function does not fill in the msghdr.msg_name and msghdr.msg_namelen, that will be taken care of by the caller. The caller is also responsible of deallocating the reply by calling WCCP1FreeReply.
|
|
Build the hashes for all the caches. It packs the bucket data into the WebCache's hash information bitmap. The hashes are indexed identical to the IP address array.
|
|
Handle a ASSIGN BUCKET request packet for the given client. It validates the IP and that it's a valid and usable client, then checks the Received Id is equal to the one sent in our last I SEE YOU. Then it checks the IPs in the list, and then builds and updates the new hashes.
|
|
Handle a HERE I AM request packet for the given client. In case of a reply, this function does not fill in the msghdr.msg_name and msghdr.msg_namelen, that will be taken care of by the caller. The caller is also responsible of deallocating the reply by calling WCCP1FreeReply.
|
|
Validate that all the IPs are valid, usable caches.
|