CodeGuru
Earthweb Search
Forums Wireless Jars Gamelan Developer.com
CodeGuru Navigation
Member Sign In
User ID:
Password:
Remember Me:
Forgot Password?
Not a member?
Click here for more information and to register.

jobs.internet.com

internet.commerce
Partners & Affiliates
Phone Cards
Promotional Products
Prepaid Phone Card
Computer Hardware
KVM Switch over IP
GPS Devices
Find Software
KVM Switches
Memory Upgrades
Promotional Golf
Disney World Tickets
Online Education
Best Price
Auto Insurance Quote


RSS Feeds

RSSAll

RSSVC++/C++

RSS.NET/C#

RSSVB

See more EarthWeb Network feeds

Home >> Visual C++ / C++ >> Windows Programming >> CE >> Networking

Best Practices for Developing a Web Site: Checklists, Tips, Strategies & More. Download Exclusive eBook Now.

Ping Utility for Windows CE
Rating: none

Arkady Frankel (view profile)
November 21, 2000


(continued)



Download these IBM resources today!
e-Kit: IBM Rational Systems Development Solution
With systems teams under so much pressure to develop products faster, reduce production costs, and react to changing business needs quickly, communication and collaboration seem to get lost. Now, theres a way to improve product quality and communication.

Webcast: Asset Reuse Strategies for Success--Innovate Don't Duplicate!
Searching for, identifying, updating, using and deploying software assets can be a difficult challenge.

eKit: Rational Build Forge Express
Access valuable resources to help you increase staff productivity, compress development cycles and deliver better software, fast.

Download: IBM Data Studio v1.1
Effectively design, develop, deploy and manage your data, databases, and database applications throughout the data management life.

eKit: Rational Asset Manager
Learn how to do more with your reusable assets, learn how Rational Asset Manager tracks and audits your assets in order to utilize them for reuse.

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

Tools:
Add www.codeguru.com to your favorites
Add www.codeguru.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

Learn about expanding business opportunities for the reseller channel. Visit IT Channel Planet.
Best Practices for Developing a Web Site. Checklists, Tips & Strategies. Download Exclusive eBook Now.
Five Trends for Application Development & Program Management. Download Complimentary Report Now.
Data Sheet: IBM Information Server Blade
Developing Intelligent Communications? Visit the Avaya DevConnect Center on DevX.


RATE THIS ARTICLE:   Excellent  Very Good  Average  Below Average  Poor  

(You must be signed in to rank an article. Not a member? Click here to register)

Latest Comments:
anyone find missing resource files - cbaker6789 (08/21/2004)
Ping - Legacy CodeGuru (01/29/2004)
missing files - Legacy CodeGuru (01/16/2004)
I need the full project... - Legacy CodeGuru (12/15/2003)
where can I get the eVC++3.0 working code? - Legacy CodeGuru (12/01/2003)

View All Comments
Add a Comment:
Title:
Comment:
Pre-Formatted: Check this if you want the text to display with the formatting as typed (good for source code)



(You must be signed in to comment on an article. Not a member? Click here to register)


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES