fibtestenv

package
v0.0.0-...-6c4fd92 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: NIST-PD-fallback Imports: 6 Imported by: 0

Documentation

Overview

Package fibtestenv provides utilities for FIB unit tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DummyStrategy

func DummyStrategy() *strategycode.Strategy

DummyStrategy returns an empty strategy.

func MakeEntry

func MakeEntry(name, sc any, nexthops ...iface.ID) (entry fibdef.Entry)

MakeEntry builds a fibdef.Entry.

name: ndn.Name or string
sc: int or *strategycode.Strategy or nil

Types

type LookupThread

type LookupThread struct {
	Socket   eal.NumaSocket
	Replica  unsafe.Pointer
	DynIndex int
}

LookupThread is a trivial implementation of fib.LookupThread interface.

func (*LookupThread) GetFib

func (th *LookupThread) GetFib() (replica unsafe.Pointer, dynIndex int)

GetFib returns saved arguments.

func (*LookupThread) GetFibSgGlobal

func (th *LookupThread) GetFibSgGlobal() unsafe.Pointer

GetFibSgGlobal returns nil. This may not work with strategy with SgInit function.

func (*LookupThread) NumaSocket

func (th *LookupThread) NumaSocket() eal.NumaSocket

NumaSocket returns th.Socket.

func (*LookupThread) SetFib

func (th *LookupThread) SetFib(replica unsafe.Pointer, dynIndex int)

SetFib saves arguments to instance.

Jump to

Keyboard shortcuts

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