bird/nest
Martin Mares 62a4639548 Added some temporary examples of how to define CLI commands (search for CF_CLI).
To define a new command, just add a new rule to the gramar:
  CF_CLI(COMMAND NAME, arguments, help-args, help-text) {
	what-should-the-command-do
	} ;
where <arguments> are appended to the RHS of the rule, <help-args> is the
argument list as shown in the help and <help-text> is description of the
command for the help.

<what-should-the-command-do> is a C code snippet to be executed. It should
not take too much time to execute. If you want to print out a lot of
information, you can schedule a routine to be called after the current
buffer is flushed by making cli->cont point to the routine (see the
TEST LONG command definition for an example); if the connection is closed
in the meantime, cli->cleanup gets called.

You can access `struct cli' belonging to the connection you're currently
servicing as this_cli, but only during parse time, not from routines scheduled
for deferred execution.

Functions to call inside command handlers:
  cli_printf(cli, code, printf-args) -- print text to CLI connection,
	<code> is message code as assigned in doc/reply_codes or a negative
	one if it's a continuation line.
  cli_msg(code, printf-args) -- the same for this_cli.

Use 'sock -x bird.ctl' for connecting to the CLI until a client is written.
1999-11-17 12:14:44 +00:00
..
bird.h Perform gracious shutdown upon receipt of SIGTERM. Finally we can 1999-02-13 20:15:36 +00:00
cli.c Command line interface now works. 1999-11-17 12:00:21 +00:00
cli.h Command line interface now works. 1999-11-17 12:00:21 +00:00
config.Y Added some temporary examples of how to define CLI commands (search for CF_CLI). 1999-11-17 12:14:44 +00:00
iface.c Basic support for IPv6. The system-dependent part doesn't work yet, 1999-08-03 19:36:06 +00:00
iface.h Cleaned up handling of interface patterns: 1999-08-03 19:30:49 +00:00
Makefile First steps of the Command Line Interface: I/O routines. 1999-10-29 12:10:10 +00:00
password.c Obvious bugs in authentication fixed. 1999-10-02 10:44:48 +00:00
password.h Added password_strncpy() which pads destination with zeros. 1999-05-31 19:15:52 +00:00
proto.c Events now return a value. If it's non-zero, the event is re-queued 1999-10-29 12:08:49 +00:00
protocol.h Implemented a Table-to-Table protocol a.k.a The Pipe. 1999-08-03 19:34:26 +00:00
route.h Renamed attr->attrs to attr->eattrs. 1999-11-04 13:29:43 +00:00
rt-attr.c Renamed attr->attrs to attr->eattrs. 1999-11-04 13:29:43 +00:00
rt-dev.c Renamed attr->attrs to attr->eattrs. 1999-11-04 13:29:43 +00:00
rt-dev.h Implemented new configuration/reconfiguration interface and defined protocol 1999-02-05 21:37:34 +00:00
rt-fib.c Oops, previous modification for passing NULL to fib_init() did not 1998-12-22 19:20:43 +00:00
rt-table.c Events now return a value. If it's non-zero, the event is re-queued 1999-10-29 12:08:49 +00:00