generator

package
v0.0.0-...-8f60dbe Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bursty

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

Bursty traffic generator

func NewBursty

func NewBursty(p int, w int) *Bursty

NewBursty creates bursty traffic generator with load p and w packet burst size.

func (*Bursty) Generate

func (b *Bursty) Generate(sw *switches.Switch) int

Generate adds incomming packets into given switch buffers with on/off distribution and returns number of generated packets

type Generator

type Generator interface {
	// Generate adds incoming packets into given switch buffers
	// and returns number of generated packets
	Generate(sw *switches.Switch) int
}

Generator represents traffic generator algorithm

type Uniform

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

Uniform traffic generator

func NewUniform

func NewUniform(p int) *Uniform

NewUniform creates uniform traffic generator with load p.

func (*Uniform) Generate

func (u *Uniform) Generate(sw *switches.Switch) int

Generate adds incomming packets into given switch buffers with uniform distribution and returns number of generated packets

Jump to

Keyboard shortcuts

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