DPDK 24.11.1
cmdline.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation.
3 * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
4 * All rights reserved.
5 */
6
7#ifndef _CMDLINE_H_
8#define _CMDLINE_H_
9
10#include <rte_common.h>
11
12#include <cmdline_rdline.h>
13#include <cmdline_parse.h>
14
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25enum rdline_status {
26 RDLINE_INIT,
27 RDLINE_RUNNING,
28 RDLINE_EXITED
29};
30
31struct cmdline;
32
33struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out);
34void cmdline_set_prompt(struct cmdline *cl, const char *prompt);
35void cmdline_free(struct cmdline *cl);
36void cmdline_printf(const struct cmdline *cl, const char *fmt, ...)
38int cmdline_in(struct cmdline *cl, const char *buf, int size);
39int cmdline_write_char(struct rdline *rdl, char c);
40
41struct rdline *
42cmdline_get_rdline(struct cmdline *cl);
43
44
45void cmdline_interact(struct cmdline *cl);
46void cmdline_quit(struct cmdline *cl);
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif /* _CMDLINE_SOCKET_H_ */
#define __rte_format_printf(format_index, first_arg)
Definition: rte_common.h:203