Coder Social home page Coder Social logo

tuntap's Introduction

tuntap

Create TUN/TAP devices under Linux (And possibly others). If you want to know more about the intrinsics of TUN/TAP, read the kernel documentation over at https://www.kernel.org/doc/Documentation/networking/tuntap.txt

Important: This shard may only run on Linux x86_64. If you want to port this to another platform let me know!

Installation

Add this to your application's shard.yml:

dependencies:
  tuntap:
    github: Papierkorb/tuntap

Usage

require "tuntap"

Please see samples/ for example programs. Don't worry, they're documented :)

Contributing

  1. Fork it ( https://github.com/Papierkorb/tuntap/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • Papierkorb Stefan Merettig - creator, maintainer

tuntap's People

Contributors

papierkorb avatar skateman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

skateman emily

tuntap's Issues

Passing the address/netmask directly as integer/sockaddr_in

Would it be desired to have some extra overloads for the add_address and add_netmask methods?
It would be nice if I would be able just pass the sockaddr_in structure to them:

def add_address(address : LibC::SockaddrIn)
  ifr = ifreq
  ifr.ifr = LibC::IfReqData.new(addr: address)

  ioctl LibC::SIOCSIFADDR, ifr
end

def add_address(address : String)
  add_address(sockaddr(address))
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.