device

package
v0.0.0-...-9d29f1b Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: BSD-3-Clause, MIT Imports: 9 Imported by: 0

README

This is a fork of golang.zx2c4.com/wireguard/device that only keeps the bare minimum data structures required for AllowedIPs. It is meant to be short lived until we replace it with our version of a routing table.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowedIPs

type AllowedIPs struct {
	IPv4 *trieEntry
	IPv6 *trieEntry
	// contains filtered or unexported fields
}

func (*AllowedIPs) EntriesForPeer

func (table *AllowedIPs) EntriesForPeer(peer *Peer, cb func(prefix netip.Prefix) bool)

func (*AllowedIPs) Insert

func (table *AllowedIPs) Insert(prefix netip.Prefix, peer *Peer)

func (*AllowedIPs) Lookup

func (table *AllowedIPs) Lookup(ip []byte) *Peer

func (*AllowedIPs) RemoveByPeer

func (table *AllowedIPs) RemoveByPeer(peer *Peer)

type Peer

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

func NewPeer

func NewPeer(k key.NodePublic) *Peer

func (*Peer) Key

func (p *Peer) Key() key.NodePublic

Jump to

Keyboard shortcuts

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