version 1.1.1.1, 2012/02/21 17:26:11
|
version 1.1.1.2, 2016/11/02 10:09:12
|
Line 40 ripng_aggregate_new ()
|
Line 40 ripng_aggregate_new ()
|
return new; |
return new; |
} |
} |
|
|
static void | void |
ripng_aggregate_free (struct ripng_aggregate *aggregate) |
ripng_aggregate_free (struct ripng_aggregate *aggregate) |
{ |
{ |
XFREE (MTYPE_RIPNG_AGGREGATE, aggregate); |
XFREE (MTYPE_RIPNG_AGGREGATE, aggregate); |
Line 76 ripng_aggregate_decrement (struct route_node *child, s
|
Line 76 ripng_aggregate_decrement (struct route_node *child, s
|
} |
} |
} |
} |
|
|
|
/* Aggregate count decrement check for a list. */ |
|
void |
|
ripng_aggregate_decrement_list (struct route_node *child, struct list *list) |
|
{ |
|
struct route_node *np; |
|
struct ripng_aggregate *aggregate; |
|
struct ripng_info *rinfo = NULL; |
|
struct listnode *node = NULL; |
|
|
|
for (np = child; np; np = np->parent) |
|
if ((aggregate = np->aggregate) != NULL) |
|
aggregate->count -= listcount (list); |
|
|
|
for (ALL_LIST_ELEMENTS_RO (list, node, rinfo)) |
|
rinfo->suppress--; |
|
} |
|
|
/* RIPng routes treatment. */ |
/* RIPng routes treatment. */ |
int |
int |
ripng_aggregate_add (struct prefix *p) |
ripng_aggregate_add (struct prefix *p) |
Line 85 ripng_aggregate_add (struct prefix *p)
|
Line 102 ripng_aggregate_add (struct prefix *p)
|
struct ripng_info *rinfo; |
struct ripng_info *rinfo; |
struct ripng_aggregate *aggregate; |
struct ripng_aggregate *aggregate; |
struct ripng_aggregate *sub; |
struct ripng_aggregate *sub; |
|
struct list *list = NULL; |
|
struct listnode *node = NULL; |
|
|
/* Get top node for aggregation. */ |
/* Get top node for aggregation. */ |
top = route_node_get (ripng->table, p); |
top = route_node_get (ripng->table, p); |
Line 99 ripng_aggregate_add (struct prefix *p)
|
Line 118 ripng_aggregate_add (struct prefix *p)
|
for (rp = route_lock_node (top); rp; rp = route_next_until (rp, top)) |
for (rp = route_lock_node (top); rp; rp = route_next_until (rp, top)) |
{ |
{ |
/* Suppress normal route. */ |
/* Suppress normal route. */ |
if ((rinfo = rp->info) != NULL) | if ((list = rp->info) != NULL) |
{ | for (ALL_LIST_ELEMENTS_RO (list, node, rinfo)) |
aggregate->count++; | { |
rinfo->suppress++; | aggregate->count++; |
} | rinfo->suppress++; |
| } |
/* Suppress aggregate route. This may not need. */ |
/* Suppress aggregate route. This may not need. */ |
if (rp != top && (sub = rp->aggregate) != NULL) |
if (rp != top && (sub = rp->aggregate) != NULL) |
{ |
{ |
Line 124 ripng_aggregate_delete (struct prefix *p)
|
Line 144 ripng_aggregate_delete (struct prefix *p)
|
struct ripng_info *rinfo; |
struct ripng_info *rinfo; |
struct ripng_aggregate *aggregate; |
struct ripng_aggregate *aggregate; |
struct ripng_aggregate *sub; |
struct ripng_aggregate *sub; |
|
struct list *list = NULL; |
|
struct listnode *node = NULL; |
|
|
/* Get top node for aggregation. */ |
/* Get top node for aggregation. */ |
top = route_node_get (ripng->table, p); |
top = route_node_get (ripng->table, p); |
Line 135 ripng_aggregate_delete (struct prefix *p)
|
Line 157 ripng_aggregate_delete (struct prefix *p)
|
for (rp = route_lock_node (top); rp; rp = route_next_until (rp, top)) |
for (rp = route_lock_node (top); rp; rp = route_next_until (rp, top)) |
{ |
{ |
/* Suppress normal route. */ |
/* Suppress normal route. */ |
if ((rinfo = rp->info) != NULL) | if ((list = rp->info) != NULL) |
{ | for (ALL_LIST_ELEMENTS_RO (list, node, rinfo)) |
aggregate->count--; | { |
rinfo->suppress--; | aggregate->count--; |
} | rinfo->suppress--; |
| } |
|
|
if (rp != top && (sub = rp->aggregate) != NULL) |
if (rp != top && (sub = rp->aggregate) != NULL) |
{ |
{ |