diff --git a/README.md b/README.md index 235baf6..08b5108 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,21 @@ It sends ICMP packet(s) and waits for a response. If it receives a response, it calls the "receive" callback. When it's finished, it calls the "finish" callback. -For a full ping example, see "cmd/ping/ping.go". +For a full ping example, see +[cmd/ping/ping.go"](https://github.com/sparrc/go-ping/blob/master/cmd/ping/ping.go) + +## Installation: + +``` +go get github.com/sparrc/go-ping +``` + +To install the native Go ping executable: + +```bash +go get github.com/sparrc/go-ping/... +$GOPATH/bin/ping +``` ## Note on Linux Support: diff --git a/cmd/ping/ping.go b/cmd/ping/ping.go index a26c044..77d6c23 100644 --- a/cmd/ping/ping.go +++ b/cmd/ping/ping.go @@ -11,7 +11,7 @@ import ( var usage = ` Usage: - ping [-c count] [-i interval] [-t timeout] host + ping [-c count] [-i interval] [-t timeout] [--privileged] host Examples: @@ -26,6 +26,9 @@ Examples: # ping google for 10 seconds ping -t 10s www.google.com + + # Send a privileged raw ICMP ping + sudo ping --privileged www.google.com ` func main() {