diff options
Diffstat (limited to 'ospfd/ospf_lsdb.h')
-rw-r--r-- | ospfd/ospf_lsdb.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ospfd/ospf_lsdb.h b/ospfd/ospf_lsdb.h index 302dddea..34344b3b 100644 --- a/ospfd/ospf_lsdb.h +++ b/ospfd/ospf_lsdb.h @@ -42,9 +42,8 @@ struct ospf_lsdb }; /* Macros. */ -#define LSDB_LOOP(T,N,L) \ - if ((T) != NULL) \ - for ((N) = route_top ((T)); ((N)); ((N)) = route_next ((N))) \ +#define LSDB_LOOP(T,N,L) \ + for ((N) = route_top ((T)); ((N)); ((N)) = route_next ((N))) \ if (((L) = (N)->info)) #define ROUTER_LSDB(A) ((A)->lsdb->type[OSPF_ROUTER_LSA].db) @@ -78,5 +77,7 @@ unsigned long ospf_lsdb_count_all (struct ospf_lsdb *); unsigned long ospf_lsdb_count (struct ospf_lsdb *, int); unsigned long ospf_lsdb_count_self (struct ospf_lsdb *, int); unsigned long ospf_lsdb_isempty (struct ospf_lsdb *); +struct ospf_lsa *foreach_lsa (struct route_table *, void *, int, + int (*callback) (struct ospf_lsa *, void *, int)); #endif /* _ZEBRA_OSPF_LSDB_H */ |