do {
if (nd->net_protocol == IPPROTO_UDP) {
+ struct sockaddr *to = (struct sockaddr *) &nd->addr;
+
ret = sendto(io_u->file->fd, io_u->xfer_buf,
- io_u->xfer_buflen, flags, &nd->addr,
- sizeof(nd->addr));
+ io_u->xfer_buflen, flags, to,
+ sizeof(*to));
} else {
/*
* if we are going to write more, set MSG_MORE
do {
if (nd->net_protocol == IPPROTO_UDP) {
socklen_t len = sizeof(nd->addr);
+ struct sockaddr *from = (struct sockaddr *) &nd->addr;
ret = recvfrom(io_u->file->fd, io_u->xfer_buf,
- io_u->xfer_buflen, flags, &nd->addr,
- &len);
+ io_u->xfer_buflen, flags, from, &len);
if (is_udp_close(io_u, ret)) {
td->done = 1;
return 0;
{
struct netio_data *nd = td->io_ops->data;
struct udp_close_msg msg;
+ struct sockaddr *to = (struct sockaddr *) &nd->addr;
int ret;
msg.magic = htonl(FIO_LINK_CLOSE_MAGIC);
msg.cmd = htonl(FIO_LINK_CLOSE);
- ret = sendto(f->fd, &msg, sizeof(msg), MSG_WAITALL, &nd->addr,
+ ret = sendto(f->fd, &msg, sizeof(msg), MSG_WAITALL, to,
sizeof(nd->addr));
if (ret < 0)
td_verror(td, errno, "sendto udp link close");
.open_file = fio_netio_open_file,
.close_file = generic_close_file,
.flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR |
- FIO_SIGQUIT,
+ FIO_SIGQUIT | 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_SIGQUIT | FIO_PIPEIO,
};
static void fio_init fio_netio_register(void)