wintun: expose version

This commit is contained in:
Jason A. Donenfeld
2019-10-08 09:58:58 +02:00
parent f2501aa6c8
commit 1f146a5e7a
2 changed files with 34 additions and 1 deletions

View File

@@ -244,6 +244,11 @@ func (tun *NativeTun) LUID() uint64 {
return tun.wt.LUID()
}
// Version returns the version of the Wintun driver and NDIS system currently loaded.
func (tun *NativeTun) Version() (driverVersion string, ndisVersion string, err error) {
return tun.wt.Version()
}
func (rate *rateJuggler) update(packetLen uint64) {
now := nanotime()
total := atomic.AddUint64(&rate.nextByteCount, packetLen)