testing windows

This commit is contained in:
Pascal Fischer 2023-06-12 11:06:49 +02:00
parent 0b5594f145
commit d2fad1cfd9

View File

@ -11,15 +11,14 @@ import (
)
type Win32_IP4RouteTable struct {
Destination string
Mask string
NextHop string
InterfaceIdx int
Destination string
Mask string
NextHop string
}
func existsInRouteTable(prefix netip.Prefix) (bool, error) {
var routes []Win32_IP4RouteTable
query := "SELECT Destination, Mask, NextHop, InterfaceIndex FROM Win32_IP4RouteTable"
query := "SELECT Destination, Mask, NextHop FROM Win32_IP4RouteTable"
err := wmi.Query(query, &routes)
if err != nil {