]> git.proxmox.com Git - mirror_qemu.git/blob - net/colo.h
Jhash: add linux kernel jhashtable in qemu
[mirror_qemu.git] / net / colo.h
1 /*
2 * COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
3 * (a.k.a. Fault Tolerance or Continuous Replication)
4 *
5 * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
6 * Copyright (c) 2016 FUJITSU LIMITED
7 * Copyright (c) 2016 Intel Corporation
8 *
9 * Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
10 *
11 * This work is licensed under the terms of the GNU GPL, version 2 or
12 * later. See the COPYING file in the top-level directory.
13 */
14
15 #ifndef QEMU_COLO_PROXY_H
16 #define QEMU_COLO_PROXY_H
17
18 #include "slirp/slirp.h"
19 #include "qemu/jhash.h"
20
21 #define HASHTABLE_MAX_SIZE 16384
22
23 typedef struct Packet {
24 void *data;
25 union {
26 uint8_t *network_header;
27 struct ip *ip;
28 };
29 uint8_t *transport_header;
30 int size;
31 } Packet;
32
33 int parse_packet_early(Packet *pkt);
34 void connection_hashtable_reset(GHashTable *connection_track_table);
35 Packet *packet_new(const void *data, int size);
36 void packet_destroy(void *opaque, void *user_data);
37
38 #endif /* QEMU_COLO_PROXY_H */