BGP_ADV_FIFO_INIT (&sync->withdraw);
BGP_ADV_FIFO_INIT (&sync->withdraw_low);
peer->sync[afi][safi] = sync;
- peer->hash[afi][safi] = hash_create (baa_hash_key, baa_hash_cmp);
+ peer->hash[afi][safi] = hash_create (baa_hash_key, baa_hash_cmp, NULL);
}
}
void
aspath_init (void)
{
- ashash = hash_create_size (32768, aspath_key_make, aspath_cmp);
+ ashash = hash_create_size (32768, aspath_key_make, aspath_cmp, NULL);
}
void
static void
cluster_init (void)
{
- cluster_hash = hash_create (cluster_hash_key_make, cluster_hash_cmp);
+ cluster_hash = hash_create (cluster_hash_key_make, cluster_hash_cmp, NULL);
}
static void
static void
encap_init (void)
{
- encap_hash = hash_create (encap_hash_key_make, encap_hash_cmp);
+ encap_hash = hash_create (encap_hash_key_make, encap_hash_cmp, NULL);
#if ENABLE_BGP_VNC
- vnc_hash = hash_create (encap_hash_key_make, encap_hash_cmp);
+ vnc_hash = hash_create (encap_hash_key_make, encap_hash_cmp, NULL);
#endif
}
static void
transit_init (void)
{
- transit_hash = hash_create (transit_hash_key_make, transit_hash_cmp);
+ transit_hash = hash_create (transit_hash_key_make, transit_hash_cmp, NULL);
}
static void
static void
attrhash_init (void)
{
- attrhash = hash_create (attrhash_key_make, attrhash_cmp);
+ attrhash = hash_create (attrhash_key_make, attrhash_cmp, "BGP Attributes");
}
/*
community_init (void)
{
comhash = hash_create ((unsigned int (*) (void *))community_hash_make,
- (int (*) (const void *, const void *))community_cmp);
+ (int (*) (const void *, const void *))community_cmp, NULL);
}
void
void
ecommunity_init (void)
{
- ecomhash = hash_create (ecommunity_hash_make, ecommunity_cmp);
+ ecomhash = hash_create (ecommunity_hash_make, ecommunity_cmp, NULL);
}
void
void
lcommunity_init (void)
{
- lcomhash = hash_create (lcommunity_hash_make, lcommunity_cmp);
+ lcomhash = hash_create (lcommunity_hash_make, lcommunity_cmp, NULL);
}
void
bgp_address_init (struct bgp *bgp)
{
bgp->address_hash = hash_create (bgp_address_hash_key_make,
- bgp_address_hash_cmp);
+ bgp_address_hash_cmp, NULL);
}
void
BGP_ADV_FIFO_INIT (&subgrp->sync->update);
BGP_ADV_FIFO_INIT (&subgrp->sync->withdraw);
BGP_ADV_FIFO_INIT (&subgrp->sync->withdraw_low);
- subgrp->hash = hash_create (baa_hash_key, baa_hash_cmp);
+ subgrp->hash = hash_create (baa_hash_key, baa_hash_cmp, NULL);
/* We use a larger buffer for subgrp->work in the event that:
* - We RX a BGP_UPDATE where the attributes alone are just
AF_FOREACH (afid)
bgp->update_groups[afid] = hash_create (updgrp_hash_key_make,
- updgrp_hash_cmp);
+ updgrp_hash_cmp, NULL);
}
void
bgp->peer_self->host = XSTRDUP(MTYPE_BGP_PEER_HOST, "Static announcement");
bgp->peer = list_new ();
bgp->peer->cmp = (int (*)(void *, void *)) peer_cmp;
- bgp->peerhash = hash_create (peer_hash_key_make, peer_hash_cmp);
+ bgp->peerhash = hash_create (peer_hash_key_make, peer_hash_cmp, NULL);
bgp->group = list_new ();
bgp->group->cmp = (int (*)(void *, void *)) peer_group_cmp;
// add start node
struct cmd_token *token = cmd_token_new (START_TKN, CMD_ATTR_NORMAL, NULL, NULL);
graph_new_node (node->cmdgraph, token, (void (*)(void *)) &cmd_token_del);
- node->cmd_hash = hash_create (cmd_hash_key, cmd_hash_cmp);
+ node->cmd_hash = hash_create (cmd_hash_key, cmd_hash_cmp, NULL);
}
/**
distribute_list_init (int node)
{
disthash = hash_create (distribute_hash_make,
- (int (*) (const void *, const void *)) distribute_cmp);
+ (int (*) (const void *, const void *))
+ distribute_cmp, NULL);
/* vtysh command-extraction doesn't grok install_element(node, ) */
if (node == RIP_NODE) {
pthread_mutex_lock(&pthread_table_mtx);
{
pthread_table =
- hash_create(pthread_table_hash_key, pthread_table_hash_cmp);
+ hash_create(pthread_table_hash_key, pthread_table_hash_cmp, NULL);
}
pthread_mutex_unlock(&pthread_table_mtx);
}
void
if_rmap_init (int node)
{
- ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp);
+ ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp, NULL);
if (node == RIPNG_NODE) {
} else if (node == RIP_NODE) {
install_element (RIP_NODE, &if_rmap_cmd);
if (!nodes)
{
pthread_rwlock_init (&nodes_lock, NULL);
- nodes = hash_create (qobj_key, qobj_cmp);
+ nodes = hash_create (qobj_key, qobj_cmp, NULL);
}
}
dep_entry = XCALLOC(MTYPE_ROUTE_MAP_DEP, sizeof(struct route_map_dep));
dep_entry->dep_name = XSTRDUP(MTYPE_ROUTE_MAP_NAME, dep_name);
dep_entry->dep_rmap_hash = hash_create(route_map_dep_hash_make_key,
- route_map_rmap_hash_cmp);
+ route_map_rmap_hash_cmp, NULL);
dep_entry->this_hash = NULL;
return((void *)dep_entry);
/* Make vector for match and set. */
route_match_vec = vector_init (1);
route_set_vec = vector_init (1);
- route_map_master_hash = hash_create(route_map_hash_key_make, route_map_hash_cmp);
+ route_map_master_hash = hash_create(route_map_hash_key_make, route_map_hash_cmp, NULL);
for (i = 1; i < ROUTE_MAP_DEP_MAX; i++)
route_map_dep_hash[i] = hash_create(route_map_dep_hash_make_key,
- route_map_dep_hash_cmp);
+ route_map_dep_hash_cmp, NULL);
cmd_variable_handler_register(rmap_var_handlers);
rv->cpu_record = hash_create ((unsigned int (*) (void *))cpu_record_hash_key,
(int (*) (const void *, const void *))
- cpu_record_hash_cmp);
+ cpu_record_hash_cmp, NULL);
/* Initialize the timer queues */
struct nhrp_cache key;
if (!nifp->cache_hash) {
- nifp->cache_hash = hash_create(nhrp_cache_protocol_key, nhrp_cache_protocol_cmp);
+ nifp->cache_hash = hash_create(nhrp_cache_protocol_key, nhrp_cache_protocol_cmp, NULL);
if (!nifp->cache_hash)
return NULL;
}
struct nhrp_vc *vc;
if (!nifp->peer_hash) {
- nifp->peer_hash = hash_create(nhrp_peer_key, nhrp_peer_cmp);
+ nifp->peer_hash = hash_create(nhrp_peer_key, nhrp_peer_cmp, NULL);
if (!nifp->peer_hash) return NULL;
}
{
size_t i;
- nhrp_vc_hash = hash_create(nhrp_vc_key, nhrp_vc_cmp);
+ nhrp_vc_hash = hash_create(nhrp_vc_key, nhrp_vc_cmp, NULL);
for (i = 0; i < ZEBRA_NUM_OF(childlist_head); i++)
list_init(&childlist_head[i]);
}
uint32_t nhrp_reqid_alloc(struct nhrp_reqid_pool *p, struct nhrp_reqid *r, void (*cb)(struct nhrp_reqid *, void *))
{
if (!p->reqid_hash) {
- p->reqid_hash = hash_create(nhrp_reqid_key, nhrp_reqid_cmp);
+ p->reqid_hash = hash_create(nhrp_reqid_key, nhrp_reqid_cmp, NULL);
p->next_request_id = 1;
}
pim_ifp->pim_ifchannel_list->cmp = (int (*)(void *, void *)) pim_ifchannel_compare;
pim_ifp->pim_ifchannel_hash = hash_create (pim_ifchannel_hash_key,
- pim_ifchannel_equal);
+ pim_ifchannel_equal, NULL);
ifp->info = pim_ifp;
igmp->igmp_group_list->del = (void (*)(void *)) igmp_group_free;
igmp->igmp_group_hash = hash_create (igmp_group_hash_key,
- igmp_group_hash_equal);
+ igmp_group_hash_equal, NULL);
igmp->fd = fd;
igmp->interface = ifp;
msdp->master = master;
msdp->peer_hash = hash_create(pim_msdp_peer_hash_key_make,
- pim_msdp_peer_hash_eq);
+ pim_msdp_peer_hash_eq, NULL);
msdp->peer_list = list_new();
msdp->peer_list->del = (void (*)(void *))pim_msdp_peer_free;
msdp->peer_list->cmp = (int (*)(void *, void *))pim_msdp_peer_comp;
msdp->sa_hash = hash_create(pim_msdp_sa_hash_key_make,
- pim_msdp_sa_hash_eq);
+ pim_msdp_sa_hash_eq, NULL);
msdp->sa_list = list_new();
msdp->sa_list->del = (void (*)(void *))pim_msdp_sa_free;
msdp->sa_list->cmp = (int (*)(void *, void *))pim_msdp_sa_comp;
pim_oil_init (void)
{
pim_channel_oil_hash = hash_create_size (8192, pim_oil_hash_key,
- pim_oil_equal);
+ pim_oil_equal, NULL);
pim_channel_oil_list = list_new();
if (!pim_channel_oil_list) {
pim_upstream_hash_key,
pim_upstream_sg_running);
pim_upstream_hash = hash_create_size (8192, pim_upstream_hash_key,
- pim_upstream_equal);
+ pim_upstream_equal, NULL);
pim_upstream_list = list_new ();
pim_upstream_list->del = (void (*)(void *)) pim_upstream_free;
pim->spt.switchover = PIM_SPT_IMMEDIATE;
pim->spt.plist = NULL;
- pim->rpf_hash = hash_create_size (256, pim_rpf_hash_key, pim_rpf_equal);
+ pim->rpf_hash = hash_create_size (256, pim_rpf_hash_key, pim_rpf_equal, NULL);
if (PIM_DEBUG_ZEBRA)
zlog_debug ("%s: NHT rpf hash init ", __PRETTY_FUNCTION__);
rv->table = srcdest_table_init();
assert(rv->table);
- rv->log = hash_create(log_key, log_cmp);
+ rv->log = hash_create(log_key, log_cmp, NULL);
return rv;
}
{
if (!zvrf)
return;
- zvrf->slsp_table = hash_create(label_hash, label_cmp);
- zvrf->lsp_table = hash_create(label_hash, label_cmp);
+ zvrf->slsp_table = hash_create(label_hash, label_cmp, NULL);
+ zvrf->lsp_table = hash_create(label_hash, label_cmp, NULL);
zvrf->fec_table[AFI_IP] = route_table_init();
zvrf->fec_table[AFI_IP6] = route_table_init();
zvrf->mpls_flags = 0;