Skip to content

shvms/pingo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ping implementation in Go

Installation

  • git clone https://github.com/shvms/pingo.git
  • cd pingo
  • go build
  • sudo ./pingo google.com

Requirements

  • Reports RTT and loss percentage for sent messages.
  • Allows to set custom TTL as -ttl=<value> argument and displays corresponding 'Time/TTL Exceeded' message.
  • Extra features include arguments:
    • count for sending & receiving fixed number of packets
    • interval for sending ping requests at a custom interval
    • timeout for waiting a certain time period for a ping reply before sending new one.
    • packetsize for sending ICMP packets of required size (in bytes).
  • Supports both IPv4 & IPv6.
  • Note: Currently, pingo does not support non-root access. For that a UDP message with a random number as ID needs to be sent. non-privileged mode will be added later.

Usage

sudo ./pingo [-c=count] [-i=interval] [-t=timeout] [-ttl=TTL] [-s=packetsize] [-6] host
Example: sudo ./pingo -c=7 -i=1200 google.com

count: Unsigned integer. 0 represents infinite ping.
interval: Unsigned Integer. Interval between each ICMP Echo request (in ms). Defaults to 1000ms.
timeout: Unsigned Integer. Timeout to wait for response from the host (in ms). Defaults to 1000ms.
packetsize: Unsigned Integer. Packet size, in bytes, to ping with. Defaults to 32 bytes.
ttl: Integer. Time-to-live of the ICMP packets sent. Defaults to 64.
6: Use IPv6.

About

Ping implementation in Go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages