pkg / taptun

Control TUN/TAP virtual network interfaces.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

taptun

import "github.com/pkg/taptun"

Package taptun provides an interface to the user level network TAP / TUN device.

a href="https://www.kernel.org/doc/Documentation/networking/tuntap.txt">https://www.kernel.org/doc/Documentation/networking/tuntap.txt

type Tap

type Tap struct {
    io.ReadWriteCloser
    // contains filtered or unexported fields
}

Tap represents a TAP Virtual Ethernet network device.

func OpenTap

func OpenTap() (*Tap, error)

OpenTap creates a tapN interface and returns a *Tap device connected to the t pinterface.

func (*Tap) String

func (t *Tap) String() string

type Tun

type Tun struct {
    io.ReadWriteCloser
    // contains filtered or unexported fields
}

Tun represents a TUN Virtual Point-to-Point network device.

func OpenTun

func OpenTun() (*Tun, error)

OpenTun creates a tunN interface and returns a *Tun device connected to the tun interface.

func (*Tun) String

func (t *Tun) String() string

Generated by godoc2md

About

Control TUN/TAP virtual network interfaces.

License:MIT License


Languages

Language:Go 87.0%Language:C 13.0%