Microchip TCP/IP Stack v3.75.5 (beta)

Contents
Download zip file (866KB)



The udptest module

This version of the modified TCP/IP Stack distribution includes the udptest module that implements a throughput test using UDP.

To include this module you have to define the STACK_USE_UDPTEST in the config.h file.

Every time that the UDPTest() function is called it will send over the network a UDP datagram to a broadcast address or to a specific target address defined in the udptest.h header file (UDP_TST_TARGET_MAC and UDP_TST_TARGET_IP ).

Datagrams are sent to the UDP port defined by UDP_TST_TARGET_PORT.

Datagram size is determined by the MAX_UDP_DATA value defined in the code, and all data bytes will be filled with the value 0x41 (A).

If you will be using a specific host address as a target is recommended that on the target host you run a process able to listen on the UDP target port, if there is no process listening to the port depending on the TCP/IP implementation you may start getting back ICMP messages reporting that the service is not available.

In Unix you can use nc or netcat for this purpose.

WARNING: While the number of packets per second and traffic volume this function generates is not very high, if the target address is configured as a broadcast address, depending on the configuration of your network or other network devices this function can produce a broadcast storm or other undesirable network problems. Use for testing purposes only.

The table in Figure 1 below shows the results obtained by running the udptest module in different hardware implementations, with different microcontrollers and clock speeds.

The image code was compiled only with the ICMP and udptest modules and underlying protocols (IP and UDP) and the LCD drivers if the hardware platform included a display.

The bits per second and packets per second metrics were obtained from the interface statistics of a Cisco Catalyst switch after running the test for more than 30 minutes for each tested device and configuration, the target was a dual processor Pentium server running RedHat Linux.



Figure 1
[Click on the image for a larger view]





   
    ©2006-2008, Jorge Amodio, All rights reserved

Last Update: June 7, 2007