summaryrefslogtreecommitdiffhomepage
path: root/src/tun.go
blob: 85735a657ebd1076fe85b1892febf9caf47dc511 (plain)
1
2
3
4
5
6
7
8
package main

type TUNDevice interface {
	Read([]byte) (int, error)  // read a packet from the device (without any additional headers)
	Write([]byte) (int, error) // writes a packet to the device (without any additional headers)
	MTU() (int, error)         // returns the MTU of the device
	Name() string              // returns the current name
}