/*
- * $Id: wccp.cc,v 1.23 2002/06/21 13:16:30 hno Exp $
+ * $Id: wccp.cc,v 1.24 2002/08/26 09:27:53 adrian Exp $
*
* DEBUG: section 80 WCCP Support
* AUTHOR: Glenn Chisholm
static struct wccp_here_i_am_t wccp_here_i_am;
static struct wccp_i_see_you_t wccp_i_see_you;
static int change;
+static int number_caches;
static struct in_addr local_ip;
static PF wccpHandleUdp;
return;
if (ntohl(wccp_i_see_you.type) != WCCP_I_SEE_YOU)
return;
- if (!change) {
+ if ((!change) && (number_caches == ntohl(wccp_i_see_you.number)) ) {
change = wccp_i_see_you.change;
return;
}
char *buckets;
int buckets_per_cache;
int loop;
- int number_caches;
int bucket = 0;
int *caches;
int cache_len;
buckets[bucket++] = loop;
}
}
+ while (bucket < WCCP_BUCKETS) {
+ buckets[bucket++] = number_caches - 1;
+ }
wccp_assign_bucket->type = htonl(WCCP_ASSIGN_BUCKET);
wccp_assign_bucket->id = wccp_i_see_you.id;
wccp_assign_bucket->number = wccp_i_see_you.number;