wgint

package
v1.76.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: BSD-3-Clause Imports: 5 Imported by: 3

Documentation

Overview

Package wgint provides somewhat shady access to wireguard-go internals that don't (yet) have public APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peer added in v1.62.0

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

Peer is a wrapper around a wireguard-go device.Peer pointer.

func PeerOf added in v1.62.0

func PeerOf(p *device.Peer) Peer

PeerOf returns a Peer wrapper around a wireguard-go device.Peer.

func (Peer) HandshakeAttempts added in v1.62.0

func (p Peer) HandshakeAttempts() uint32

HandshakeAttempts returns the number of failed WireGuard handshake attempts made for the current handshake. It resets to zero before every new handshake and after a successful handshake.

func (Peer) IsValid added in v1.62.0

func (p Peer) IsValid() bool

func (Peer) LastHandshake added in v1.62.0

func (p Peer) LastHandshake() time.Time

LastHandshake returns the last handshake time.

If the handshake has never happened, it returns the zero value.

func (Peer) RxBytes added in v1.62.0

func (p Peer) RxBytes() uint64

RxBytes returns the number of bytes received from this peer.

func (Peer) TxBytes added in v1.62.0

func (p Peer) TxBytes() uint64

TxBytes returns the number of bytes sent to this peer.

Jump to

Keyboard shortcuts

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