fwdptest

package
v0.0.0-...-1e60831 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: NIST-PD-fallback Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fixture

type Fixture struct {
	StepUnit time.Duration

	DataPlane *fwdp.DataPlane
	Ndt       *ndt.Ndt
	Fib       *fib.Fib
	// contains filtered or unexported fields
}

Fixture is a test fixture for forwarder data plane.

func NewFixture

func NewFixture(t testing.TB, modifyConfig ...func(cfg *fwdp.Config)) (f *Fixture)

NewFixture creates a Fixture.

func (*Fixture) ReadFibCounters

func (f *Fixture) ReadFibCounters(name string) (cnt fibdef.EntryCounters)

ReadFibCounters returns counters of specified FIB entry.

func (*Fixture) SetFibEntry

func (f *Fixture) SetFibEntry(name string, strategy string, nexthops ...iface.ID)

SetFibEntry inserts or replaces a FIB entry.

func (*Fixture) SetFibEntryParams

func (f *Fixture) SetFibEntryParams(name string, strategy string, params map[string]any, nexthops ...iface.ID)

SetFibEntryParams inserts or replaces a FIB entry with SgInit params.

func (*Fixture) StepDelay

func (f *Fixture) StepDelay()

StepDelay delays a small amount of time for packet forwarding.

func (*Fixture) SumCounter

func (f *Fixture) SumCounter(getCounter func(fwd *fwdp.Fwd) uint64) (n uint64)

SumCounter reads a counter from all FwFwds and computes the sum.

Jump to

Keyboard shortcuts

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