Documentation ¶
Index ¶
Constants ¶
View Source
const (
ProtocolICMP = 1
)
Some constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ping ¶ added in v1.1.1
type Ping struct { Type PingResultType Latency time.Duration Error error Host string }
Ping contains the results for ping on a single host
type PingResult ¶ added in v1.1.1
type PingResult struct {
Hosts []Ping
}
PingResult contains the results for the Ping request
func PingHosts ¶ added in v1.1.1
func PingHosts(addresses []string) (*PingResult, error)
PingHosts pings the addresses given and returns the latencies of each host If the address returns an error, that address is marked as unusable.
func (*PingResult) GetFastestHost ¶ added in v1.1.1
func (p *PingResult) GetFastestHost() (Ping, error)
GetFastestHost gets the fastest host from the ping responses
type PingResultType ¶ added in v1.1.1
type PingResultType int
PingResultType contains the type of result for ping request on an address
const ( HostInactive PingResultType = iota HostActive )
Type of ping responses
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner is a scanner that scans for ports using SYN packets.
func NewScanner ¶
NewScanner creates a new full port scanner that scans all ports using SYN packets.
func (*Scanner) ConnectVerify ¶
ConnectVerify is used to verify if ports are accurate using a connect request
Click to show internal directories.
Click to hide internal directories.