summaryrefslogtreecommitdiffstats
path: root/proto/ospf/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-10-27 00:03:30 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-10-27 00:03:30 +0100
commita3b70dc499b64f41aa776b5b4afee5c7bfb8dfa6 (patch)
tree3f84228385adf271232d582f170cb40e7e711b17 /proto/ospf/config.Y
parent68fa95cfec78f1bfe790949bf747d578ad583ec2 (diff)
downloadbird-a3b70dc499b64f41aa776b5b4afee5c7bfb8dfa6.tar
bird-a3b70dc499b64f41aa776b5b4afee5c7bfb8dfa6.zip
Two new informative CLI commands for OSPF.
Two new CLI commands for OSPF giving nice informative (and still machine parsable) representation of OSPF network graph (based on datas from the LSA database). The first command (show ospf topology) shows routers, networks and stub networks, The second command (show ospf state) shows also external routes and area-external networks and routers propagated by given area boundary router.
Diffstat (limited to 'proto/ospf/config.Y')
-rw-r--r--proto/ospf/config.Y10
1 files changed, 8 insertions, 2 deletions
diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y
index 0c6a408..dfcab4e 100644
--- a/proto/ospf/config.Y
+++ b/proto/ospf/config.Y
@@ -255,14 +255,20 @@ CF_ADDTO(dynamic_attr, OSPF_METRIC2 { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF
CF_ADDTO(dynamic_attr, OSPF_TAG { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_OSPF_TAG); })
CF_CLI(SHOW OSPF, optsym, [<name>], [[Show information about OSPF protocol]])
-{ ospf_sh(proto_get_named($3, &proto_ospf)); } ;
+{ ospf_sh(proto_get_named($3, &proto_ospf)); };
CF_CLI(SHOW OSPF NEIGHBORS, optsym opttext, [<name>] [\"<interface>\"], [[Show information about OSPF neighbors]])
-{ ospf_sh_neigh(proto_get_named($4, &proto_ospf), $5); } ;
+{ ospf_sh_neigh(proto_get_named($4, &proto_ospf), $5); };
CF_CLI(SHOW OSPF INTERFACE, optsym opttext, [<name>] [\"<interface>\"], [[Show information about interface]])
{ ospf_sh_iface(proto_get_named($4, &proto_ospf), $5); };
+CF_CLI(SHOW OSPF TOPOLOGY, optsym opttext, [<name>], [[Show information about OSPF network topology]])
+{ ospf_sh_state(proto_get_named($4, &proto_ospf), 0); };
+
+CF_CLI(SHOW OSPF STATE, optsym opttext, [<name>], [[Show information about OSPF network state]])
+{ ospf_sh_state(proto_get_named($4, &proto_ospf), 1); };
+
CF_CODE
CF_END