• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rust's wrapper for creation of TUN/TAP devices

TunTap

Travis Build Status

TUN/TAP wrapper for Rust.

The TUN/TAP allows implementing a virtual network adapter in userspace. This provides the bindings for Rust.

Create an Iface object and send or recv packets. Making some sense of the packets is, however, out of scope, you need something else for that.

There's documentation and some examples.

Known issues

  • Tested only on Linux. Probably doesn't work anywhere else, but pull requests adding support for other OSes are welcome.
  • The asynchronous interface is very minimal and probably inefficient. It'll need to be extended to allow more flexible or efficient use.

Testing

In order to run the tests correctly, a tun10 device with 10.10.10.1/24 needs to be created first. You can simply run:

sh tests/setup.sh

To remove it:

sh tests/clean.sh

Sudo permission is required.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

More Repositories

1

signal-hook

Rust library allowing to register multiple handlers for the same signal
Rust
580
star
2

arc-swap

Support atomic operations on Arc itself
Rust
504
star
3

spirit

Rust
150
star
4

corona

Coroutine and async/await support for tokio-based futures
Rust
120
star
5

vorner.github.io

81
star
6

slipstream

Nudging the compiler to auto-vectorize things
Rust
55
star
7

contrie

Concurrent hash trie
Rust
50
star
8

pyo3-log

Logging bridge from pyo3 native extension to python
Rust
45
star
9

fastmatmult

Some experiments… and maybe a surprise coming.
Rust
28
star
10

bumpalo-herd

Trying to create Sync bump allocator
Rust
21
star
11

tokio-jsonrpc

Some experiments with JSON RPC in rust and tokio
Rust
15
star
12

bytes-utils

Additional utilities around the bytes crate
Rust
11
star
13

playlist_mgr

Playlist manager
Rust
11
star
14

tspam

Measuring a network link by creating new connections
Rust
10
star
15

tokio-serde-cbor

Tokio codec for serde-cbor
Rust
9
star
16

rust-presentations

Slides for various (public) presentations, mostly about Rust language, but others too
SCSS
9
star
17

reopen

Rust
7
star
18

pgz

Parallel gzip
Rust
6
star
19

squash

Saving space on slices and small strings
Rust
5
star
20

tracing-dipstick

(Experimental) bridge from tracing to dipstick, extracting metrics
Rust
4
star
21

structdoc

Rust
4
star
22

slog-retry

Slog drain that reconnects on errors
Rust
3
star
23

minimal-fixtures

Minimal test fixtures as proc-macro decorators (experimental)
Rust
3
star
24

adaptive-barrier

Similar to std::sync::Barrier, but automatically adjusts to the number of subscribers
Rust
3
star
25

bigbuffer

A buffer to balance commands in pipelines
Rust
2
star
26

numstream

Generates a stream of binary unsigned 64 numbers
Rust
2
star
27

thrust

Little peaceful spacecraft parking game
Rust
2
star
28

eveboros

EveBoros ‒ experiment with event loops in Rust (not production quality)
Rust
2
star
29

compile-commands-post

Manager of clang compilation database
Rust
1
star
30

jsonrpc-param-ord

Rust
1
star
31

rats

A toy game project
Rust
1
star
32

sls

A testing language server that does mostly nothing but sleeps
Rust
1
star
33

duprm

BTRFS deduplicator tailored for my own needs… some README will appear soon
Rust
1
star
34

just-get-it-done

A board game with corporate theme
1
star