Files
Fabiano Rosas 0c26f7f8e9 migration: Move URI parsing to channel.c
The migrate_uri_parse function is responsible for converting the URI
string into a MigrationChannel for consumption by the rest of the
code. Move it to channel.c and add a wrapper that calls both URI and
channels parsing.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
Link: https://lore.kernel.org/qemu-devel/20260123141656.6765-22-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2026-01-23 11:32:18 -03:00

52 lines
1.6 KiB
C

/*
* QEMU live migration channel operations
*
* Copyright Red Hat, Inc. 2016
*
* Authors:
* Daniel P. Berrange <berrange@redhat.com>
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*
* Contributions after 2012-01-13 are licensed under the terms of the
* GNU GPL, version 2 or (at your option) any later version.
*/
#ifndef QEMU_MIGRATION_CHANNEL_H
#define QEMU_MIGRATION_CHANNEL_H
#include "io/channel.h"
#include "qapi/qapi-types-migration.h"
/* Migration channel types */
typedef enum {
CH_NONE,
CH_MAIN,
CH_MULTIFD,
CH_POSTCOPY
} MigChannelType;
void migration_channel_process_incoming(QIOChannel *ioc);
void migration_channel_connect_outgoing(MigrationState *s, QIOChannel *ioc);
int migration_channel_read_peek(QIOChannel *ioc,
const char *buf,
const size_t buflen,
Error **errp);
bool migration_has_main_and_multifd_channels(void);
bool migration_has_all_channels(void);
void migration_connect_outgoing(MigrationState *s, MigrationAddress *addr,
Error **errp);
void migration_connect_incoming(MigrationAddress *addr, Error **errp);
bool migration_channel_parse_input(const char *uri,
MigrationChannelList *channels,
MigrationChannel **main_channelp,
MigrationChannel **cpr_channelp,
Error **errp);
#endif