[net] interface=str The IP address of the network interface used to send or
receive UDP multicast
+[netsplice] ttl=int
+[net] ttl=int Time-to-live value for outgoing UDP multicast packets.
+ Default: 1
+
[netsplice] nodelay=bool
[net] nodelay=bool Set TCP_NODELAY on TCP connections.
unsigned int listen;
unsigned int pingpong;
unsigned int nodelay;
+ unsigned int ttl;
char * interface;
};
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_NETIO,
},
+ {
+ .name = "ttl",
+ .lname = "net engine multicast ttl",
+ .type = FIO_OPT_INT,
+ .off1 = offsetof(struct netio_options, ttl),
+ .def = "1",
+ .minval = 0,
+ .help = "Time-to-live value for outgoing UDP multicast packets",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_NETIO,
+ },
{
.name = NULL,
},
#endif
if (o->proto == FIO_TYPE_UDP) {
- if (o->interface && fio_netio_is_multicast(td->o.filename)) {
+ if (!fio_netio_is_multicast(td->o.filename))
+ return 0;
+
+ if (o->interface) {
struct in_addr interface_addr;
if (inet_aton(o->interface, &interface_addr) == 0) {
log_err("fio: interface not valid interface IP\n");
return 1;
}
}
+ if (setsockopt(f->fd, IPPROTO_IP, IP_MULTICAST_TTL, &o->ttl, sizeof(o->ttl)) < 0) {
+ td_verror(td, errno, "setsockopt IP_MULTICAST_TTL");
+ close(f->fd);
+ return 1;
+ }
return 0;
} else if (o->proto == FIO_TYPE_TCP) {
socklen_t len = sizeof(nd->addr);
The IP address of the network interface used to send or receive UDP multicast
packets.
.TP
+.BI (net,netsplice)ttl \fR=\fPint
+Time-to-live value for outgoing UDP multicast packets. Default: 1
+.TP
.BI (net,netsplice)nodelay \fR=\fPbool
Set TCP_NODELAY on TCP connections.
.TP