4 #include <sys/socket.h>
6 #include <netinet/in.h>
24 struct flist_head list;
25 struct flist_head hash_list;
26 struct flist_head arg_list;
28 struct sockaddr_in addr;
29 struct sockaddr_in6 addr6;
30 struct sockaddr_un addr_un;
49 struct flist_head eta_list;
50 struct client_eta *eta_in_flight;
52 struct flist_head cmd_list;
57 struct client_ops *ops;
61 typedef void (*client_text_op_func)(struct fio_client *client, struct fio_net_cmd *cmd);
62 typedef void (*client_disk_util_op_func)(struct fio_client *client, struct fio_net_cmd *cmd);
63 typedef void (*client_thread_status_op)(struct fio_client *client, struct fio_net_cmd *cmd);
64 typedef void (*client_group_stats_op)(struct fio_client *client, struct fio_net_cmd *cmd);
65 typedef void (*client_eta_op)(struct jobs_eta *je);
66 typedef void (*client_probe_op)(struct fio_client *client, struct fio_net_cmd *cmd);
67 typedef void (*client_thread_status_display_op)(char *status_message, double perc);
68 typedef void (*client_quit_op)(struct fio_client *);
69 typedef void (*client_add_job_op)(struct fio_client *, struct fio_net_cmd *);
70 typedef void (*client_timed_out)(struct fio_client *);
71 typedef void (*client_stop_op)(struct fio_client *, struct fio_net_cmd *);
74 client_text_op_func text_op;
75 client_disk_util_op_func disk_util;
76 client_thread_status_op thread_status;
77 client_group_stats_op group_stats;
79 client_probe_op probe;
81 client_add_job_op add_job;
82 client_timed_out timed_out;
87 extern struct client_ops fio_client_ops;
94 extern int fio_handle_client(struct fio_client *);
95 extern void fio_client_dec_jobs_eta(struct client_eta *eta, client_eta_op fn);
96 extern void fio_client_sum_jobs_eta(struct jobs_eta *dst, struct jobs_eta *je);
104 extern int fio_clients_connect(void);
105 extern int fio_start_client(struct fio_client *);
106 extern int fio_start_all_clients(void);
107 extern int fio_clients_send_ini(const char *);
108 extern int fio_handle_clients(struct client_ops *);
109 extern int fio_client_add(struct client_ops *, const char *, void **);
110 extern struct fio_client *fio_client_add_explicit(struct client_ops *, const char *, int, int);
111 extern void fio_client_add_cmd_option(void *, const char *);
112 extern void fio_clients_terminate(void);