code: def _read_routes_c_v1():
      
      def _extract_ip(obj):
          return inet_ntop(socket.AF_INET, struct.pack("<I", obj))
      routes = []
      for route in GetIpForwardTable():
          ifIndex = route['ForwardIfIndex']
          dest = route['ForwardDest']
          netmask = route['ForwardMask']
          nexthop = _extract_ip(route['ForwardNextHop'])
          metric = route['ForwardMetric1']
          # Build route
          try:
              iface = dev_from_index(ifIndex)
              if iface.ip == "0.0.0.0":
                  continue
          except ValueError:
              continue
          ip = iface.ip
          # RouteMetric + InterfaceMetric
          metric = metric + iface.ipv4_metric
          routes.append((dest, netmask, nexthop, iface, ip, metric))
      return routes
docs: Retrieve Windows routes through a GetIpForwardTable call.
  
      This is compatible with XP but won't get IPv6 routes.