33 lines
497 B
C
33 lines
497 B
C
#ifndef __REPLICA_H__
|
|
#define __REPLICA_H__
|
|
|
|
#define MAX_CMD_LEN 4096
|
|
#define MAX_IP_LEN 64
|
|
|
|
enum event_type {
|
|
EVENT_COMPLETED_CMD = 1,
|
|
EVENT_SSYNC = 2,
|
|
EVENT_SREADY = 3,
|
|
};
|
|
|
|
struct complete_cmd_evt {
|
|
__u32 len;
|
|
__u8 cmd[MAX_CMD_LEN];
|
|
};
|
|
|
|
struct sync_evt {
|
|
char ip[MAX_IP_LEN];
|
|
__s32 port;
|
|
};
|
|
|
|
struct replica_event {
|
|
__u32 type;
|
|
__u32 _pad;
|
|
|
|
union {
|
|
struct complete_cmd_evt complete;
|
|
struct sync_evt sync;
|
|
};
|
|
};
|
|
|
|
#endif |