1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation.
3 * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
10 #include <rte_common.h>
11 #include <rte_compat.h>
13 #include <cmdline_rdline.h>
14 #include <cmdline_parse.h>
28 struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out);
29 void cmdline_set_prompt(struct cmdline *cl, const char *prompt);
30 void cmdline_free(struct cmdline *cl);
31 void cmdline_printf(const struct cmdline *cl, const char *fmt, ...)
32 __rte_format_printf(2, 3);
33 int cmdline_in(struct cmdline *cl, const char *buf, int size);
34 int cmdline_write_char(struct rdline *rdl, char c);
38 cmdline_get_rdline(struct cmdline *cl);
41 * This function is nonblocking equivalent of ``cmdline_interact()``. It polls
42 * *cl* for one character and interpret it. If return value is *RDLINE_EXITED*
43 * it mean that ``cmdline_quit()`` was invoked.
46 * The command line object.
49 * On success return object status - one of *enum rdline_status*.
50 * On error return negative value.
52 int cmdline_poll(struct cmdline *cl);
54 void cmdline_interact(struct cmdline *cl);
55 void cmdline_quit(struct cmdline *cl);
61 #endif /* _CMDLINE_SOCKET_H_ */