pingo

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

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

Go to latest
Published: Aug 22, 2018 License: MIT Imports: 8 Imported by: 0

README

pingo

This is a naive implementation of the ping command using Go's x/net/icmp package. This is a learning/experimentation exercise.

Stranger Pings

Image credits: https://twitter.com/alicegoldfuss/status/923947130074439680

Building

A make build should build a binary called pingo.

Running

A make run should build and run the program. Currently, these are the parameters you can change when running pingo:

Usage: ./pingo host
  -c uint
        number of packets to be sent and received; if not specified, ./pingo will send requests until interrupted
  -s uint
        number of data bytes to be sent in each request (default 56)
  -t uint
        timeout in seconds for each request (default 1)

Note: You need sudo privileges in order to send ping requests, so make run uses sudo for running the binary that is built.

Acknowledgements

I've used go-fastping a lot as a reference while trying to understand how to implement ping, and a few fuctions were directly copied from it (see comments in the code) and adapted for use with my own implementation.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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