summaryrefslogtreecommitdiffstats
path: root/ldpd/ldpe.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-03-17 02:11:15 +0100
committerRenato Westphal <renato@opensourcerouting.org>2017-03-21 01:42:14 +0100
commitbc0eb287fa07b139b6f193c3dc4f033eddda6833 (patch)
tree72e3067c42b7eb0377a1dd05efa0f915aac24eab /ldpd/ldpe.c
parentMerge pull request #282 from opensourcerouting/ldpd-lspcheck (diff)
downloadfrr-bc0eb287fa07b139b6f193c3dc4f033eddda6833.tar.xz
frr-bc0eb287fa07b139b6f193c3dc4f033eddda6833.zip
ldpd: provide both a brief and a detailed version of some show commands
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/ldpe.c')
-rw-r--r--ldpd/ldpe.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c
index 3bb84e92a..de93d7a2d 100644
--- a/ldpd/ldpe.c
+++ b/ldpd/ldpe.c
@@ -820,6 +820,21 @@ ldpe_iface_ctl(struct ctl_conn *c, unsigned int idx)
void
ldpe_adj_ctl(struct ctl_conn *c)
{
+ struct adj *adj;
+ struct ctl_adj *actl;
+
+ RB_FOREACH(adj, global_adj_head, &global.adj_tree) {
+ actl = adj_to_ctl(adj);
+ imsg_compose_event(&c->iev, IMSG_CTL_SHOW_DISCOVERY, 0, 0,
+ -1, actl, sizeof(struct ctl_adj));
+ }
+
+ imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
+}
+
+void
+ldpe_adj_detail_ctl(struct ctl_conn *c)
+{
struct iface *iface;
struct tnbr *tnbr;
struct adj *adj;