Update doc on privileged ping and install

This commit is contained in:
Cameron Sparr 2016-02-01 15:27:21 -07:00
parent 77403bd6ed
commit 3535a0e9a0
2 changed files with 19 additions and 2 deletions

View File

@ -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" it calls the "receive" callback. When it's finished, it calls the "finish"
callback. 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: ## Note on Linux Support:

View File

@ -11,7 +11,7 @@ import (
var usage = ` var usage = `
Usage: Usage:
ping [-c count] [-i interval] [-t timeout] host ping [-c count] [-i interval] [-t timeout] [--privileged] host
Examples: Examples:
@ -26,6 +26,9 @@ Examples:
# ping google for 10 seconds # ping google for 10 seconds
ping -t 10s www.google.com ping -t 10s www.google.com
# Send a privileged raw ICMP ping
sudo ping --privileged www.google.com
` `
func main() { func main() {