/* $XORP: xorp/etc/templates/ospfv2.cmds,v 1.10 2006/04/27 20:01:32 pavlin Exp $ */

clear ospf4 database {
    %command: "ospf_clear_database -2" %help: HELP;
    %module: ospf4;
    %tag: HELP "Clear LSA database";
}

show ospf4 {
    %command: "" %help: "Display information about OSPFv2";
    %module: ospf4;
}

show ospf4 database {
    %command: "ospf_print_lsas -b" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show LSA database";
}

show ospf4 database brief {
    %command: "ospf_print_lsas -b" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database detail {
    %command: "ospf_print_lsas -d" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* Router-LSA */

show ospf4 database router {
    %command: "ospf_print_lsas -b -f 1" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Router-LSA database";
}

show ospf4 database router brief {
    %command: "ospf_print_lsas -b -f 1" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database router detail {
    %command: "ospf_print_lsas -d -f 1" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* Network-LSA */

show ospf4 database network {
    %command: "ospf_print_lsas -b -f 2" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Network-LSA database";
}

show ospf4 database network brief {
    %command: "ospf_print_lsas -b -f 2" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database network detail {
    %command: "ospf_print_lsas -d -f 2" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* Summary-LSA (network) */

show ospf4 database netsummary {
    %command: "ospf_print_lsas -b -f 3" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Summary-LSA (network) database";
}

show ospf4 database netsummary brief {
    %command: "ospf_print_lsas -b -f 3" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database netsummary detail {
    %command: "ospf_print_lsas -d -f 3" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* Summary-LSA (AS boundary router) */

show ospf4 database asbrsummary {
    %command: "ospf_print_lsas -b -f 4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Summary-LSA (AS boundary router) database";
}

show ospf4 database asbrsummary brief {
    %command: "ospf_print_lsas -b -f 4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database asbrsummary detail {
    %command: "ospf_print_lsas -d -f 4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* AS-External-LSA */

show ospf4 database external {
    %command: "ospf_print_lsas -b -f 5" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show External-LSA database";
}

show ospf4 database external brief {
    %command: "ospf_print_lsas -b -f 5" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database external detail {
    %command: "ospf_print_lsas -d -f 5" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* NSSA-LSA */

show ospf4 database nssa {
    %command: "ospf_print_lsas -b -f 7" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show NSSA-LSA database";
}

show ospf4 database nssa brief {
    %command: "ospf_print_lsas -b -f 7" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database nssa detail {
    %command: "ospf_print_lsas -d -f 7" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* AREA */

show ospf4 database area $(protocols.ospf4.area.*) {
    %command: "ospf_print_lsas -a $5 -b" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show LSA database";
}

show ospf4 database area $(protocols.ospf4.area.*) brief {
    %command: "ospf_print_lsas -a $5 -b" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database area $(protocols.ospf4.area.*) detail {
    %command: "ospf_print_lsas -a $5 -d" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* Router-LSA */

show ospf4 database area $(protocols.ospf4.area.*) router {
    %command: "ospf_print_lsas -a $5 -b -f 1" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Router-LSA database";
}

show ospf4 database area $(protocols.ospf4.area.*) router brief {
    %command: "ospf_print_lsas -a $5 -b -f 1" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database area $(protocols.ospf4.area.*) router detail {
    %command: "ospf_print_lsas -a $5 -d -f 1" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* Network-LSA */

show ospf4 database area $(protocols.ospf4.area.*) network {
    %command: "ospf_print_lsas -a $5 -b -f 2" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Network-LSA database";
}

show ospf4 database area $(protocols.ospf4.area.*) network brief {
    %command: "ospf_print_lsas -a $5 -b -f 2" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database area $(protocols.ospf4.area.*) network detail {
    %command: "ospf_print_lsas -a $5 -d -f 2" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* Summary-LSA (network) */

show ospf4 database area $(protocols.ospf4.area.*) netsummary {
    %command: "ospf_print_lsas -a $5 -b -f 3" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Summary-LSA (network) database";
}

show ospf4 database area $(protocols.ospf4.area.*) netsummary brief {
    %command: "ospf_print_lsas -a $5 -b -f 3" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database area $(protocols.ospf4.area.*) netsummary detail {
    %command: "ospf_print_lsas -a $5 -d -f 3" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* Summary-LSA (AS boundary router) */

show ospf4 database area $(protocols.ospf4.area.*) asbrsummary {
    %command: "ospf_print_lsas -a $5 -b -f 4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Summary-LSA (AS boundary router) database";
}

show ospf4 database area $(protocols.ospf4.area.*) asbrsummary brief {
    %command: "ospf_print_lsas -a $5 -b -f 4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database area $(protocols.ospf4.area.*) asbrsummary detail {
    %command: "ospf_print_lsas -a $5 -d -f 4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* AS-External-LSA */

show ospf4 database area $(protocols.ospf4.area.*) external {
    %command: "ospf_print_lsas -a $5 -b -f 5" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show External-LSA database";
}

show ospf4 database area $(protocols.ospf4.area.*) external brief {
    %command: "ospf_print_lsas -a $5 -b -f 5" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database area $(protocols.ospf4.area.*) external detail {
    %command: "ospf_print_lsas -a $5 -d -f 5" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* NSSA-LSA */

show ospf4 database area $(protocols.ospf4.area.*) nssa {
    %command: "ospf_print_lsas -a $5 -b -f 7" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show NSSA-LSA database";
}

show ospf4 database area $(protocols.ospf4.area.*) nssa brief {
    %command: "ospf_print_lsas -a $5 -b -f 7" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display brief output (default)";
}

show ospf4 database area $(protocols.ospf4.area.*) nssa detail {
    %command: "ospf_print_lsas -a $5 -d -f 7" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display detailed output";
}

/* SUMMARY */

show ospf4 database summary {
    %command: "ospf_print_lsas -s" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display summary output";
}

show ospf4 database summary router {
    %command: "ospf_print_lsas -s -f 1" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Router-LSA database";
}

show ospf4 database summary network {
    %command: "ospf_print_lsas -s -f 2" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Network-LSA database";
}

show ospf4 database summary netsummary {
    %command: "ospf_print_lsas -s -f 3" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Summary-LSA (network) database";
}

show ospf4 database summary asbrsummary {
    %command: "ospf_print_lsas -s -f 4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Summary-LSA (AS boundary router) database";
}

show ospf4 database summary external {
    %command: "ospf_print_lsas -s -f 5" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show External-LSA database";
}

show ospf4 database summary nssa {
    %command: "ospf_print_lsas -s -f 7" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show NSSA-LSA database";
}

show ospf4 database summary area $(protocols.ospf4.area.*) {
    %command: "ospf_print_lsas -a $6 -s" %help: HELP;
    %module: ospf4;
    %tag: HELP "Display summary output";
}

show ospf4 database summary area $(protocols.ospf4.area.*) router {
    %command: "ospf_print_lsas -a $6 -s -f 1" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Router-LSA database";
}

show ospf4 database summary area $(protocols.ospf4.area.*) network {
    %command: "ospf_print_lsas -a $6 -s -f 2" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Network-LSA database";
}

show ospf4 database summary area $(protocols.ospf4.area.*) netsummary {
    %command: "ospf_print_lsas -a $6 -s -f 3" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Summary-LSA (network) database";
}

show ospf4 database summary area $(protocols.ospf4.area.*) asbrsummary {
    %command: "ospf_print_lsas -a $6 -s -f 4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Summary-LSA (AS boundary router) database";
}

show ospf4 database summary area $(protocols.ospf4.area.*) external {
    %command: "ospf_print_lsas -a $6 -s -f 5" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show External-LSA database";
}

show ospf4 database summary area $(protocols.ospf4.area.*) nssa {
    %command: "ospf_print_lsas -a $6 -s -f 7" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show NSSA-LSA database";
}

/* Neighbor commands */

show ospf4 neighbor {
    %command: "ospf_print_neighbours" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Neighbors";
}

show ospf4 neighbor brief {
    %command: "ospf_print_neighbours -b" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Neighbors";
}

show ospf4 neighbor detail {
    %command: "ospf_print_neighbours -d" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Neighbors";
}

show ospf4 neighbor <neighbor> {
    %command: "ospf_print_neighbours -f $4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Neighbors";
}

show ospf4 neighbor <neighbor> brief {
    %command: "ospf_print_neighbours -b -f $4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Neighbors";
}

show ospf4 neighbor <neighbor> detail {
    %command: "ospf_print_neighbours -d -f $4" %help: HELP;
    %module: ospf4;
    %tag: HELP "Show Neighbors";
}
