Hello,
I was trying to add an option to iperf to allow for dumping data from a
file transferred using UDP. I can successfully transfer a text file and
obtain a dump for it at the server, but there are a couple of problems:
* The beginning of the file is not transferred (I see some random
symbols in the beginning)
* ^...@^@^...@^ak1u
^...@^@;=...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^S
^...@^@^...@^@^...@^@^...@^@yyix
* I get random symbols (similar to above) in the middle of the
text I transfer
* "more disturbing" is dumped as "more d...@^@^...@^bk1u
^...@^@l...@^@^...@^@^...@^@^...@^@^...@^@^...@^s^@^...@^p^@^...@yyixisturbing"
* The appearance of these symbols seems periodic
I added the following code to PerfSocket:: Recv_UDP
InitTransfer();
+ FILE *fpnt;
+ if ( ( fpnt = fopen ( "output.txt", "w" ) ) == NULL )
+ {
+ /* if you can't open the output.txt file for some reason //
+ * print the words: cannot open file*/
+ printf("File could not be opened. Cannot output to file!!");
+ }
do {
// perform read
currLen = read( mSock, mBuf, mSettings->mBufLen );
+ int i = 0;
+ while ( i != currLen )
+ {
+ fprintf( fpnt, "%c", mBuf[i]);
+ i++;
+ }
sReporting.Unlock();
+ fclose( fpnt );
// send a acknowledgement back only if we're NOT receiving multicast
Any hints as to why this is happening would be much appreciated. All
questions, comments or remarks are welcome.
--
Regards,
Al-Hasanur Rahman
Measurement Testbed Associate, Co-op
Advanced Products
Research In Motion
X10988
Cell: 519-589-9483
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential
information, privileged material (including material protected by the
solicitor-client or other applicable privileges), or constitute non-public
information. Any use of this information by anyone other than the intended
recipient is prohibited. If you have received this transmission in error,
please immediately reply to the sender and delete this information from your
system. Use, dissemination, distribution, or reproduction of this transmission
by unintended recipients is not authorized and may be unlawful.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Iperf-users mailing list
Iperf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iperf-users