udp

package
v0.0.0-...-50244fc Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePacket

func DecodePacket(pkt []byte) myStruct

func EncodePacket

func EncodePacket(input myStruct, plen int) []byte

func MakeTimestamp

func MakeTimestamp() int64

func PrintStats

func PrintStats(addr string, stats *Stats, unit string)

TODO Generate this using the JSON libraries

func Sink

func Sink(ip string, port int, multi bool, verbose bool)

Statistics are encapulated in the Stats structure Handled in stats.go

func Source

func Source(ip string, port int, localip string, duration int, pps int, psize int, tos int, verbose bool)

Types

type Stats

type Stats struct {
	// contains filtered or unexported fields
}

func AddSample

func AddSample(stats *Stats, delay int, nsample int) *Stats

Jump to

Keyboard shortcuts

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