Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BIRD Internet Routing Daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
305a01f5
Commit
305a01f5
authored
Dec 04, 1999
by
Martin Mareš
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added DEBUG commands.
Removed CLI tests, real commands now serve as much better examples.
parent
feed8226
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
29 deletions
+17
-29
TODO
TODO
+2
-6
nest/config.Y
nest/config.Y
+15
-23
No files found.
TODO
View file @
305a01f5
Core
~~~~
* protocols: implement dumping of protocol-dependent rte attributes
- IPv6 support
- io.c: refuse old-style multicasts for unnumbered interfaces?
...
...
@@ -16,8 +14,6 @@ Core
- static: check validity of route destination?
- static: allow specifying a per-route filter program for setting route attributes?
- *: show route hooks
- rte_update: check whether all bits not covered by masklen are zero
- rte_update: debug mode
...
...
@@ -48,12 +44,11 @@ Commands
~~~~~~~~
shutdown # order system shutdown
configure [<file>]
debug <what> # dump debugging information to log
show <name> # show everything you know about symbol <name>
rip ??? [<name>]
ospf ??? [<name>]
static ??? [<name>]
filters [<name>]
symbols
(disable|enable|restart) <protocol> # or ALL?
Cleanup
...
...
@@ -68,6 +63,7 @@ Cleanup
- try compiling with -Wunused
- does everybody test return value of sk_open?
- add references to RFC's we did follow
- protocols: implement CLI hooks
Various ideas
~~~~~~~~~~~~~
...
...
nest/config.Y
View file @
305a01f5
...
...
@@ -251,30 +251,22 @@ r_args:
}
;
/* FIXME: These are examples. Remove them soon. */
CF_CLI_HELP(TEST, <subsystem>, [[Tests different subsystems]])
CF_CLI(TEST LEDS, NUM, <N>, [[Flash each LED <N> times]]) { cli_msg(0, "%d", $3); } ;
CF_CLI(TEST MEMORY,,, [[Replace all useful information by testing patterns]]) { cli_msg(0, "DONE"); } ;
CF_CLI(TEST LONG,,, [[Test long replies]]) {
static void test_command(struct cli *);
this_cli->cont = test_command;
this_cli->rover = (void *) 1;
cli_msg(-2, "Start");
} ;
CF_CLI_HELP(DEBUG, <subsystem>, [[Show debugging information]])
CF_CLI(DEBUG RESOURCES,,, [[Show all allocated resource]])
{ rdump(&root_pool); }
CF_CLI(DEBUG SOCKETS,,, [[Show open sockets]])
{ sk_dump_all(); }
CF_CLI(DEBUG INTERFACES,,, [[Show interface information]])
{ if_dump_all(); }
CF_CLI(DEBUG NEIGHBORS,,, [[Show neighbor cache]])
{ neigh_dump_all(); }
CF_CLI(DEBUG ATTRIBUTES,,, [[Show attribute cache]])
{ rta_dump_all(); }
CF_CLI(DEBUG ROUTES,,, [[Show routing table]])
{ rt_dump_all(); }
CF_CLI(DEBUG PROTOCOLS,,, [[Show protocol information]])
{ protos_dump_all(); }
CF_CODE
/* FIXME: Test only, remove */
static void test_command(struct cli *c)
{
int i = (int) c->rover;
if (i < 10) {
cli_printf(c, -3, "%d", i);
c->rover = (void *) ++i;
} else {
c->cont = NULL;
cli_printf(c, 4, "DONE");
}
}
CF_END
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment