cmn

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInterval = 1 * time.Second
	DefaultTimeout  = 2 * time.Second
	MaxEchoes       = 1 << 16
)

Variables

View Source
var (
	// Flag vars
	Count       uint
	Interactive bool
	Interval    time.Duration
	Timeout     time.Duration
	Local       snet.Addr
	Remote      snet.Addr
	Bind        snet.Addr
)
View Source
var (
	Conn      *reliable.Conn
	Mtu       uint16
	PathEntry *sciond.PathReplyEntry
	Stats     *ScmpStats
	Start     time.Time
)

Functions

func Fatal

func Fatal(msg string, a ...interface{})

func NewSCMPPkt

func NewSCMPPkt(t scmp.Type, info scmp.Info, ext common.Extension) *spkt.ScnPkt

func NextHopAddr

func NextHopAddr() net.Addr

func ParseFlags

func ParseFlags(version *bool) string

func Rand

func Rand() uint64

func SetupSignals

func SetupSignals(f func())

func UpdatePktTS

func UpdatePktTS(pkt *spkt.ScnPkt, ts time.Time)

func Validate added in v0.4.0

func Validate(pkt *spkt.ScnPkt) (*scmp.Hdr, *scmp.Payload, error)

func ValidateFlags

func ValidateFlags()

Types

type ScmpStats

type ScmpStats struct {
	// sent is the number of sent packets
	Sent uint
	// recv is the number of received packets
	Recv uint
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL