Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made work on latest nightly, added IPv4 support, changed some interfaces. #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

stuij
Copy link

@stuij stuij commented Mar 6, 2016

Hiya,

I wanted to use this library and discovered it needed some work to get it running on current Rust. So I fixed the issues, and as I used the lib, I made some modifications as well. Put them all in a big pull request, as it's a bit of a hassle to detangle some things. Tell me if this is a problem.

In no particular order:

  • Added IPv4 support: this means that when making a TunTap, we should specify if we want IPv4 or IPv6.
  • Interface functions take &str, instead of &CString.
  • add_address takes &str instead of &[u8].
  • added create_named_from_address, which brings up a tun/tap device and adds the address in one go, and tries to deduce if we want IPv4 or IPv6 based on the address we supply.
  • Indented code with 4-space style, as it seems to have become the default in Rust-land.

Let me know what you think :)

@Randati
Copy link
Owner

Randati commented Mar 10, 2016

Awesome! I'll take a look when I can.

@stuij
Copy link
Author

stuij commented Mar 16, 2016

Excellent :) hope you like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants