https://github.com/lab11/go-tuntap
Use Tun/Tap devices with Go
https://github.com/lab11/go-tuntap
Last synced: about 1 year ago
JSON representation
Use Tun/Tap devices with Go
- Host: GitHub
- URL: https://github.com/lab11/go-tuntap
- Owner: lab11
- Created: 2013-10-22T20:36:10.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2018-09-10T22:24:40.000Z (almost 8 years ago)
- Last Synced: 2024-06-18T21:49:26.786Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 52
- Watchers: 11
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tun / Tap Bindings for Go
=========================
Install
-------
go get github.com/lab11/go-tuntap/tuntap
Usage
-----
import "github.com/lab11/go-tuntap/tuntap"
func main () {
var tund *tuntap.Interface
var err error
var inpkt *tuntap.Packet
tun_metahdr := false
tund, err = tuntap.Open("tun0", tuntap.DevTun, tun_metahdr)
inpkt, err = tund.ReadPacket()
}
Thanks
------
Thank you to @danderson for writing the original version at
http://code.google.com/p/tuntap/ .