server: make client connections fork off
[fio.git] / server.h
index 76d24583de49c6bbfcec5fc47535a1ae48701835..422bfbf2b571617aeda1af3da8ce2ba86be0eeba 100644 (file)
--- a/server.h
+++ b/server.h
@@ -38,7 +38,7 @@ struct fio_net_int_cmd {
 };
 
 enum {
-       FIO_SERVER_VER                  = 12,
+       FIO_SERVER_VER                  = 14,
 
        FIO_SERVER_MAX_FRAGMENT_PDU     = 1024,
 
@@ -116,9 +116,12 @@ struct cmd_start_pdu {
 
 struct cmd_end_pdu {
        uint32_t error;
+       uint32_t signal;
 };
 
 struct cmd_add_job_pdu {
+       uint32_t thread_number;
+       uint32_t groupid;
        struct thread_options_pack top;
 };
 
@@ -131,6 +134,7 @@ struct cmd_text_pdu {
 };
 
 struct cmd_iolog_pdu {
+       uint32_t thread_number;
        uint32_t nr_samples;
        uint32_t log_type;
        uint8_t name[FIO_NET_NAME_MAX];
@@ -152,18 +156,18 @@ struct group_run_stats;
 extern void fio_server_send_ts(struct thread_stat *, struct group_run_stats *);
 extern void fio_server_send_gs(struct group_run_stats *);
 extern void fio_server_send_du(void);
-extern void fio_server_idle_loop(void);
 
 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 void fio_net_cmd_crc_pdu(struct fio_net_cmd *, void *);
+extern void fio_net_cmd_crc_pdu(struct fio_net_cmd *, const void *);
 extern struct fio_net_cmd *fio_net_recv_cmd(int sk);
 
 extern int fio_send_iolog(struct thread_data *, struct io_log *, const char *);
-
-struct thread_options;
-extern void fio_server_send_add_job(struct thread_options *, const char *);
+extern void fio_server_send_add_job(struct thread_data *);
+extern void fio_server_send_start(struct thread_data *);
+extern int fio_net_send_stop(int sk, int error, int signal);
+extern int fio_net_send_quit(int sk);
 
 extern int exit_backend;
 extern int fio_net_port;