1*e7d79011SSteve Sistare /* 2*e7d79011SSteve Sistare * Copyright (c) 2021, 2024 Oracle and/or its affiliates. 3*e7d79011SSteve Sistare * 4*e7d79011SSteve Sistare * This work is licensed under the terms of the GNU GPL, version 2 or later. 5*e7d79011SSteve Sistare * See the COPYING file in the top-level directory. 6*e7d79011SSteve Sistare */ 7*e7d79011SSteve Sistare 8*e7d79011SSteve Sistare #ifndef MIGRATION_CPR_H 9*e7d79011SSteve Sistare #define MIGRATION_CPR_H 10*e7d79011SSteve Sistare 11*e7d79011SSteve Sistare #include "qapi/qapi-types-migration.h" 12*e7d79011SSteve Sistare 13*e7d79011SSteve Sistare #define QEMU_CPR_FILE_MAGIC 0x51435052 14*e7d79011SSteve Sistare #define QEMU_CPR_FILE_VERSION 0x00000001 15*e7d79011SSteve Sistare 16*e7d79011SSteve Sistare void cpr_save_fd(const char *name, int id, int fd); 17*e7d79011SSteve Sistare void cpr_delete_fd(const char *name, int id); 18*e7d79011SSteve Sistare int cpr_find_fd(const char *name, int id); 19*e7d79011SSteve Sistare 20*e7d79011SSteve Sistare int cpr_state_save(MigrationChannel *channel, Error **errp); 21*e7d79011SSteve Sistare int cpr_state_load(MigrationChannel *channel, Error **errp); 22*e7d79011SSteve Sistare void cpr_state_close(void); 23*e7d79011SSteve Sistare struct QIOChannel *cpr_state_ioc(void); 24*e7d79011SSteve Sistare 25*e7d79011SSteve Sistare #endif 26