cloudflareinternshipapplication

command module
v0.0.0-...-e840655 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

README

Cloudflare Internship Application: Ping Application

This is a simple application built in Go designed to ping a host via ICMP. This program supports both IPv4 and IPv6. It has options for Time To Live and the interval between sending packets.

The original prompt can be found here: https://github.com/cloudflare-internship-2020/internship-application-systems

Usage

Make sure to have needed dependencies installed ( net from the Golang supplemental libraries):

go get

To build: go build ping.go

To run: sudo ./ping.go <options> [hostname or ip address]

Must be run by super user due to raw socket connection required for ICMP.

After exiting, the application will display number of packets sent, number of packets recived, the calculated packet loss and the total time taken.

Command Line Options

  • -interval integer
    • Set interval between ping requests in seconds (default 1)
  • -ttl integer
    • Set TTL of ping requests (default 64)

Note that options must go before the target to be pinged

Examples

sudo ./ping cloudflare.com
sudo ./ping -interval 5 1.1.1.1 for 5 seconds between requests
sudo ./ping -ttl 6 2606:4700:4700::1111 for a packet TTL value of 6

Documentation

Overview

Written by Ethan Hampton <ethohampton@gmail.com>, April 2020 as a part of my Cloudflare Internship Application

*The original prompt can be seen at https://github.com/cloudflare-internship-2020/internship-application-systems

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL