static int fio_netio_send(struct thread_data *td, struct io_u *io_u)
{
struct netio_data *nd = td->io_ops->data;
- int ret, flags = MSG_DONTWAIT;
+ int ret, flags = OS_MSG_DONTWAIT;
do {
if (nd->net_protocol == IPPROTO_UDP) {
if (ret <= 0)
break;
- flags &= ~MSG_DONTWAIT;
+ flags &= ~OS_MSG_DONTWAIT;
} while (1);
return ret;
static int fio_netio_recv(struct thread_data *td, struct io_u *io_u)
{
struct netio_data *nd = td->io_ops->data;
- int ret, flags = MSG_DONTWAIT;
+ int ret, flags = OS_MSG_DONTWAIT;
do {
if (nd->net_protocol == IPPROTO_UDP) {
+#ifdef __hpux
+ int len = sizeof(nd->addr);
+#else
socklen_t len = sizeof(nd->addr);
+#endif
struct sockaddr *from = (struct sockaddr *) &nd->addr;
ret = recvfrom(io_u->file->fd, io_u->xfer_buf,
ret = poll_wait(td, io_u->file->fd, POLLIN);
if (ret <= 0)
break;
- flags &= ~MSG_DONTWAIT;
+ flags &= ~OS_MSG_DONTWAIT;
flags |= MSG_WAITALL;
} while (1);
static int fio_netio_accept(struct thread_data *td, struct fio_file *f)
{
struct netio_data *nd = td->io_ops->data;
+#ifdef __hpux
+ int socklen = sizeof(nd->addr);
+#else
socklen_t socklen = sizeof(nd->addr);
+#endif
if (nd->net_protocol == IPPROTO_UDP) {
f->fd = nd->listenfd;
.open_file = fio_netio_open_file,
.close_file = generic_close_file,
.flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR |
- FIO_SIGQUIT,
+ FIO_SIGTERM | FIO_PIPEIO,
};
#endif
.open_file = fio_netio_open_file,
.close_file = fio_netio_close_file,
.flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR |
- FIO_SIGQUIT,
+ FIO_SIGTERM | FIO_PIPEIO,
};
static void fio_init fio_netio_register(void)