summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_lsa.h
diff options
context:
space:
mode:
authorDinesh Dutt <ddutt@cumulusnetworks.com>2013-08-25 03:03:23 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2013-11-07 18:15:43 -0800
commite68a67672ccfabefadac36c66e88af997fb572b2 (patch)
tree7f5b3c1386121457cc5052fc2530018093d947ae /ospf6d/ospf6_lsa.h
parent931b1b8c9a612665391ed43653c970fcb38bbbf0 (diff)
downloadquagga-e68a67672ccfabefadac36c66e88af997fb572b2.tar.bz2
quagga-e68a67672ccfabefadac36c66e88af997fb572b2.tar.xz
ospf6d: add LSA payload to show summary output
Unlike OSPFv2, the LSID of an LSA isn't sufficient to know what the contents of the LSA are. Its useful for debugging and basic eyeball tests to see the contents of the LSA in the simple tabular format of "show ipv6 ospf6 database". This patch adds that output to the command. It replaces the existing fields of "duration, Chksum and Length" with a single field called Payload which is dependent on the LSA type. For Inter-Area Prefix, Intra-Area Prefix and AS-External LSAs, this will be the advertised prefix/prefix length, for Router LSAs, it is RtrID/IfID etc. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> [DL: rebase fix, line disappeared in ospf6_abr_originate_summary_to_area] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_lsa.h')
-rw-r--r--ospf6d/ospf6_lsa.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h
index ffd6ae0a..aed89df2 100644
--- a/ospf6d/ospf6_lsa.h
+++ b/ospf6d/ospf6_lsa.h
@@ -147,7 +147,9 @@ struct ospf6_lsa_handler
{
u_int16_t type; /* host byte order */
const char *name;
+ const char *short_name;
int (*show) (struct vty *, struct ospf6_lsa *);
+ char *(*get_prefix_str) (struct ospf6_lsa *, char *buf, int buflen, int pos);
u_char debug;
};
@@ -210,6 +212,7 @@ extern struct ospf6_lsa_handler unknown_handler;
/* Function Prototypes */
extern const char *ospf6_lstype_name (u_int16_t type);
+extern const char *ospf6_lstype_short_name (u_int16_t type);
extern u_char ospf6_lstype_debug (u_int16_t type);
extern int ospf6_lsa_is_differ (struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2);
extern int ospf6_lsa_is_changed (struct ospf6_lsa *lsa1, struct ospf6_lsa *lsa2);