Documentation
¶
Index ¶
- type PerformOption
- func WithFirstTTL(firstTTL int) PerformOption
- func WithInterface(iface string) PerformOption
- func WithMaxTTL(maxTTL int) PerformOption
- func WithNetwork(network string) PerformOption
- func WithPacketSize(packetSize int) PerformOption
- func WithQueries(queries int) PerformOption
- func WithTOS(tos int) PerformOption
- func WithTimeout(timeout time.Duration) PerformOption
- type Tracer
- type TracerouteHop
- type TracerouteResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PerformOption ¶
type PerformOption func(options *performOptions)
func WithFirstTTL ¶
func WithFirstTTL(firstTTL int) PerformOption
func WithInterface ¶
func WithInterface(iface string) PerformOption
func WithMaxTTL ¶
func WithMaxTTL(maxTTL int) PerformOption
func WithNetwork ¶
func WithNetwork(network string) PerformOption
func WithPacketSize ¶
func WithPacketSize(packetSize int) PerformOption
func WithQueries ¶
func WithQueries(queries int) PerformOption
func WithTOS ¶
func WithTOS(tos int) PerformOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) PerformOption
type Tracer ¶
type Tracer interface { ListenConn(options *performOptions) (net.PacketConn, error) SendConn(options *performOptions) (net.PacketConn, error) SetTTLAndTOS(ttl, tos int) EchoPacket(id, seq uint16, packetSize int) ([]byte, error) CheckEchoReply(byte []byte, id, seq uint16) bool }
func NewIPTracer ¶
type TracerouteHop ¶
type TracerouteResult ¶
type TracerouteResult struct {
// contains filtered or unexported fields
}
func Traceroute ¶
func Traceroute(target *net.IPAddr, recvCh chan<- *TracerouteHop, option ...PerformOption) (result TracerouteResult, err error)
Click to show internal directories.
Click to hide internal directories.