summaryrefslogtreecommitdiffstats
path: root/nest/cli.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-10-31 16:43:44 +0100
committerMartin Mares <mj@ucw.cz>1999-10-31 16:43:44 +0100
commitb9672a845f7ff7d2441e21746566eacc51f274b7 (patch)
treebb2fad2a4b30083234474698c4ef935c2c0548fc /nest/cli.h
parent7d3aab1c1643e8b2bcff7f856e0d4455fa0ba4b4 (diff)
downloadbird-b9672a845f7ff7d2441e21746566eacc51f274b7.tar
bird-b9672a845f7ff7d2441e21746566eacc51f274b7.zip
The CLI I/O functions work as desired.
Diffstat (limited to 'nest/cli.h')
-rw-r--r--nest/cli.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/nest/cli.h b/nest/cli.h
index 69271fe..9670f69 100644
--- a/nest/cli.h
+++ b/nest/cli.h
@@ -24,26 +24,32 @@ struct cli_out {
typedef struct cli {
pool *pool;
void *priv; /* Private to sysdep layer */
- int inited;
byte rx_buf[CLI_RX_BUF_SIZE];
byte *rx_pos, *rx_aux; /* sysdep */
struct cli_out *tx_buf, *tx_pos, *tx_write;
event *event;
+ void (*cont)(struct cli *c);
+ void *rover; /* Private to continuation routine */
+ int last_reply;
} cli;
extern pool *cli_pool;
+/* Functions to be called by command handlers */
+
+void cli_printf(cli *, int, char *, ...);
+
+/* Functions provided to sysdep layer */
+
cli *cli_new(void *);
void cli_init(void);
void cli_free(cli *);
void cli_kick(cli *);
void cli_written(cli *);
-void cli_printf(cli *, int, char *, ...);
-/* Function provided by sysdep layer */
+/* Functions provided by sysdep layer */
int cli_write(cli *);
-void cli_disconnect(cli *);
int cli_get_command(cli *);
#endif