modulepackage
0.0.0-20240430184307-e7dfef0020a6
Repository: https://github.com/soypat/netif.git
Documentation: pkg.go.dev
# README
netif
Networking interfaces. For now I'm adding a TAP interface I can understand
Debugging with VSCode
To run with an ethernet interface you'll need to open VSCode as sudo with --no-sandbox
option:
sudo code --user-data-dir ~/.config/Code --no-sandbox .
You may need to install the Go extension and Delve as sudo since you are opening VSCode as a different user.
Creating a launch.json maps directly to using VSCode normally. Here's an example:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/examples/mqtt/",
}
]
}
# Functions
Default interface returns the default network interface over which traffic is routed.
NewEngine returns a networking engine that uses the given network interface controller.
No description provided by the author
OpenTap opens an existing TAP device by name.
# Constants
No description provided by the author
No description provided by the author
The device's network connection is now DOWN.
The device's network connection is now UP.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
Tap implements Unix TAP interface.
# Interfaces
Interface is the minimum interface that need be implemented by any network device driver and is based on [net.Interface].
InterfaceEthPoller is implemented by devices that send/receive ethernet packets.
Resolver is the interface for DNS resolution, as implemented by the `net` package.