]>
Commit | Line | Data |
---|---|---|
376253ec AL |
1 | #ifndef MONITOR_H |
2 | #define MONITOR_H | |
3 | ||
737e150e | 4 | #include "block/block.h" |
112ed241 | 5 | #include "qapi/qapi-types-misc.h" |
0150cd81 | 6 | #include "qemu/readline.h" |
376253ec | 7 | |
62aa1d88 | 8 | extern __thread Monitor *cur_mon; |
5f9dba16 | 9 | typedef struct MonitorHMP MonitorHMP; |
376253ec | 10 | |
9ab84470 PX |
11 | #define QMP_REQ_QUEUE_LEN_MAX 8 |
12 | ||
489653b5 | 13 | bool monitor_cur_is_qmp(void); |
6620d3ce | 14 | |
6adf08dd | 15 | void monitor_init_globals(void); |
1d95db74 | 16 | void monitor_init_globals_core(void); |
fbfc29e3 KW |
17 | void monitor_init_qmp(Chardev *chr, bool pretty); |
18 | void monitor_init_hmp(Chardev *chr, bool use_readline); | |
2ef45716 | 19 | void monitor_cleanup(void); |
376253ec | 20 | |
cde76ee1 | 21 | int monitor_suspend(Monitor *mon); |
376253ec AL |
22 | void monitor_resume(Monitor *mon); |
23 | ||
a9940fc4 | 24 | int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp); |
1677f4c6 | 25 | int monitor_fd_param(Monitor *mon, const char *fdname, Error **errp); |
7768e04c | 26 | |
679cb8e1 | 27 | int monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) |
8b7968f7 | 28 | GCC_FMT_ATTR(2, 0); |
679cb8e1 | 29 | int monitor_printf(Monitor *mon, const char *fmt, ...) GCC_FMT_ATTR(2, 3); |
376253ec | 30 | void monitor_flush(Monitor *mon); |
b025c8b4 | 31 | int monitor_set_cpu(int cpu_index); |
99b7796f | 32 | int monitor_get_cpu_index(void); |
376253ec | 33 | |
5f9dba16 KW |
34 | void monitor_read_command(MonitorHMP *mon, int show_prompt); |
35 | int monitor_read_password(MonitorHMP *mon, ReadLineFunc *readline_func, | |
7060b478 | 36 | void *opaque); |
d6f46833 | 37 | |
e446f70d CB |
38 | AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id, |
39 | bool has_opaque, const char *opaque, | |
40 | Error **errp); | |
adb696f3 CB |
41 | int monitor_fdset_get_fd(int64_t fdset_id, int flags); |
42 | int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd); | |
b3dd1b8c | 43 | void monitor_fdset_dup_fd_remove(int dup_fd); |
854f63d4 | 44 | int64_t monitor_fdset_dup_fd_find(int dup_fd); |
adb696f3 | 45 | |
175de524 | 46 | #endif /* MONITOR_H */ |