Added src/dest bandwidth aggregation.

This commit is contained in:
pdw
2002-04-03 21:28:41 +00:00
parent 6f71a8ef68
commit 0bb20d3675
6 changed files with 94 additions and 19 deletions

16
hash.c
View File

@@ -100,6 +100,22 @@ hash_status_enum hash_next_item(hash_type* hash_table, hash_node_type** ppnode)
return HASH_STATUS_OK;
}
void hash_delete_all(hash_type* hash_table) {
int i;
hash_node_type *n, *nn;
for(i = 0; i < hash_table->size; i++) {
n = hash_table->table[i];
while(n != NULL) {
nn = n->next;
hash_table->delete_key(n->key);
free(n);
n = nn;
}
hash_table->table[i] = NULL;
}
}
/*
* Allocate and return a hash
*/