Documentation
¶
Overview ¶
Package water is a simple TUN/TAP interface library that efficiently works with standard packages like io, bufio, etc.. Use waterutil with it to work with TUN/TAP packets/frames.
Index ¶
Constants ¶
View Source
const ( TUN TAP )
TUN and TAP device types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// DeviceType specifies whether the device is a TUN or TAP interface. A
// zero-value is treated as TUN.
DeviceType DeviceType
// PlatformSpecificParams defines parameters that differ on different
// platforms. See comments for the type for more details.
PlatformSpecificParams
}
Config defines parameters required to create a TUN/TAP interface. It's only used when the device is initialized. A zero-value Config is a valid configuration.
type Interface ¶
type Interface struct {
io.ReadWriteCloser
// contains filtered or unexported fields
}
Interface is a TUN/TAP interface.
MultiQueue(Linux kernel > 3.8): With MultiQueue enabled, user should hold multiple interfaces to send/receive packet in parallel. Kernel document about MultiQueue: https://www.kernel.org/doc/Documentation/networking/tuntap.txt
Click to show internal directories.
Click to hide internal directories.