Browse Source

TT#88951 abstractise CLI handling and writing

Change-Id: I004cbc4a8690b11822ab54f34af01557b87c6a02
pull/1093/head
Richard Fuchs 5 years ago
parent
commit
cbf6ad7041
2 changed files with 288 additions and 264 deletions
  1. +279
    -264
      daemon/cli.c
  2. +9
    -0
      include/cli.h

+ 279
- 264
daemon/cli.c
File diff suppressed because it is too large
View File


+ 9
- 0
include/cli.h View File

@ -13,6 +13,15 @@ struct cli {
struct streambuf_listener listeners[2];
};
struct cli_writer;
struct cli_writer {
void (*cw_printf)(struct cli_writer *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
void *ptr;
};
struct cli *cli_new(struct poller *p, endpoint_t *);
void cli_handle(str *instr, struct cli_writer *);
#endif /* CLI_UDP_H_ */

Loading…
Cancel
Save