Monday 25 August 2014

How to compile iperf3 for Windows

I was able to compile the binary for iperf3.0.6 code-base. The procedure is almost same as described in above blog with few changes.

1) Install Cygwin on windows : Download http://cygwin.com/setup-x86.exe from http://cygwin.com/install.html.

2) Run setup-x86.exe -> On the page of package selection screen click on 'Devel' so that 'Default' changes to 'Install' . We need development tools for compiling the code.

3) Download iper3.0.6 from http://downloads.es.net/pub/iperf/iperf-3.0.6.tar.gz

4) Copy it in c:\cygwin directory , unzip the iperf folder and copy the main directory to this (c:\cygwin folder)

5) Open the cygwin shell prompt, go to c:\cygwin\iperf-3-0.6 directory

6) ./configure  -> it should work fine

6) make
============================================
Making all in src
make[1]: Entering directory '/cygdrive/c/cygwin/iperf-3.0.6/iperf-3.0.6/src'
make  all-am
make[2]: Entering directory '/cygdrive/c/cygwin/iperf-3.0.6/iperf-3.0.6/src'
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c -o cjson.lo cjson.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c cjson.c  -DDLL_EXPORT -DPIC -o .libs/cjson.o
cjson.c: In function 'cJSON_strcasecmp':
cjson.c:58:2: warning: array subscript has type 'char' [-Wchar-subscripts]
  for ( ; tolower(*s1) == tolower(*s2); ++s1, ++s2)
  ^
cjson.c:58:2: warning: array subscript has type 'char' [-Wchar-subscripts]
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c cjson.c -o cjson.o >/dev/null 2>&1
mv -f .deps/cjson.Tpo .deps/cjson.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -Wall -MT iperf_api.lo -MD -MP -MF .deps/iperf_api.Tpo -c -o iperf_api.lo iperf_api.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_api.lo -MD -MP -MF .deps/iperf_api.Tpo -c iperf_api.c  -DDLL_EXPORT -DPIC -o .libs/iperf_api.o
In file included from iperf_api.c:40:0:
iperf_api.h:227:5: error: conflicting types for 'iprintf'
 int iprintf(struct iperf_test *test, const char *format, ...) __attribute__ ((format(printf,2,3)));
     ^
In file included from /usr/include/stdio.h:29:0,
                 from iperf_api.c:13:
/usr/include/stdio.h:259:5: note: previous declaration of 'iprintf' was here
 int _EXFUN(iprintf, (const char *, ...)
     ^
iperf_api.c:2583:1: error: conflicting types for 'iprintf'
 iprintf(struct iperf_test *test, const char* format, ...)
 ^
In file included from /usr/include/stdio.h:29:0,
                 from iperf_api.c:13:
/usr/include/stdio.h:259:5: note: previous declaration of 'iprintf' was here
 int _EXFUN(iprintf, (const char *, ...)
     ^
Makefile:838: recipe for target 'iperf_api.lo' failed
make[2]: *** [iperf_api.lo] Error 1
make[2]: Leaving directory '/cygdrive/c/cygwin/iperf-3.0.6/iperf-3.0.6/src'
Makefile:615: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/cygdrive/c/cygwin/iperf-3.0.6/iperf-3.0.6/src'
Makefile:369: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

===================================

Got above error , looks like iprintf is defined at two places at /usr/include/stdio.h
and at iperf_api.c

Resolution :
search for declaration of iprintf in iperf_api.c files and replace it with another function name iiprintf. I have used Editplus for editing the files. Now search for the the same function iprintf in all files and replace it with iiprintf almost 3 files and 55 places need to be changed.

or use below command (not tested but got from above ref link)

cd ./src
find ./ -iname "*.[ch]" |xargs -n1 sed -i s'#iprintf#newprintf#g'

7) Again run make , it should pass this time

8) make install

9) copy /usr/local/bin/iperf3.exe -> to another folder where all files will be kept , lets name it as  "iperf306"

10) Now copy below files from C:\cygwin\bin into iperf306
  • cygwin1.dll
  • cyggcc_s-1.dll
  • cygstdc++-6.dll
11) copy the whole folder iperf306 to another pc and try running it

12) if while starting server or client you get below error , means ipv6 is not supported on the Windows machine.

 iperf3: error - unable to start listener for connections: Protocol not available

Try running with -4 option

iperf3.exe -4 -s

iperf3,exe -4 -c 198.173.1.1

13)  Now server is starting fine but below error came:

iperf3: error - unable to create a new stream: No such file or directory

Still trying to understand the issue , meanwhile if anyone can help , will be just GREAT  !

Will update if found solution.

Happy trying !

Updated : Sept 15, 2015

As per suggestions from Daniel in comments I did below changes and compiled the code again. Now it is working fine.

"C:\cygwin\iperf-3.0.7\src\iperf_api.c"(2264,24):

