From fe71a97da23e2282bc92f647227d5c97c73e3bc8 Mon Sep 17 00:00:00 2001 From: hasso Date: Wed, 22 Dec 2004 16:16:02 +0000 Subject: Show sums of checksums in "show ip ospf" output. Okayed by Paul and James R. Leu (author of original idea). --- ospfd/ospf_lsdb.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ospfd/ospf_lsdb.h') 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 */ -- cgit v1.2.1