Lines Matching defs:nd

376 	struct netio_data *nd = td->io_ops->data;
378 return splice_io_u(io_u->file->fd, nd->pipes[1], io_u->xfer_buflen);
387 struct netio_data *nd = td->io_ops->data;
389 return splice_io_u(nd->pipes[0], io_u->file->fd, len);
425 struct netio_data *nd = td->io_ops->data;
427 return vmsplice_io_u(io_u, nd->pipes[0], len);
435 struct netio_data *nd = td->io_ops->data;
437 return vmsplice_io_u(io_u, nd->pipes[1], io_u->xfer_buflen);
483 static void store_udp_seq(struct netio_data *nd, struct io_u *io_u)
493 us->seq = cpu_to_le64(nd->udp_send_seq++);
496 static void verify_udp_seq(struct thread_data *td, struct netio_data *nd,
505 if (nd->seq_off)
512 nd->seq_off = 1;
518 if (seq != nd->udp_recv_seq)
519 td->ts.drop_io_u[io_u->ddir] += seq - nd->udp_recv_seq;
521 nd->udp_recv_seq = seq + 1;
526 struct netio_data *nd = td->io_ops->data;
536 to = (struct sockaddr *) &nd->addr6;
537 len = sizeof(nd->addr6);
539 to = (struct sockaddr *) &nd->addr;
540 len = sizeof(nd->addr);
544 store_udp_seq(nd, io_u);
589 struct netio_data *nd = td->io_ops->data;
600 from = (struct sockaddr *) &nd->addr;
601 *len = sizeof(nd->addr);
603 from = (struct sockaddr *) &nd->addr6;
604 *len = sizeof(nd->addr6);
639 verify_udp_seq(td, nd, io_u);
647 struct netio_data *nd = td->io_ops->data;
652 if (!nd->use_splice || is_udp(o) ||
658 if (!nd->use_splice || is_udp(o) ||
713 struct netio_data *nd = td->io_ops->data;
794 socklen_t len = sizeof(nd->addr);
796 if (connect(f->fd, (struct sockaddr *) &nd->addr, len) < 0) {
802 socklen_t len = sizeof(nd->addr6);
804 if (connect(f->fd, (struct sockaddr *) &nd->addr6, len) < 0) {
811 struct sockaddr_un *addr = &nd->addr_un;
828 struct netio_data *nd = td->io_ops->data;
834 f->fd = nd->listenfd;
843 if (poll_wait(td, nd->listenfd, POLLIN) < 0)
847 socklen = sizeof(nd->addr);
848 f->fd = accept(nd->listenfd, (struct sockaddr *) &nd->addr, &socklen);
850 socklen = sizeof(nd->addr6);
851 f->fd = accept(nd->listenfd, (struct sockaddr *) &nd->addr6, &socklen);
880 struct netio_data *nd = td->io_ops->data;
888 to = (struct sockaddr *) &nd->addr6;
889 len = sizeof(nd->addr6);
891 to = (struct sockaddr *) &nd->addr;
892 len = sizeof(nd->addr);
915 struct netio_data *nd = td->io_ops->data;
923 len = sizeof(nd->addr6);
924 to = (struct sockaddr *) &nd->addr6;
926 len = sizeof(nd->addr);
927 to = (struct sockaddr *) &nd->addr;
949 struct netio_data *nd = td->io_ops->data;
957 len = sizeof(nd->addr6);
958 to = (struct sockaddr *) &nd->addr6;
960 len = sizeof(nd->addr);
961 to = (struct sockaddr *) &nd->addr;
1051 struct netio_data *nd = td->io_ops->data;
1066 nd->addr.sin_family = AF_INET;
1067 nd->addr.sin_port = htons(port);
1068 nd->addr6.sin6_family = AF_INET6;
1069 nd->addr6.sin6_port = htons(port);
1073 dst = &nd->addr6.sin6_addr;
1076 dst = &nd->addr.sin_addr;
1086 len = sizeof(nd->addr6.sin6_addr);
1089 len = sizeof(nd->addr.sin_addr);
1101 struct netio_data *nd = td->io_ops->data;
1102 struct sockaddr_un *soun = &nd->addr_un;
1122 struct netio_data *nd = td->io_ops->data;
1123 struct sockaddr_un *addr = &nd->addr_un;
1149 nd->listenfd = fd;
1155 struct netio_data *nd = td->io_ops->data;
1244 saddr = (struct sockaddr *) &nd->addr;
1245 len = sizeof(nd->addr);
1247 nd->addr.sin_family = AF_INET;
1248 nd->addr.sin_addr.s_addr = sin.sin_addr.s_addr ? sin.sin_addr.s_addr : htonl(INADDR_ANY);
1249 nd->addr.sin_port = htons(port);
1251 saddr = (struct sockaddr *) &nd->addr6;
1252 len = sizeof(nd->addr6);
1254 nd->addr6.sin6_family = AF_INET6;
1255 nd->addr6.sin6_addr = in6addr_any;
1256 nd->addr6.sin6_port = htons(port);
1265 nd->listenfd = fd;
1271 struct netio_data *nd = td->io_ops->data;
1285 if (listen(nd->listenfd, 10) < 0) {
1287 nd->listenfd = -1;
1346 struct netio_data *nd = td->io_ops->data;
1348 if (nd) {
1349 if (nd->listenfd != -1)
1350 close(nd->listenfd);
1351 if (nd->pipes[0] != -1)
1352 close(nd->pipes[0]);
1353 if (nd->pipes[1] != -1)
1354 close(nd->pipes[1]);
1356 free(nd);
1362 struct netio_data *nd;
1371 nd = malloc(sizeof(*nd));;
1373 memset(nd, 0, sizeof(*nd));
1374 nd->listenfd = -1;
1375 nd->pipes[0] = nd->pipes[1] = -1;
1376 td->io_ops->data = nd;
1390 struct netio_data *nd;
1394 nd = td->io_ops->data;
1395 if (nd) {
1396 if (pipe(nd->pipes) < 0)
1399 nd->use_splice = 1;