Ping Utility for Windows CE

Environment: Windows CE 2.11+, Windows 2000, Windows NT, Visual C++ 6

Unfortunately, the HPC/PPC devices (running Windows CE) lack a ping utility. Therefore, because the HPC PRO SDK (version 2.11+) does have a subset of the ICMP functions, I was able to write my CEPing utility which can be helpful for checking the connection of CE devices to other friends ( CE devices or bigger machines ) on a TCP/IP network. In the case of lack of such utility it is possible to check if CE device is in the net by standard ping utility from some 'big'( PC ) computer. I didn't produce ceping for emulation mode because of the absence of ICMP functions for emulation mode.

In CEPing, I defined only a subset of the standard ping.exe parameters for simplicity. However, it would trivial to add any omitted functionality as I'e included the complete source code here. By default, CEPing functions like the standard ping utility with -a switch specified (it tries to resolve addresses to peer computers). But, obviously, that's not always possible. Therefore, there are time when you can't see the names of peer computers on the line under IP/Name editbox. Basically, it all depends on how you have WINS defined in the network properties Control Panel applet.

The problem is that without a WINS server definition, the gethostbyname() and gethostbyaddress() functions will return NULL. Therefore, in this case, it is only possible to check the IP address of peers and not resolve the name. The result of typing correct peer name in this case is "Wrong Name" answer on ping operation.

I checked the HPC (Jornada 680) with my PC with LP-E ethernet card and Xircom card. By default, Xircom installed my PC IP as a WINS server. Here is a table which describes the behavour of the gethostbyname() and gethostbyaddress() functions in different environment (based on the definition of the WINS settings).

V = resolution exist
X = no resolution

                    No WINS server  |     WINS defined      |  Wins defined as host PC
                       defined      |  host PC | others PC  |    host PC | others PC
gethostbyname()          X          |     V          V      |       V          X
gethostbyaddress()       X          |     V          X      |       V          X

As you can see from the figure above, the results of the ping are displayed in combo box and each string contains the number of connection attempts as well as the RTT (Round Trip Timetime)

Downloads

Download project - 29 Kb
Download zipped sh3 exe - 6 Kb
Download zipped mips exe - 6 Kb
Download zipped arm exe - 6 Kb