[netperf-dev] netperf2 commit notice r345 - trunk/src

raj at netperf.org raj at netperf.org
Mon Mar 15 15:29:46 PDT 2010


Author: raj
Date: 2010-03-15 15:29:46 -0700 (Mon, 15 Mar 2010)
New Revision: 345

Modified:
   trunk/src/nettest_omni.c
Log:
still working on it

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2010-03-15 21:21:46 UTC (rev 344)
+++ trunk/src/nettest_omni.c	2010-03-15 22:29:46 UTC (rev 345)
@@ -4407,7 +4407,12 @@
 					  nf_to_af(omni_request->ipfamily),
 					  omni_request->netperf_ip,
 					  &(omni_request->netperf_port));
+      ret = get_sockaddr_family_addr_port(&remote_addr,
+					  nf_to_af(omni_request->ipfamily),
+					  omni_request->netserver_ip,
+					  &(omni_request->data_port));
       
+      
       if (debug > 1) {
 	fprintf(where,"netperf: send_omni: requesting OMNI test\n");
       }
@@ -5242,6 +5247,16 @@
   
 }
 
+static void
+set_hostname_and_port_2(void *addr, char *hostname, char *portstr, int family, int port)
+{
+
+  inet_ntop(family, addr, hostname, BUFSIZ);
+    
+  sprintf(portstr, "%u", port);
+
+}
+
 
 
 /* the name is something of a misnomer since this test could send, or
@@ -5333,10 +5348,11 @@
   connection_test = omni_request->flags & OMNI_CONNECT_TEST;
   direction       = omni_request->direction;
 
-  set_hostname_and_port(local_name,
-			port_buffer,
-			nf_to_af(omni_request->ipfamily),
-			omni_request->data_port);
+  set_hostname_and_port_2(omni_request->netserver_ip,
+			  local_name,
+			  port_buffer,
+			  nf_to_af(omni_request->ipfamily),
+			  omni_request->data_port);
 
   local_res = complete_addrinfo(local_name,
 				local_name,



More information about the netperf-dev mailing list