Skip to content

A simple ping utility to discover if a host is reachable

License

Notifications You must be signed in to change notification settings

wendelb/MiniPing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini Ping

A simple utility to check if a host is reachable on the network.

Motivation

Trying to discover if a host is available on the local network can be tricky if you want to use the ping utility that is shipped with windows. If you try to ping a host on the local network, the exit code will always be 0 (Success), regardless of the hosts existance. Parsing the output can become a real hassle if you have to support multiple languages since the output depends on the locale settings.

This small utility will tell you via exit code if a host is really reachable or not.

Usage

$ MiniPing.exe

MiniPing - A minimal ping program

ExitCodes:
  0: Host is reachable
  1: Host is not reachable
  2: An exception occured

To ping a host, add the hostname or IP Address:

$ MiniPing.exe 127.0.0.1
Received Response in 0 ms

Acknowledgements

This work is more or less inspired by two code snippets I found on the internet:

I didn't use them, because their use case was much too heavy for the application or the used api is deprecated.

TODOs

Maybe: Adding a customizable timeout

Contributing

If you want to contribute, please don't hesitate to open a pull request. If you have any questions, please ask them in a issue.

License

This project is licensed under the MIT License.

About

A simple ping utility to discover if a host is reachable

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages