pkg / taptun Goto Github PK
View Code? Open in Web Editor NEWControl TUN/TAP virtual network interfaces.
License: MIT License
Control TUN/TAP virtual network interfaces.
License: MIT License
The documentation seems to disagree with the code with regards to the protocol information header on packets received from the kernel. ReadFrame suggests the the protocol information header is present "The buffer supplied must be large enough to hold the whole frame including a 4 byte header returned by the kernel.", though the interfaces are created with IFF_NO_PI, so the header is not present. Similarly the documentation claims to detect and report truncated packets via returning ErrTruncated but doesn't (and afaik isn't possible without looking at the protocol information header).
Hello! I'd like to add a patch to allow custom names for TAP/TUN devices created with this package. I already have it working on Linux, but I'm unsure if it's even possible on BSD.
Do you have any ideas, @ebfe ?
For the API, I was thinking something along the lines of: func NewTap(name string) (*Tap, error)
. The existing OpenTap()
function would just invoke NewTap("")
.
Would you accept a PR for this functionality, @davecheney ?
Thanks for your time.
EDIT: my initial work-in-progress commit is here: https://github.com/mdlayher/taptun/commit/fb1ed47abe90a671166ad22f60383705ed5daa69.
As of now, this code doesn't have any sort of license attached to it. I assume this was just an oversight, as there are licenses on other pkg
packages.
@davecheney , could you please add your preferred license to this repo? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.