net: support for unix domain sockets
[fio.git] / options.c
index f07cc7c42aedcee338fb5e9a7b7a7bbf773f4998..580d5aa5b95800d707c3fff92a719cc4ac4b1c76 100644 (file)
--- a/options.c
+++ b/options.c
@@ -595,6 +595,14 @@ static char *get_next_file_name(char **ptr)
        return start;
 }
 
+static int str_hostname_cb(void *data, const char *input)
+{
+       struct thread_data *td = data;
+
+       td->o.filename = strdup(input);
+       return 0;
+}
+
 static int str_filename_cb(void *data, const char *input)
 {
        struct thread_data *td = data;
@@ -871,6 +879,12 @@ static struct fio_option options[FIO_MAX_OPTS] = {
                .prio   = -1, /* must come after "directory" */
                .help   = "File(s) to use for the workload",
        },
+       {
+               .name   = "hostname",
+               .type   = FIO_OPT_STR_STORE,
+               .cb     = str_hostname_cb,
+               .help   = "Hostname for net IO engine",
+       },
        {
                .name   = "kb_base",
                .type   = FIO_OPT_INT,