dispatch

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FWDispatch []FWThread

FWDispatch is used to allow faces to interact with forwarding without a circular dependency issue.

View Source
var FaceDispatch sync.Map

FaceDispatch is used to allow forwarding to interact with faces without a circular dependency issue.

Functions

func AddFace

func AddFace(id uint64, face Face)

AddFace adds the specified face to the dispatch list.

func InitializeFWThreads

func InitializeFWThreads(faces []FWThread)

InitializeFWThreads sets up the forwarding thread dispatch slice.

func RemoveFace

func RemoveFace(id uint64)

RemoveFace removes the specified face from the dispatch map.

Types

type FWThread

type FWThread interface {
	String() string

	QueueData(packet *defn.Pkt)
	QueueInterest(packet *defn.Pkt)

	GetNumPitEntries() int
	GetNumCsEntries() int
}

FWThread provides an interface that forwarding threads can satisfy (to avoid circular dependency between faces and forwarding)

func GetFWThread

func GetFWThread(id int) FWThread

GetFWThread returns the specified forwarding thread or nil if it does not exist.

type Face

type Face interface {
	String() string
	SetFaceID(faceID uint64)

	FaceID() uint64
	LocalURI() *defn.URI
	RemoteURI() *defn.URI
	Scope() defn.Scope
	LinkType() defn.LinkType
	MTU() int

	State() defn.State

	SendPacket(out OutPkt)
}

Face provides an interface that faces can satisfy (to avoid circular dependency between faces and forwarding)

func GetFace

func GetFace(id uint64) Face

GetFace returns the specified face or nil if it does not exist.

type OutPkt

type OutPkt struct {
	Pkt      *defn.Pkt
	PitToken []byte
	InFace   *uint64
}

Jump to

Keyboard shortcuts

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