]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Pipe: show export state
authorJan Maria Matejka <mq@ucw.cz>
Tue, 16 Jan 2018 15:10:13 +0000 (16:10 +0100)
committerJan Maria Matejka <mq@ucw.cz>
Tue, 23 Jan 2018 12:52:17 +0000 (13:52 +0100)
proto/pipe/pipe.c

index 310f3c01c3fe83b0575644ef39c2daa81cc4eda2..49ff52e28ee793bf208f2c4929fba13e8b3069d4 100644 (file)
@@ -249,6 +249,8 @@ pipe_show_stats(struct pipe_proto *p)
          s2->imp_withdraws_ignored, s2->imp_withdraws_accepted);
 }
 
+static const char *pipe_feed_state[] = { [ES_DOWN] = "down", [ES_FEEDING] = "feed", [ES_READY] = "up" };
+
 static void
 pipe_show_proto_info(struct proto *P)
 {
@@ -257,6 +259,8 @@ pipe_show_proto_info(struct proto *P)
   cli_msg(-1006, "  Channel %s", "main");
   cli_msg(-1006, "    Table:          %s", p->pri->table->name);
   cli_msg(-1006, "    Peer table:     %s", p->sec->table->name);
+  cli_msg(-1006, "    Import state:   %s", pipe_feed_state[p->sec->export_state]);
+  cli_msg(-1006, "    Export state:   %s", pipe_feed_state[p->pri->export_state]);
   cli_msg(-1006, "    Import filter:  %s", filter_name(p->sec->out_filter));
   cli_msg(-1006, "    Export filter:  %s", filter_name(p->pri->out_filter));