An open API service indexing awesome lists of open source software.

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

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/ .