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;
51 uint32_t thread_number;
54 struct flist_head eta_list;
55 struct client_eta *eta_in_flight;
57 struct flist_head cmd_list;
62 struct client_ops *ops;
67 typedef void (client_cmd_op)(struct fio_client *, struct fio_net_cmd *);
68 typedef void (client_eta_op)(struct jobs_eta *je);
69 typedef void (client_timed_out_op)(struct fio_client *);
70 typedef void (client_jobs_eta_op)(struct fio_client *client, struct jobs_eta *je);
71 typedef void (client_iolog_op)(struct fio_client *client, struct cmd_iolog_pdu *);
75 client_cmd_op *disk_util;
76 client_cmd_op *thread_status;
77 client_cmd_op *group_stats;
78 client_jobs_eta_op *jobs_eta;
82 client_cmd_op *add_job;
83 client_cmd_op *update_job;
84 client_timed_out_op *timed_out;
87 client_cmd_op *job_start;
88 client_iolog_op *iolog;
89 client_timed_out_op *removed;
91 unsigned int eta_msec;
96 extern struct client_ops fio_client_ops;
100 unsigned int pending;
103 extern int fio_handle_client(struct fio_client *);
104 extern void fio_client_dec_jobs_eta(struct client_eta *eta, client_eta_op fn);
105 extern void fio_client_sum_jobs_eta(struct jobs_eta *dst, struct jobs_eta *je);
113 extern int fio_client_connect(struct fio_client *);
114 extern int fio_clients_connect(void);
115 extern int fio_start_client(struct fio_client *);
116 extern int fio_start_all_clients(void);
117 extern int fio_client_send_ini(struct fio_client *, const char *);
118 extern int fio_clients_send_ini(const char *);
119 extern int fio_handle_clients(struct client_ops *);
120 extern int fio_client_add(struct client_ops *, const char *, void **);
121 extern struct fio_client *fio_client_add_explicit(struct client_ops *, const char *, int, int);
122 extern void fio_client_add_cmd_option(void *, const char *);
123 extern int fio_client_terminate(struct fio_client *);
124 extern void fio_clients_terminate(void);
125 extern struct fio_client *fio_get_client(struct fio_client *);
126 extern void fio_put_client(struct fio_client *);
127 extern int fio_client_update_options(struct fio_client *, struct thread_options *, uint64_t *);
128 extern int fio_client_wait_for_reply(struct fio_client *, uint64_t);
130 #define FIO_CLIENT_DEF_ETA_MSEC 900
133 FIO_CLIENT_TYPE_CLI = 1,
134 FIO_CLIENT_TYPE_GUI = 2,