[netperf-dev] netperf2 commit notice r93 - trunk/src
raj at netperf.org
raj at netperf.org
Mon Feb 12 17:17:54 PST 2007
Author: raj
Date: 2007-02-12 17:17:53 -0800 (Mon, 12 Feb 2007)
New Revision: 93
Modified:
trunk/src/netlib.c
Log:
put 'netperf' into the data we send across the network to make stuff easier to spot
Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c 2007-02-10 01:04:46 UTC (rev 92)
+++ trunk/src/netlib.c 2007-02-13 01:17:53 UTC (rev 93)
@@ -1206,6 +1206,8 @@
int do_fill;
FILE *fill_source;
+ char default_fill[] = "netperf";
+ int fill_cursor = 0;
malloc_size = buffer_size + alignment + offset;
@@ -1270,6 +1272,20 @@
bytes_left -= bytes_read;
}
}
+ else {
+ /* use the default fill to ID our data traffic on the
+ network. it ain't exactly pretty, but it should work */
+ int j;
+ char *bufptr = temp_link->buffer_ptr;
+ for (j = 0; j < buffer_size; j++) {
+ bufptr[j] = default_fill[fill_cursor];
+ fill_cursor += 1;
+ if (fill_cursor > strlen(default_fill)) {
+ fill_cursor = 0;
+ }
+ }
+
+ }
temp_link->next = prev_link;
prev_link = temp_link;
}
More information about the netperf-dev
mailing list