physical

package
v0.0.0-...-e4d881b Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(ifindex InternalIndex, data []byte) (n int, err error)

Write allows blocking writes to any given interface

Types

type InternalIndex

type InternalIndex int

An InternalIndex allows simpler referencing to physical and virtual network interfaces. They are similar to Linux's ifindex

const (
	LoopbackInternalIndex InternalIndex = 1
	ExternalInternalIndex InternalIndex = 2
)

InternalIndexes are hardcoded

func Read

func Read() ([]byte, InternalIndex, error)

Read allows blocking reads from any given interface

Jump to

Keyboard shortcuts

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