-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, ...);
-extern int fio_net_send_cmd(int, uint16_t, const char *, off_t);
+struct cmd_client_probe_pdu {
+ uint64_t flags;
+};
+
+struct cmd_probe_reply_pdu {
+ uint8_t hostname[64];
+ uint8_t bigendian;
+ uint8_t fio_version[32];
+ uint8_t os;
+ uint8_t arch;
+ uint8_t bpp;
+ uint32_t cpus;
+ uint64_t flags;
+};
+
+struct cmd_single_line_pdu {
+ uint16_t len;
+ uint8_t text[];
+};
+
+struct cmd_line_pdu {
+ uint16_t lines;
+ uint16_t client_type;
+ struct cmd_single_line_pdu options[];
+};
+
+struct cmd_job_pdu {
+ uint32_t buf_len;
+ uint32_t client_type;
+ uint8_t buf[0];
+};
+
+struct cmd_start_pdu {
+ uint32_t jobs;
+ uint32_t stat_outputs;
+};
+
+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;
+};
+
+struct cmd_text_pdu {
+ uint32_t level;
+ uint32_t buf_len;
+ uint64_t log_sec;
+ uint64_t log_usec;
+ uint8_t buf[0];
+};
+
+struct cmd_iolog_pdu {
+ uint32_t thread_number;
+ uint32_t nr_samples;
+ uint32_t log_type;
+ uint32_t compressed;
+ uint8_t name[FIO_NET_NAME_MAX];
+ struct io_sample samples[0];
+};
+
+extern int fio_start_server(char *);
+extern int fio_server_text_output(int, const char *, size_t);
+extern int fio_net_send_cmd(int, uint16_t, const void *, off_t, uint64_t *, struct flist_head *);
+extern int fio_net_send_simple_cmd(int, uint16_t, uint64_t, struct flist_head *);
+extern void fio_server_set_arg(const char *);
+extern int fio_server_parse_string(const char *, char **, int *, int *, struct in_addr *, struct in6_addr *, int *);
+extern int fio_server_parse_host(const char *, int, struct in_addr *, struct in6_addr *);
+extern const char *fio_server_op(unsigned int);
+extern void fio_server_got_signal(int);
+
+struct thread_stat;
+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);