diff options
Diffstat (limited to 'ospfd/ospf_lsdb.h')
-rw-r--r-- | ospfd/ospf_lsdb.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ospfd/ospf_lsdb.h b/ospfd/ospf_lsdb.h index 34344b3b..8ae66a15 100644 --- a/ospfd/ospf_lsdb.h +++ b/ospfd/ospf_lsdb.h @@ -30,6 +30,7 @@ struct ospf_lsdb { unsigned long count; unsigned long count_self; + unsigned int checksum; struct route_table *db; } type[OSPF_MAX_LSA]; unsigned long total; @@ -42,8 +43,9 @@ struct ospf_lsdb }; /* Macros. */ -#define LSDB_LOOP(T,N,L) \ - for ((N) = route_top ((T)); ((N)); ((N)) = route_next ((N))) \ +#define LSDB_LOOP(T,N,L) \ + if ((T) != NULL) \ + 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) @@ -76,8 +78,7 @@ struct ospf_lsa *ospf_lsdb_lookup_by_id_next (struct ospf_lsdb *, u_char, 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 int ospf_lsdb_checksum (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 */ |