router

package
v0.0.0-...-50c09e2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package router provides network routing capabilities for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

Router provides routing capabilities.

func New

func New() *Router

New creates a new *Router.

func (*Router) AddFilter

func (r *Router) AddFilter(pf packet.Filter)

AddFilter adds a packet filter to the router.

func (*Router) Attach

func (r *Router) Attach(dev packet.NetworkDevice)

Attach attaches a packet.NetworkDevice to the *Router reading packets from the router and setting up routes for all the device addresses to correctly forward packets back to the device.

Jump to

Keyboard shortcuts

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