Documentation ¶
Overview ¶
Package core provides command line parsing & DNS lookup conveniences.
Package core provides utilities
Index ¶
- Variables
- func GetCNAME(h string) string
- func NewEcho(payload string, seq int) icmp.Message
- func ParseAddr(input string) *net.IPAddr
- func ParseOption(options []string) (bool, bool, uint64, *net.IPAddr, string, string, error)
- func ScanInterfaces() (map[string]net.IP, error)
- func TryConvertPunycode(domain string) string
- type Arg
- type Cache
- type Counter
Constants ¶
This section is empty.
Variables ¶
var ErrBadCount = errors.New("bad number of packets to transmit")
ErrBadCount signifies that count packets must be greater than or equal to 1.
var ErrMissingPeer = errors.New("peer argument is nil")
ErrMissingPeer means the client provided nil as a peer argument.
var ErrNoTarget = errors.New("Missing target")
ErrNoTarget means the target was not supplied
var ErrPeerNotResolving = errors.New("peer not resolving")
ErrPeerNotResolving means no reverse IP for the peer was found.
var ErrUnknownHost = errors.New("Name or service not known")
ErrUnknownHost means we cannot parse the IP address or the FQDN that was provided.
var Usage = `` /* 325-byte string literal not displayed */
Usage is the help blurb
Functions ¶
func ParseOption ¶
ParseOption parses command line arguments
func ScanInterfaces ¶
ScanInterfaces returns a map from the interface name to an IPv4 address
func TryConvertPunycode ¶
TryConvertPunycode attempts to convert the domain if it is punycode encoded
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache saves the last reverse ip lookup.
type Counter ¶
type Counter struct { Sent uint64 Recvd uint64 Loss uint32 Err bool Errors uint64 // contains filtered or unexported fields }
Counter keeps track of messages sent & received
func (*Counter) NeedStatistics ¶
NeedStatistics informs the caller if more statistics can be printed.
func (*Counter) NoteAnError ¶
func (c *Counter) NoteAnError()
func (*Counter) OnReception ¶
func (c *Counter) OnReception()
OnReception remembers how many ICMP Echo Reply was received.