Debian Codegraph @

/

debian golang-github-kotakanbe-go-pingscanner 0.1.0+git20160420.1.58e188a-3.1debian golang-github-kotakanbe-go-pingscanner-dev debiangogoinimakefilemarkdownshellyaml 14 files · 42 symbols
View dependency graph

Depends on

README (full)

pingscanner

Scanning alive hosts of the given CIDR range in parallel.

Usage

package main

import (
	"fmt"

	ps "github.com/kotakanbe/go-pingscanner"
)

func main() {
	scanner := ps.PingScanner{
		CIDR: "192.168.11.0/24",
		PingOptions: []string{
			"-c1",
			"-t1",
		},
		NumOfConcurrency: 100,
	}
	if aliveIPs, err := scanner.Scan(); err != nil {
		fmt.Println(err)
	} else {
		if len(aliveIPs) < 1 {
			fmt.Println("no alive hosts")
		}
		for _, ip := range aliveIPs {
			fmt.Println(ip)
		}
	}
}

Author

kotakanbe

License

Please see LICENSE.

dir debian/
dir example/
file CHANGELOG.md
file LICENSE
file README.md
file pingscanner.go
file version.go