Documentation
¶
Overview ¶
Package icmp provides icmp enhanced methods based on the golang icmp package
Index ¶
- Constants
- func Avg(x, y float64) float64
- func IsIPv4(ip net.IP) bool
- func IsIPv6(ip net.IP) bool
- func Max(x, y float64) float64
- func Min(x, y float64) float64
- func NormalizeDuration(d string) string
- type HopResp
- type MHopResp
- type Ping
- type Response
- type Trace
- func (i *Trace) Bind()
- func (i *Trace) Done()
- func (i *Trace) NextHop(fd, hop int) HopResp
- func (i *Trace) PrintPretty()
- func (i *Trace) Recv(fd int) (int, int, string)
- func (i *Trace) Run(retry int) chan []HopResp
- func (i *Trace) Send() error
- func (i *Trace) SetDeadLine() error
- func (i *Trace) SetReadDeadLine() error
- func (i *Trace) SetTTL(ttl int)
- func (i *Trace) SetWriteDeadLine() error
- type Whois
Constants ¶
View Source
const ( ProtocolIPv4ICMP = 1 // IANA ICMP for IPv4 ProtocolIPv6ICMP = 58 // IANA ICMP for IPv6 )
IANA ICMP
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HopResp ¶ added in v0.2.2
type HopResp struct {
// contains filtered or unexported fields
}
HopResp represents hop's response
type Ping ¶
Ping represents ping request
func (*Ping) PrintPretty ¶ added in v0.2.2
func (p *Ping) PrintPretty()
PrintPretty prints out the result pretty format
func (*Ping) Run ¶ added in v0.1.9
Run loops the ping and print it out
type Response ¶ added in v0.1.9
Response represent ping response
type Trace ¶
type Trace struct {
// contains filtered or unexported fields
}
Trace represents trace properties
func NewTrace ¶ added in v0.2.2
NewTrace creates new trace object
func (*Trace) NextHop ¶ added in v0.2.2
NextHop pings the specific hop by set TTL
func (*Trace) PrintPretty ¶ added in v0.2.2
func (i *Trace) PrintPretty()
PrintPretty prints out trace result
func (*Trace) Recv ¶
Recv gets the replied icmp packet
func (*Trace) Run ¶
Run provides trace based on the other methods
func (*Trace) SetDeadLine ¶ added in v0.2.2
SetDeadLine sets tx/rx timeout
func (*Trace) SetReadDeadLine ¶ added in v0.2.2
SetReadDeadLine sets rx timeout
type Whois ¶ added in v0.2.2
type Whois struct {
// contains filtered or unexported fields
}
Whois represents prefix info from RIPE
Click to show internal directories.
Click to hide internal directories.