]>
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" |
c7f7e697 | 7 | #include "include/exec/hwaddr.h" |
376253ec | 8 | |
5f9dba16 | 9 | typedef struct MonitorHMP MonitorHMP; |
f2098725 | 10 | typedef struct MonitorOptions MonitorOptions; |
376253ec | 11 | |
9ab84470 PX |
12 | #define QMP_REQ_QUEUE_LEN_MAX 8 |
13 | ||
c3e95551 KW |
14 | extern QemuOptsList qemu_mon_opts; |
15 | ||
947e4744 | 16 | Monitor *monitor_cur(void); |
e69ee454 | 17 | Monitor *monitor_set_cur(Coroutine *co, Monitor *mon); |
489653b5 | 18 | bool monitor_cur_is_qmp(void); |
6620d3ce | 19 | |
6adf08dd | 20 | void monitor_init_globals(void); |
1d95db74 | 21 | void monitor_init_globals_core(void); |
f27a9bb3 | 22 | void monitor_init_qmp(Chardev *chr, bool pretty, Error **errp); |
8e9119a8 | 23 | void monitor_init_hmp(Chardev *chr, bool use_readline, Error **errp); |
a2f411c4 | 24 | int monitor_init(MonitorOptions *opts, bool allow_hmp, Error **errp); |
c3e95551 | 25 | int monitor_init_opts(QemuOpts *opts, Error **errp); |
2ef45716 | 26 | void monitor_cleanup(void); |
376253ec | 27 | |
cde76ee1 | 28 | int monitor_suspend(Monitor *mon); |
376253ec AL |
29 | void monitor_resume(Monitor *mon); |
30 | ||
a9940fc4 | 31 | int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp); |
1677f4c6 | 32 | int monitor_fd_param(Monitor *mon, const char *fdname, Error **errp); |
7768e04c | 33 | |
679cb8e1 | 34 | int monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) |
8b7968f7 | 35 | GCC_FMT_ATTR(2, 0); |
679cb8e1 | 36 | int monitor_printf(Monitor *mon, const char *fmt, ...) GCC_FMT_ATTR(2, 3); |
376253ec | 37 | void monitor_flush(Monitor *mon); |
dcba65f8 | 38 | int monitor_set_cpu(Monitor *mon, int cpu_index); |
87e6f4a4 | 39 | int monitor_get_cpu_index(Monitor *mon); |
376253ec | 40 | |
c7f7e697 TFF |
41 | void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, uint64_t size, Error **errp); |
42 | ||
5f9dba16 KW |
43 | void monitor_read_command(MonitorHMP *mon, int show_prompt); |
44 | int monitor_read_password(MonitorHMP *mon, ReadLineFunc *readline_func, | |
7060b478 | 45 | void *opaque); |
d6f46833 | 46 | |
e446f70d CB |
47 | AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id, |
48 | bool has_opaque, const char *opaque, | |
49 | Error **errp); | |
60efffa4 | 50 | int monitor_fdset_dup_fd_add(int64_t fdset_id, int flags); |
b3dd1b8c | 51 | void monitor_fdset_dup_fd_remove(int dup_fd); |
854f63d4 | 52 | int64_t monitor_fdset_dup_fd_find(int dup_fd); |
adb696f3 | 53 | |
175de524 | 54 | #endif /* MONITOR_H */ |