master
h 51 lines 1.55 KB
Raw
1 /*
2 * QEMU live migration channel operations
3 *
4 * Copyright Red Hat, Inc. 2016
5 *
6 * Authors:
7 * Daniel P. Berrange <berrange@redhat.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
11 *
12 * Contributions after 2012-01-13 are licensed under the terms of the
13 * GNU GPL, version 2 or (at your option) any later version.
14 */
15
16 #ifndef QEMU_MIGRATION_CHANNEL_H
17 #define QEMU_MIGRATION_CHANNEL_H
18
19 #include "io/channel.h"
20 #include "qapi/qapi-types-migration.h"
21
22 /* Migration channel types */
23 typedef enum {
24 CH_NONE,
25 CH_MAIN,
26 CH_MULTIFD,
27 CH_POSTCOPY
28 } MigChannelType;
29
30 void migration_channel_process_incoming(QIOChannel *ioc);
31
32 void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc);
33
34 int migration_channel_read_peek(QIOChannel *ioc,
35 const char *buf,
36 const size_t buflen,
37 Error **errp);
38
39 bool migration_has_main_and_multifd_channels(void);
40 bool migration_has_all_channels(void);
41
42 void migration_connect_outgoing(MigrationState *s, MigrationAddress *addr,
43 Error **errp);
44 void migration_connect_incoming(MigrationAddress *addr, Error **errp);
45
46 bool migration_channel_parse_input(const char *uri,
47 MigrationChannelList *channels,
48 MigrationChannel **main_channelp,
49 MigrationChannel **cpr_channelp,
50 Error **errp);
51 #endif