Use `createTun`

This commit is contained in:
Tristan B. Velloza Kildaire 2021-07-18 18:54:34 +02:00
parent 71630e4af5
commit e7044563dd
1 changed files with 2 additions and 2 deletions

View File

@ -21,9 +21,9 @@ public class TUNAdapter
private void init() private void init()
{ {
int tunFD = open(cast(char*)"/dev/net/tun", _F_RDWR); int tunFD = createTun(cast(char*)"", 1);
writeln(tunFD); writeln(tunFD);
writeln(createTun(cast(char*)"", 1)); writeln();
writeln(destroyTun(1)); writeln(destroyTun(1));
ioctl(0,0,cast(void*)0); ioctl(0,0,cast(void*)0);
} }