char template[] = "/tmp/iperf3.XXXXXX";

to

char template[] = "./iperf3.XXXXXX";

Thanks Daniel and Rion for your comments.

Free IEEE 802.11 WLAN Simulator -Pamvotis

A nice simulator to test 802.1e parameters and

Pamvotis is a Wireless LAN Simulator for all the current physical layer extentions of the IEEE 802.11 (IEEE 802.11 a/b/g) standard and for the IEEE 802.11e Draft for Quality of Service in WLANs.

http://www.pamvotis.org/

We can get below statistics from this tool:

  • Throughput (bits/sec): The number of bits that a node successfully transmitted in a specific time interval.
  • Throughput (packets/sec): The number of packets that a node successfully transmitted in a specific time interval.
  • Utilization: The percentage of the channel capacity the node occupied. The utilization is the node's throughput in bits per second divided by the node's data rate.
  • Retransmission Attempts: The mean number of retransmission attempts (collisions) until the packet is successfully transmitted.
  • Media access delay: The delay of a packet from the time it is picked up from the transmitter until it is successfully received from the receiver. This statistic contains the delay due to retransmission attempts and the transmission delay. Note: The statistic is relative to the packet length. Moreover, it does not depend on the node's packet generation rate, but only on the network load.
  • Queuing delay: The delay from the birth of a packet until the transmitter picks it up for transmission. It only contains the time a packet waits in the packet queue. It is relative to the packet generation rate and to the media access delay.
  • Total packet delay: The sum of the media access delay and the queuing delay. It is the total delay from the birth of a packet until its reception from the receiver.
  • Delay Jitter: The total delay jitter of each node. The delay jitter is the standard deviation of the total packet delay of each node.
  • Packet Queue Length: The mean number of packets that wait to be transmitted in the packet queue


Saturday 23 August 2014

ISO/IEC/IEEE 29119 Software Testing -The International Software Testing Standard


The new standard 29119 on software testing is finalized and is evoking responses from various tester communities. If you don't know about this standard and its controversy read on ...

The standard's description can be found at below site, as its "Standard" it will be paid, so after paying fees only you will be able to get the actual standard.

http://softwaretestingstandard.org/

It says :

========================================================
ISO/IEC/IEEE 29119 Software Testing is an internationally agreed set of standards for software testing that can be used within any software development life cycle or organisation. By implementing these standards, you will be adopting the only internationally-recognised and agreed standards for software testing, which will provide your organisation with a high-quality approach to testing that can be communicated throughout the world. There are currently five standards:

    ISO/IEC 29119-1: Concepts & Definitions (published September 2013)
    ISO/IEC 29119-2: Test Processes (published September 2013)
    ISO/IEC 29119-3: Test Documentation (published September 2013)
    ISO/IEC 29119-4: Test Techniques (at DIS stage, anticipating publiation in late 2014)
    ISO/IEC 29119-5: Keyword Driven Testing (at CD stage, anticipating publication in 2015)

Plus, based on the processes defined in ISO/IEC/IEEE 29119-2:

    ISO/IEC 33063: Process Assessment Model (at DIS stage)

The ISO/IEC/IEEE 29119 standards replace a number of existing software testing standards:

    IEEE 829 Test Documentation
    IEEE 1008 Unit Testing
    BS 7925-1 Vocabulary of Terms in Software Testing
    BS 7925-2 Software Component Testing Standard

===========================================================

People who are opposing this says:

1) Costly

2) Will be seen as mandatory skill for testers (may harm individuality and freedom)

3) May loose ability to experiment and try non-conventional ways

4) Once standard is accepted, testers can be held responsible for project failures ( non-compliance)

5) Effort will be more on documentation and process rather than testing


What you can do : Learn/Share/Write/Sign the below Petition for stopping it:

http://www.ipetitions.com/petition/stop29119


Ref:
Keep Trying, Keep Analyzing !



OSI/ISO network management model- FCAPS

We know about OSI seven layer model and  TCP/IP layers, but only few knows about another model which is known as OSI/ISO network management model or the FCAPS model.

FCAPS stands for fault, configuration, accounting, performance and security. These are the five management areas and were initially defined as ISO standard which later got changed into ITU-T standard known as TMN recommendation on Management Functions (M.3400) and can be found at

http://www.itu.int/rec/T-REC-M.3400-200002-I/en

Brief explanation on these functions :

Fault management— Detect, isolate, notify, and correct faults encountered in the network.

 Configuration management— Configure aspects of network devices, such as configuration file management, inventory management, and software management.

 Accounting management— Collect usage information of network resources.

  Performance management— Monitor and measure various aspects of performance so that overall performance can be maintained at a defined level.

    Security management— Secure access to network devices, network resources, and services to authorized individuals.



Ref : Wiki, etutorials.org