File: cpg.h

package info (click to toggle)
fence-virt 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 772 kB
  • sloc: ansic: 10,257; cpp: 382; makefile: 272; sh: 214; lex: 113; yacc: 105
file content (29 lines) | stat: -rw-r--r-- 821 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef __FENCE_VIRTD_CPG_H
#define __FENCE_VIRTD_CPG_H

struct cpg_fence_req {
	char vm_name[128];
	int request;
	uint32_t seqno;
	uint32_t response;
};

typedef void (*request_callback_fn)(void *data, size_t len, uint32_t nodeid,
	      uint32_t seqno);
typedef void (*confchange_callback_fn)(const struct cpg_address *m, size_t len);

int cpg_start(	const char *name,
				request_callback_fn func,
				request_callback_fn store_func,
				confchange_callback_fn join,
				confchange_callback_fn leave);

int cpg_get_ids(uint32_t *me, uint32_t *high);
int cpg_stop(void);
int cpg_send_req(void *data, size_t len, uint32_t *seqno);
int cpg_wait_reply(void **data, size_t *len, uint32_t seqno);
int cpg_send_reply(void *data, size_t len, uint32_t nodeid, uint32_t seqno);
int cpg_send_vm_state(virt_state_t *vs);


#endif