fibreplica

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: 18 Imported by: 0

Documentation

Overview

Package fibreplica controls a FIB replica in C.Fib struct.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry C.FibEntry

Entry represents a FIB entry.

func (*Entry) AccCounters

func (entry *Entry) AccCounters(cnt *fibdef.EntryCounters, t *Table)

AccCounters adds to counters.

func (*Entry) FibSeqNum

func (entry *Entry) FibSeqNum() uint32

FibSeqNum returns the FIB insertion sequence number recorded in this entry.

func (*Entry) IsVirt

func (entry *Entry) IsVirt() bool

IsVirt determines whether this is a virtual entry.

func (*Entry) NexthopRtt

func (entry *Entry) NexthopRtt(dynIndex, nexthopIndex int) (sRtt, rttVar int64)

NexthopRtt reads RTT measurement of a nexthop. Return values are in TSC duration units.

func (*Entry) Ptr

func (entry *Entry) Ptr() unsafe.Pointer

Ptr returns *C.FibEntry pointer.

func (*Entry) Read

func (entry *Entry) Read() (de fibdef.Entry)

Read converts Entry to fibdef.Entry.

func (*Entry) Real

func (entry *Entry) Real() *Entry

Real returns the real entry linked from this entry.

type Table

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

Table represents a FIB replica.

func New

func New(cfg fibdef.Config, sgGlobals []unsafe.Pointer, socket eal.NumaSocket) (*Table, error)

New creates a Table.

func (*Table) Close

func (t *Table) Close() error

Close frees C memory.

func (*Table) DiscardUpdate

func (t *Table) DiscardUpdate(u *UpdateCommand)

DiscardUpdate releases resources in an unexecuted update.

func (*Table) ExecuteUpdate

func (t *Table) ExecuteUpdate(u *UpdateCommand)

ExecuteUpdate applies an update.

func (*Table) Get

func (t *Table) Get(name ndn.Name) *Entry

Get retrieves an entry.

func (*Table) Lpm

func (t *Table) Lpm(name ndn.Name) *Entry

Lpm performs longest prefix match.

func (*Table) PrepareUpdate

func (t *Table) PrepareUpdate(tu fibdef.Update) (*UpdateCommand, error)

PrepareUpdate prepares an update.

func (*Table) Ptr

func (t *Table) Ptr() unsafe.Pointer

Ptr returns *C.Fib pointer.

type UpdateCommand

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

UpdateCommand represents a prepared update command.

Jump to

Keyboard shortcuts

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