server: idle loop support
[fio.git] / server.h
index 61b61f35d4df1f9b4153ac6bb53829916206d7d8..494c326ed252f20fc7004bd4abd96e9c25cf0fd8 100644 (file)
--- a/server.h
+++ b/server.h
@@ -34,12 +34,11 @@ enum {
        FIO_NET_CMD_QUIT        = 1,
        FIO_NET_CMD_EXIT        = 2,
        FIO_NET_CMD_JOB         = 3,
-       FIO_NET_CMD_ACK         = 4,
-       FIO_NET_CMD_NAK         = 5,
-       FIO_NET_CMD_TEXT        = 6,
-       FIO_NET_CMD_TS          = 7,
-       FIO_NET_CMD_GS          = 8,
-       FIO_NET_CMD_ETA         = 9,
+       FIO_NET_CMD_TEXT        = 4,
+       FIO_NET_CMD_TS          = 5,
+       FIO_NET_CMD_GS          = 6,
+       FIO_NET_CMD_ETA         = 7,
+       FIO_NET_CMD_PROBE       = 8,
 
        FIO_NET_CMD_F_MORE      = 1UL << 0,
 
@@ -53,6 +52,13 @@ struct cmd_ts_pdu {
        struct group_run_stats rs;
 };
 
+struct cmd_probe_pdu {
+       uint8_t hostname[64];
+       uint8_t fio_major;
+       uint8_t fio_minor;
+       uint8_t fio_patch;
+};
+
 extern int fio_start_server(int);
 extern int fio_server_text_output(const char *, unsigned int len);
 extern int fio_server_log(const char *format, ...);
@@ -74,7 +80,7 @@ extern void fio_client_add(const char *);
 extern int fio_recv_data(int sk, void *p, unsigned int len);
 extern int fio_send_data(int sk, const void *p, unsigned int len);
 extern void fio_net_cmd_crc(struct fio_net_cmd *);
-extern struct fio_net_cmd *fio_net_recv_cmd(int sk);
+extern struct fio_net_cmd *fio_net_recv_cmd(int sk, int block);
 
 extern int exit_backend;
 extern int fio_net_port;