package
Version:
v0.0.0-...-994898c
Opens a new window with list of versions in this module.
Published: Jul 6, 2017
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package tuntap provides access to TUN/TAP device.
TUN and TAP represent the two device types.
An Addr represents an IP address and its associated routing prefix.
ParseCIDR parses s as a CIDR notation IP address and prefix length.
Network returns the network name, "ip+net".
String returns the CIDR notation of the address.
Device represents a TUN/TAP device.
New creates a new TUN/TAP device.
NewTAP creates a new TAP device.
NewTUN creates a new TUN device.
AddAddr adds the specified IP address to the interface.
Addrs returns all IPv4 and IPv6 addresses assigned to the interface.
Attrs returns the link attributes.
DelAddr removes the specified IP address from the interface.
Down changes the state of the interface to DOWN.
SetMTU sets the maximum transmission unit of the device.
Up changes the state of the interface to UP.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.