Pass arch/os in probe
[fio.git] / server.h
index 3d1d79c3c8cd2a0c7d3f1eed8e154b48263b1767..c6e9ce215b9c2e6ecb077ac61aa0d170cc05ff8e 100644 (file)
--- a/server.h
+++ b/server.h
@@ -26,10 +26,10 @@ struct fio_net_cmd {
 };
 
 enum {
-       FIO_SERVER_VER          = 1,
-       FIO_SERVER_VER1         = 1,
+       FIO_SERVER_VER          = 3,
+       FIO_SERVER_VER3         = 3,
 
-       FIO_SERVER_MAX_PDU      = 64,
+       FIO_SERVER_MAX_PDU      = 1024,
 
        FIO_NET_CMD_QUIT        = 1,
        FIO_NET_CMD_EXIT        = 2,
@@ -63,6 +63,8 @@ struct cmd_probe_pdu {
        uint8_t fio_major;
        uint8_t fio_minor;
        uint8_t fio_patch;
+       uint8_t os;
+       uint8_t arch;
 };
 
 struct cmd_line_pdu {
@@ -75,6 +77,8 @@ extern int fio_server_text_output(const char *, unsigned int len);
 extern int fio_server_log(const char *format, ...);
 extern int fio_net_send_cmd(int, uint16_t, const void *, off_t);
 extern int fio_net_send_simple_cmd(int sk, uint16_t opcode, uint64_t serial);
+extern void fio_server_set_arg(const char *);
+extern int fio_server_parse_string(const char *, char **, int *, int *, struct in_addr *);
 
 struct thread_stat;
 struct group_run_stats;
@@ -86,13 +90,13 @@ extern void fio_server_idle_loop(void);
 extern int fio_clients_connect(void);
 extern int fio_clients_send_ini(const char *);
 extern int fio_handle_clients(void);
-extern void fio_client_add(const char *);
-extern int fio_client_add_cmd_option(const char *, const char *);
+extern int fio_client_add(const char *, void **);
+extern int fio_client_add_cmd_option(void *, 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, int block);
+extern struct fio_net_cmd *fio_net_recv_cmd(int sk);
 
 extern int exit_backend;
 extern int fio_net_port;
@@ -102,7 +106,7 @@ static inline void fio_init_net_cmd(struct fio_net_cmd *cmd, uint16_t opcode,
 {
        memset(cmd, 0, sizeof(*cmd));
 
-       cmd->version    = __cpu_to_le16(FIO_SERVER_VER1);
+       cmd->version    = __cpu_to_le16(FIO_SERVER_VER3);
        cmd->opcode     = cpu_to_le16(opcode);
 
        if (pdu) {