updated unit test
This commit is contained in:
@@ -506,32 +506,12 @@ int do_test(std::string path, std::string nwid, int type, int protocol, int mode
|
|||||||
}
|
}
|
||||||
// IPv6
|
// IPv6
|
||||||
if(protocol == 6) {
|
if(protocol == 6) {
|
||||||
|
|
||||||
struct hostent *server;
|
|
||||||
server = gethostbyname2("fde5:cd7a:9e1c:0fd2:7299:9369:4d7b:feff",AF_INET6);
|
|
||||||
if (server == NULL) {
|
|
||||||
printf("ERROR, no such host\n");
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
memset((char *) &addr6, 0, sizeof(addr6));
|
|
||||||
addr6.sin6_flowinfo = 0;
|
|
||||||
addr6.sin6_family = AF_INET6;
|
|
||||||
memmove((char *) &addr6.sin6_addr.s6_addr, (char *) server->h_addr, server->h_length);
|
|
||||||
addr6.sin6_port = htons(port);
|
|
||||||
|
|
||||||
/*
|
|
||||||
server = gethostbyname2(ipstr.c_str(),AF_INET6);
|
server = gethostbyname2(ipstr.c_str(),AF_INET6);
|
||||||
memset((char *) &addr6, 0, sizeof(addr6));
|
memset((char *) &addr6, 0, sizeof(addr6));
|
||||||
addr6.sin6_flowinfo = 0;
|
addr6.sin6_flowinfo = 0;
|
||||||
addr6.sin6_family = AF_INET6;
|
addr6.sin6_family = AF_INET6;
|
||||||
addr6.sin6_port = htons(port);
|
|
||||||
//addr6.sin6_addr = in6addr_any;
|
|
||||||
memmove((char *) &addr6.sin6_addr.s6_addr, (char *) server->h_addr, server->h_length);
|
memmove((char *) &addr6.sin6_addr.s6_addr, (char *) server->h_addr, server->h_length);
|
||||||
//printf(" running (%d) test as ipv=%d\n", mode, protocol);
|
addr6.sin6_port = htons(port);
|
||||||
printf("ipstr = %s\n", ipstr.c_str());
|
|
||||||
|
|
||||||
*/
|
|
||||||
return ipv6_tcp_server_test(&addr6, port);
|
return ipv6_tcp_server_test(&addr6, port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -567,8 +547,7 @@ int do_test(std::string path, std::string nwid, int type, int protocol, int mode
|
|||||||
addr6.sin6_family = AF_INET6;
|
addr6.sin6_family = AF_INET6;
|
||||||
memmove((char *) &addr6.sin6_addr.s6_addr, (char *) server->h_addr, server->h_length);
|
memmove((char *) &addr6.sin6_addr.s6_addr, (char *) server->h_addr, server->h_length);
|
||||||
addr6.sin6_port = htons(port);
|
addr6.sin6_port = htons(port);
|
||||||
//printf(" running (%d) test as ipv=%d\n", mode, protocol);
|
return ipv6_tcp_server_test(&addr6, port, operation, n_count, delay);
|
||||||
return ipv6_tcp_client_sustained_test(&addr6, port, operation, n_count, delay);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user