[netperf-dev] netperf2 commit notice r205 - trunk/src
raj at netperf.org
raj at netperf.org
Fri Feb 1 14:46:20 PST 2008
Author: raj
Date: 2008-02-01 14:46:19 -0800 (Fri, 01 Feb 2008)
New Revision: 205
Modified:
trunk/src/netsh.c
trunk/src/nettest_omni.c
Log:
protocol fixes
Modified: trunk/src/netsh.c
===================================================================
--- trunk/src/netsh.c 2008-02-01 21:45:40 UTC (rev 204)
+++ trunk/src/netsh.c 2008-02-01 22:46:19 UTC (rev 205)
@@ -425,29 +425,35 @@
}
#ifdef IPPROTO_TCP
- if (strstr(temp,"tcp")){
+ if (!strcasecmp(temp,"tcp")){
socket_type = SOCK_STREAM;
return IPPROTO_TCP;
}
#endif
#ifdef IPPROTO_UDP
- if (strstr(temp,"udp")) {
+ if (!strcasecmp(temp,"udp")) {
socket_type = SOCK_DGRAM;
return IPPROTO_UDP;
}
#endif
#ifdef IPPROTO_SCTP
- if (strstr(temp,"sctp")) {
+ if (!strcasecmp(temp,"sctp")) {
/* it can be more than one socket type */
return IPPROTO_SCTP;
}
#endif
#ifdef IPPROTO_SDP
- if (strstr(temp,"sdp")) {
+ if (!strcasecmp(temp,"sdp")) {
socket_type = SOCK_STREAM;
return IPPROTO_SDP;
}
#endif
+#ifdef IPPROTO_DCCP
+ if (!strcasecmp(temp,"dccp")) {
+ socket_type = SOCK_DGRAM;
+ return IPPROTO_DCCP;
+ }
+#endif
return IPPROTO_IP;
}
Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c 2008-02-01 21:45:40 UTC (rev 204)
+++ trunk/src/nettest_omni.c 2008-02-01 22:46:19 UTC (rev 205)
@@ -3708,6 +3708,8 @@
remote_res->ai_addr,
remote_res->ai_addrlen);
need_socket = 1;
+ lsr_size_end = lsr_size;
+ lss_size_end = lss_size;
}
/* this call will always give us the elapsed time for the test, and
@@ -4532,8 +4534,11 @@
#endif
close_data_socket(data_socket,NULL,0);
}
- else
+ else {
close_data_socket(data_socket,(struct sockaddr *)&peeraddr_in,addrlen);
+ lsr_size_end = lsr_size;
+ lss_size_end = lss_size;
+ }
/* send the results to the sender */
More information about the netperf-dev
mailing list