summaryrefslogtreecommitdiff
path: root/nest/cli.h
diff options
context:
space:
mode:
Diffstat (limited to 'nest/cli.h')
-rw-r--r--nest/cli.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/nest/cli.h b/nest/cli.h
index 8a3294c5..2b96da5b 100644
--- a/nest/cli.h
+++ b/nest/cli.h
@@ -28,17 +28,17 @@ struct cli_out {
typedef struct cli {
node n; /* Node in list of all log hooks */
pool *pool;
- void *priv; /* Private to sysdep layer */
+ struct birdsock *sock; /* Underlying socket */
byte *rx_buf, *rx_pos, *rx_aux; /* sysdep */
struct cli_out *tx_buf, *tx_pos, *tx_write;
event *event;
void (*cont)(struct cli *c);
- void (*cleanup)(struct cli *c);
+ int (*cleanup)(struct cli *c); /* Return 0 if finished and cli may be freed immediately.
+ Otherwise return 1 and call rfree(c->pool) when appropriate. */
void *rover; /* Private to continuation routine */
int last_reply;
int restricted; /* CLI is restricted to read-only commands */
struct linpool *parser_pool; /* Pool used during parsing */
- struct linpool *show_pool; /* Pool used during route show */
byte *ring_buf; /* Ring buffer for asynchronous messages */
byte *ring_end, *ring_read, *ring_write; /* Pointers to the ring buffer */
uint ring_overflow; /* Counter of ring overflows */
@@ -63,7 +63,7 @@ static inline void cli_separator(cli *c)
/* Functions provided to sysdep layer */
-cli *cli_new(void *);
+cli *cli_new(struct birdsock *);
void cli_init(void);
void cli_free(cli *);
void cli_kick(cli *);