implement minimal NIF to create and read from a TUN device
This commit is contained in:
parent
72a4f2ff8f
commit
7b4d355d1a
12 changed files with 963 additions and 1 deletions
8
lib/p2p_chat/transport/tuntapport.ex
Normal file
8
lib/p2p_chat/transport/tuntapport.ex
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
defmodule P2pChat.Transport.TunTapPort do
|
||||
use Rustler, otp_app: :p2p_chat, crate: "p2pchat_transport_tuntapport"
|
||||
|
||||
def make_tun_device(), do: :erlang.nif_error(:nif_not_loaded)
|
||||
|
||||
def read(_handle, _length \\ 2**16), do: :erlang.nif_error(:nif_not_loaded)
|
||||
end
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue