Show sums of checksums in "show ip ospf" output. Okayed by Paul and James
R. Leu (author of original idea).
diff --git a/ospfd/ospf_lsdb.h b/ospfd/ospf_lsdb.h
index 34344b3..8ae66a1 100644
--- a/ospfd/ospf_lsdb.h
+++ b/ospfd/ospf_lsdb.h
@@ -30,6 +30,7 @@
{
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 @@
};
/* 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 @@
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 */