},
{ .ival = "udp",
.oval = FIO_TYPE_UDP,
- .help = "Unreliable Datagram Protocol",
+ .help = "User Datagram Protocol",
},
{ .ival = "unix",
.oval = FIO_TYPE_UNIX,
td_verror(td, EINVAL, "bad direction");
return 1;
}
-
+
return 0;
}
static int fio_netio_open_file(struct thread_data *td, struct fio_file *f)
{
int ret;
+ struct netio_options *o = td->eo;
- if (td_read(td))
+ if (o->listen)
ret = fio_netio_accept(td, f);
else
ret = fio_netio_connect(td, f);
struct netio_options *o = td->eo;
int ret;
+#ifdef WIN32
+ WSADATA wsd;
+ WSAStartup(MAKEWORD(2,2), &wsd);
+#endif
+
if (td_random(td)) {
log_err("fio: network IO can't be random\n");
return 1;
if (o->proto != FIO_TYPE_TCP) {
if (o->listen) {
- log_err("fio: listen only valid for TCP proto IO\n");
- return 1;
+ log_err("fio: listen only valid for TCP proto IO\n");
+ return 1;
}
if (td_rw(td)) {
- log_err("fio: datagram network connections must be"
+ log_err("fio: datagram network connections must be"
" read OR write\n");
- return 1;
+ return 1;
+ }
+ if (o->proto == FIO_TYPE_UNIX && !td->o.filename) {
+ log_err("fio: UNIX sockets need host/filename\n");
+ return 1;
}
o->listen = td_read(td);
}