summaryrefslogtreecommitdiff
path: root/ospfd/ospf_lsdb.h
diff options
context:
space:
mode:
authorhasso <hasso>2004-12-22 16:16:02 +0000
committerhasso <hasso>2004-12-22 16:16:02 +0000
commitfe71a97da23e2282bc92f647227d5c97c73e3bc8 (patch)
treed812d9a1b98b0a1e9c1621194bf58dba097d6e3b /ospfd/ospf_lsdb.h
parent16f6511e94c3765725b196aacaf6053385bca8a3 (diff)
Show sums of checksums in "show ip ospf" output. Okayed by Paul and James
R. Leu (author of original idea).
Diffstat (limited to 'ospfd/ospf_lsdb.h')
-rw-r--r--ospfd/ospf_lsdb.h9
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 */