Added WIP, removed old thing

This commit is contained in:
Tristan B. Velloza Kildaire 2021-08-18 14:11:34 +02:00
parent 0a2c37be13
commit a645ac0e12
1 changed files with 8 additions and 7 deletions

View File

@ -108,15 +108,16 @@ public class TUNAdapter
tunWrite(tunFD, cast(char*)buffer.ptr, cast(int)buffer.length);
}
public void close()
{
int status = destroyTun(tunFD);
if(status)
{
throw new TUNException("Closing tun interface failed");
}
public void setDeviceMTU(ushort mtu)
{
/* TODO: Set the MTU on the device */
/* TODO: Set the scratchpad to match the MTU */
scratch.length = mtu;
}
}
public final class TUNException : Exception