From b8113a5e92cb19a0910041d5708f4eafeb713b54 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 7 Apr 2010 00:19:23 +0200 Subject: Implements BGP 'show protocols' info details. --- nest/proto.c | 5 +++++ nest/protocol.h | 1 + 2 files changed, 6 insertions(+) (limited to 'nest') diff --git a/nest/proto.c b/nest/proto.c index 78fca99..f55def5 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -871,6 +871,8 @@ proto_cmd_show(struct proto *p, unsigned int verbose, int cnt) { if (p->cf->dsc) cli_msg(-1006, " Description: %s", p->cf->dsc); + if (p->cf->router_id) + cli_msg(-1006, " Router ID: %R", p->cf->router_id); cli_msg(-1006, " Preference: %d", p->preference); cli_msg(-1006, " Input filter: %s", filter_name(p->in_filter)); cli_msg(-1006, " Output filter: %s", filter_name(p->out_filter)); @@ -885,6 +887,9 @@ proto_cmd_show(struct proto *p, unsigned int verbose, int cnt) proto_do_show_stats(p); } + if (p->proto->show_proto_info) + p->proto->show_proto_info(p); + cli_msg(-1006, ""); } } diff --git a/nest/protocol.h b/nest/protocol.h index d94873e..5dac2a9 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -51,6 +51,7 @@ struct protocol { void (*get_status)(struct proto *, byte *buf); /* Get instance status (for `show protocols' command) */ void (*get_route_info)(struct rte *, byte *buf, struct ea_list *attrs); /* Get route information (for `show route' command) */ int (*get_attr)(struct eattr *, byte *buf, int buflen); /* ASCIIfy dynamic attribute (returns GA_*) */ + void (*show_proto_info)(struct proto *); /* Show protocol info (for `show protocols all' command) */ }; void protos_build(void); -- cgit v1.2.3