Internet Control Message Protocol API Test (Compact 2013)

3/26/2014

The Internet Control Message Protocol (ICMP) Test determines whether the following ICMP application programming interfaces and methods are functional.

IPv4: IcmpCreateFile, IcmpCloseHandle, IcmpSendEcho, IcmpSendEcho2, IcmpParseReplies

IPv6: Icmp6CreateFile, Icmp6SendEcho2, Icmp6ParseReplies

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following tables show the hardware requirements for the ICMP API Test.

Requirements

Description

Ethernet port

The ICMP API Test is a ping test. If you intend to ping machines other than the one hosting the test, those machines need to be on the network and running Windows Embedded Compact or a Windows desktop operating system.

The following table shows the software requirements for the ICMP API Test.

Requirements

Description

Tux.exe

Test harness, required for executing the tests

Kato.dll

Logging engine, required for logging test data

IcmpAPITest.dll

Library containing the ICMP API test cases

Subtests

The table below lists the subtests included in this test.

SubTest ID

Description

1

IcmpSendEcho: ICMP_INVALID_HANDLE

2

IcmpSendEcho: ICMP_NULL_ADDR

3

IcmpSendEcho: ICMP_NULL_SEND_BUFFER

4

IcmpSendEcho: ICMP_SEND_BUFFER_FRAG

5

IcmpSendEcho: ICMP_SEND_BUFFER_NO_FRAG

6

IcmpSendEcho: ICMP_SEND_BUFFER_TOO_SMALL

7

IcmpSendEcho: ICMP_INVALID_SEND_LEN

8

IcmpSendEcho: ICMP_NULL_REPLY_BUFFER

9

IcmpSendEcho: ICMP_INVALID_REPLY_LENGTH

10

IcmpSendEcho: ICMP_INVALID_SEND_OPTIONS

11

IcmpSendEcho: ICMP_INVALID_TIMEOUT

12

IcmpSendEcho: ICMP_UNREACH_DESTINATION

13

IcmpSendEcho: ICMP_VALID_REQUEST

101

Icmp6SendEcho2: ICMP_INVALID_HANDLE

102

Icmp6SendEcho2: ICMP_NULL_ADDR

103

Icmp6SendEcho2: ICMP_NULL_SEND_BUFFER

104

Icmp6SendEcho2: ICMP_SEND_BUFFER_FRAG

105

Icmp6SendEcho2: ICMP_SEND_BUFFER_NO_FRAG

106

Icmp6SendEcho2: ICMP_SEND_BUFFER_TOO_SMALL

107

Icmp6SendEcho2: ICMP_INVALID_SEND_LEN

108

Icmp6SendEcho2: ICMP_NULL_REPLY_BUFFER

109

Icmp6SendEcho2: ICMP_INVALID_REPLY_LENGTH

110

Icmp6SendEcho2: ICMP_INVALID_SEND_OPTIONS

111

Icmp6SendEcho2: ICMP_INVALID_TIMEOUT

112

Icmp6SendEcho2: ICMP_UNREACH_DESTINATION

113

Icmp6SendEcho2: ICMP_VALID_REQUEST

201

IcmpSendEcho2: ICMP_INVALID_HANDLE

202

IcmpSendEcho2: ICMP_NULL_ADDR

203

IcmpSendEcho2: ICMP_NULL_SEND_BUFFER

204

IcmpSendEcho2: ICMP_SEND_BUFFER_FRAG

205

IcmpSendEcho2: ICMP_SEND_BUFFER_NO_FRAG

206

IcmpSendEcho2: ICMP_SEND_BUFFER_TOO_SMALL

207

IcmpSendEcho2: ICMP_INVALID_SEND_LEN

208

IcmpSendEcho2: ICMP_NULL_REPLY_BUFFER

209

IcmpSendEcho2: ICMP_INVALID_REPLY_LENGTH

210

IcmpSendEcho2: ICMP_INVALID_SEND_OPTIONS

211

IcmpSendEcho2: ICMP_INVALID_TIMEOUT

212

IcmpSendEcho2: ICMP_UNREACH_DESTINATION

213

IcmpSendEcho2: ICMP_VALID_REQUEST

301

IcmpParseReplies: ICMP_INVALID_BUFFER

302

IcmpParseReplies: ICMP_INVALID_LEN

303

IcmpParseReplies: ICMP_INVALID_PARAMS

401

Icmp6ParseReplies: ICMP_INVALID_BUFFER

402

Icmp6ParseReplies: ICMP_INVALID_LEN

403

Icmp6ParseReplies: ICMP_INVALID_PARAMS

Setting Up the Test

You will need to know the name or IP address of the machines that will be pinged during the test.

Running the Test

This test library can have one or more optional command line entries to change the behavior of the test. To specify one or more optional command line entries to the test library, you must use the -c command line option. This option forces Tux to pass the specified string into the test library.

For more information about how to edit the command line for a test, see Editing the Command-Line for a Test.

The default command line is tux -o -d IcmpAPITest.

The following table shows the optional command line parameters for the ICMP API Test.

Command line parameter

Description

-s <IPv4 machine name or IP address>

Specifies a different IP address or name of another machine to ping. The default value is: 127.0.0.1.

-s6 <IPv6 machine name or IP address>

Specifies a different IP address or name of another machine to ping. The default value is:1.

Verifying the Test

When the test completes running, verify that "PASS" appears in the test log for all sub-tests

Troubleshooting the Test

Some of the individual test scenarios within each test case of the ICMP API Test are expected to fail, but this result does not record a test failure. The ICMP API Test reports these as having passed if the test case fails appropriately. A ping that is expected to fail is regarded as passing the test only if the tested API returns the expected error code.

Note:

For all test cases, a network sniffer or netmon is very helpful in troubleshooting. Always begin troubleshooting by confirming that the machine being pinged by the test cases is in fact accessible. This can be done by manually pinging the machine using ping -4 machine_name or ping -6 machine_name, where machine_name is the name of the machine being pinged.

The following table shows troubleshooting tips for the ICMP API Test.

Item Solution

The pings are blocked and the test cases are failing

If you have a firewall enabled in your configuration, the pings will be blocked and the test cases will fail.

The pings are blocked and the test cases are failing

See Also

Other Resources

Networking - Ethernet Tests