Home | History | Annotate | Download | only in engines

Lines Matching refs:nd

280 	struct netio_data *nd = td->io_ops->data;
282 return splice_io_u(io_u->file->fd, nd->pipes[1], io_u->xfer_buflen);
291 struct netio_data *nd = td->io_ops->data;
293 return splice_io_u(nd->pipes[0], io_u->file->fd, len);
329 struct netio_data *nd = td->io_ops->data;
331 return vmsplice_io_u(io_u, nd->pipes[0], len);
339 struct netio_data *nd = td->io_ops->data;
341 return vmsplice_io_u(io_u, nd->pipes[1], io_u->xfer_buflen);
389 struct netio_data *nd = td->io_ops->data;
399 to = (struct sockaddr *) &nd->addr6;
400 len = sizeof(nd->addr6);
402 to = (struct sockaddr *) &nd->addr;
403 len = sizeof(nd->addr);
449 struct netio_data *nd = td->io_ops->data;
460 from = (struct sockaddr *) &nd->addr;
461 *len = sizeof(nd->addr);
463 from = (struct sockaddr *) &nd->addr6;
464 *len = sizeof(nd->addr6);
498 struct netio_data *nd = td->io_ops->data;
503 if (!nd->use_splice || is_udp(o) ||
509 if (!nd->use_splice || is_udp(o) ||
562 struct netio_data *nd = td->io_ops->data;
634 socklen_t len = sizeof(nd->addr);
636 if (connect(f->fd, (struct sockaddr *) &nd->addr, len) < 0) {
642 socklen_t len = sizeof(nd->addr6);
644 if (connect(f->fd, (struct sockaddr *) &nd->addr6, len) < 0) {
651 struct sockaddr_un *addr = &nd->addr_un;
668 struct netio_data *nd = td->io_ops->data;
674 f->fd = nd->listenfd;
683 if (poll_wait(td, nd->listenfd, POLLIN) < 0)
687 socklen = sizeof(nd->addr);
688 f->fd = accept(nd->listenfd, (struct sockaddr *) &nd->addr, &socklen);
690 socklen = sizeof(nd->addr6);
691 f->fd = accept(nd->listenfd, (struct sockaddr *) &nd->addr6, &socklen);
720 struct netio_data *nd = td->io_ops->data;
728 to = (struct sockaddr *) &nd->addr6;
729 len = sizeof(nd->addr6);
731 to = (struct sockaddr *) &nd->addr;
732 len = sizeof(nd->addr);
759 struct netio_data *nd = td->io_ops->data;
767 nd->addr6);
768 to = (struct sockaddr *) &nd->addr6;
770 len = sizeof(nd->addr);
771 to = (struct sockaddr *) &nd->addr;
792 struct netio_data *nd = td->io_ops->data;
800 len = sizeof(nd->addr6);
801 to = (struct sockaddr *) &nd->addr6;
803 len = sizeof(nd->addr);
804 to = (struct sockaddr *) &nd->addr;
894 struct netio_data *nd = td->io_ops->data;
909 nd->addr.sin_family = AF_INET;
910 nd->addr.sin_port = htons(port);
911 nd->addr6.sin6_family = AF_INET6;
912 nd->addr6.sin6_port = htons(port);
916 dst = &nd->addr6.sin6_addr;
919 dst = &nd->addr.sin_addr;
929 len = sizeof(nd->addr6.sin6_addr);
932 len = sizeof(nd->addr.sin_addr);
944 struct netio_data *nd = td->io_ops->data;
945 struct sockaddr_un *soun = &nd->addr_un;
965 struct netio_data *nd = td->io_ops->data;
966 struct sockaddr_un *addr = &nd->addr_un;
992 nd->listenfd = fd;
998 struct netio_data *nd = td->io_ops->data;
1078 saddr = (struct sockaddr *) &nd->addr;
1079 len = sizeof(nd->addr);
1081 nd->addr.sin_family = AF_INET;
1082 nd->addr.sin_addr.s_addr = sin.sin_addr.s_addr ? sin.sin_addr.s_addr : htonl(INADDR_ANY);
1083 nd->addr.sin_port = htons(port);
1085 saddr = (struct sockaddr *) &nd->addr6;
1086 len = sizeof(nd->addr6);
1088 nd->addr6.sin6_family = AF_INET6;
1089 nd->addr6.sin6_addr = in6addr_any;
1090 nd->addr6.sin6_port = htons(port);
1099 nd->listenfd = fd;
1105 struct netio_data *nd = td->io_ops->data;
1119 if (listen(nd->listenfd, 10) < 0) {
1121 nd->listenfd = -1;
1178 struct netio_data *nd = td->io_ops->data;
1180 if (nd) {
1181 if (nd->listenfd != -1)
1182 close(nd->listenfd);
1183 if (nd->pipes[0] != -1)
1184 close(nd->pipes[0]);
1185 if (nd->pipes[1] != -1)
1186 close(nd->pipes[1]);
1188 free(nd);
1194 struct netio_data *nd;
1203 nd = malloc(sizeof(*nd));;
1205 memset(nd, 0, sizeof(*nd));
1206 nd->listenfd = -1;
1207 nd->pipes[0] = nd->pipes[1] = -1;
1208 td->io_ops->data = nd;
1222 struct netio_data *nd;
1226 nd = td->io_ops->data;
1227 if (nd) {
1228 if (pipe(nd->pipes) < 0)
1231 nd->use_splice = 1;