mirror of https://github.com/deavmi/libtun.git
Added WIP, removed old thing
This commit is contained in:
parent
0a2c37be13
commit
a645ac0e12
|
@ -108,15 +108,16 @@ public class TUNAdapter
|
||||||
tunWrite(tunFD, cast(char*)buffer.ptr, cast(int)buffer.length);
|
tunWrite(tunFD, cast(char*)buffer.ptr, cast(int)buffer.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close()
|
|
||||||
{
|
|
||||||
int status = destroyTun(tunFD);
|
|
||||||
|
|
||||||
if(status)
|
public void setDeviceMTU(ushort mtu)
|
||||||
{
|
{
|
||||||
throw new TUNException("Closing tun interface failed");
|
/* TODO: Set the MTU on the device */
|
||||||
}
|
|
||||||
|
/* TODO: Set the scratchpad to match the MTU */
|
||||||
|
scratch.length = mtu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class TUNException : Exception
|
public final class TUNException : Exception
|
||||||
|
|
Loading…
Reference in New Issue