github.com/tomatome/win@v0.3.1/iphlpapi.go (about)

     1  // This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
     2  // go run internal/cmd/gen/gen.go
     3  
     4  // +build windows
     5  
     6  package win
     7  
     8  import (
     9  	"syscall"
    10  	"unsafe"
    11  )
    12  
    13  var (
    14  	// Library
    15  	libiphlpapi uintptr
    16  
    17  	// Functions
    18  	addIPAddress                            uintptr
    19  	cancelIPChangeNotify                    uintptr
    20  	createIpForwardEntry                    uintptr
    21  	createIpNetEntry                        uintptr
    22  	createPersistentTcpPortReservation      uintptr
    23  	createPersistentUdpPortReservation      uintptr
    24  	createProxyArpEntry                     uintptr
    25  	deleteIPAddress                         uintptr
    26  	deleteIpForwardEntry                    uintptr
    27  	deleteIpNetEntry                        uintptr
    28  	deletePersistentTcpPortReservation      uintptr
    29  	deletePersistentUdpPortReservation      uintptr
    30  	deleteProxyArpEntry                     uintptr
    31  	disableMediaSense                       uintptr
    32  	enableRouter                            uintptr
    33  	flushIpNetTable                         uintptr
    34  	getAdapterIndex                         uintptr
    35  	getAdapterOrderMap                      uintptr
    36  	getAdaptersAddresses                    uintptr
    37  	getAdaptersInfo                         uintptr
    38  	getBestInterface                        uintptr
    39  	getBestInterfaceEx                      uintptr
    40  	getBestRoute                            uintptr
    41  	getExtendedTcpTable                     uintptr
    42  	getExtendedUdpTable                     uintptr
    43  	getFriendlyIfIndex                      uintptr
    44  	getIcmpStatistics                       uintptr
    45  	getIcmpStatisticsEx                     uintptr
    46  	getIfEntry                              uintptr
    47  	getIfTable                              uintptr
    48  	getInterfaceInfo                        uintptr
    49  	getIpAddrTable                          uintptr
    50  	getIpErrorString                        uintptr
    51  	getIpForwardTable                       uintptr
    52  	getIpNetTable                           uintptr
    53  	getIpStatistics                         uintptr
    54  	getIpStatisticsEx                       uintptr
    55  	getNetworkParams                        uintptr
    56  	getNumberOfInterfaces                   uintptr
    57  	getOwnerModuleFromTcp6Entry             uintptr
    58  	getOwnerModuleFromTcpEntry              uintptr
    59  	getOwnerModuleFromUdp6Entry             uintptr
    60  	getOwnerModuleFromUdpEntry              uintptr
    61  	getPerAdapterInfo                       uintptr
    62  	getPerTcp6ConnectionEStats              uintptr
    63  	getPerTcpConnectionEStats               uintptr
    64  	getRTTAndHopCount                       uintptr
    65  	getTcp6Table                            uintptr
    66  	getTcp6Table2                           uintptr
    67  	getTcpStatistics                        uintptr
    68  	getTcpStatisticsEx                      uintptr
    69  	getTcpTable                             uintptr
    70  	getTcpTable2                            uintptr
    71  	getUdp6Table                            uintptr
    72  	getUdpStatistics                        uintptr
    73  	getUdpStatisticsEx                      uintptr
    74  	getUdpTable                             uintptr
    75  	getUniDirectionalAdapterInfo            uintptr
    76  	icmp6CreateFile                         uintptr
    77  	icmp6ParseReplies                       uintptr
    78  	icmp6SendEcho2                          uintptr
    79  	icmpCloseHandle                         uintptr
    80  	icmpCreateFile                          uintptr
    81  	icmpParseReplies                        uintptr
    82  	icmpSendEcho                            uintptr
    83  	icmpSendEcho2                           uintptr
    84  	ipReleaseAddress                        uintptr
    85  	ipRenewAddress                          uintptr
    86  	lookupPersistentTcpPortReservation      uintptr
    87  	lookupPersistentUdpPortReservation      uintptr
    88  	nhpAllocateAndGetInterfaceInfoFromStack uintptr
    89  	notifyAddrChange                        uintptr
    90  	notifyRouteChange                       uintptr
    91  	parseNetworkString                      uintptr
    92  	resolveNeighbor                         uintptr
    93  	restoreMediaSense                       uintptr
    94  	sendARP                                 uintptr
    95  	setIfEntry                              uintptr
    96  	setIpForwardEntry                       uintptr
    97  	setIpNetEntry                           uintptr
    98  	setIpStatistics                         uintptr
    99  	setIpStatisticsEx                       uintptr
   100  	setIpTTL                                uintptr
   101  	setPerTcp6ConnectionEStats              uintptr
   102  	setPerTcpConnectionEStats               uintptr
   103  	setTcpEntry                             uintptr
   104  	unenableRouter                          uintptr
   105  	allocateAndGetIfTableFromStack          uintptr
   106  	allocateAndGetIpAddrTableFromStack      uintptr
   107  	allocateAndGetIpForwardTableFromStack   uintptr
   108  	allocateAndGetIpNetTableFromStack       uintptr
   109  	allocateAndGetTcpTableFromStack         uintptr
   110  	allocateAndGetUdpTableFromStack         uintptr
   111  	cancelMibChangeNotify2                  uintptr
   112  	convertInterfaceGuidToLuid              uintptr
   113  	convertInterfaceIndexToLuid             uintptr
   114  	convertInterfaceLuidToGuid              uintptr
   115  	convertInterfaceLuidToIndex             uintptr
   116  	convertInterfaceLuidToName              uintptr
   117  	convertInterfaceNameToLuid              uintptr
   118  	createSortedAddressPairs                uintptr
   119  	freeMibTable                            uintptr
   120  	getIfEntry2                             uintptr
   121  	getIfTable2                             uintptr
   122  	icmpSendEcho2Ex                         uintptr
   123  	notifyIpInterfaceChange                 uintptr
   124  	pfBindInterfaceToIPAddress              uintptr
   125  	pfCreateInterface                       uintptr
   126  	pfDeleteInterface                       uintptr
   127  	pfUnBindInterface                       uintptr
   128  )
   129  
   130  func init() {
   131  	// Library
   132  	libiphlpapi = doLoadLibrary("iphlpapi.dll")
   133  
   134  	// Functions
   135  	addIPAddress = doGetProcAddress(libiphlpapi, "AddIPAddress")
   136  	cancelIPChangeNotify = doGetProcAddress(libiphlpapi, "CancelIPChangeNotify")
   137  	createIpForwardEntry = doGetProcAddress(libiphlpapi, "CreateIpForwardEntry")
   138  	createIpNetEntry = doGetProcAddress(libiphlpapi, "CreateIpNetEntry")
   139  	createPersistentTcpPortReservation = doGetProcAddress(libiphlpapi, "CreatePersistentTcpPortReservation")
   140  	createPersistentUdpPortReservation = doGetProcAddress(libiphlpapi, "CreatePersistentUdpPortReservation")
   141  	createProxyArpEntry = doGetProcAddress(libiphlpapi, "CreateProxyArpEntry")
   142  	deleteIPAddress = doGetProcAddress(libiphlpapi, "DeleteIPAddress")
   143  	deleteIpForwardEntry = doGetProcAddress(libiphlpapi, "DeleteIpForwardEntry")
   144  	deleteIpNetEntry = doGetProcAddress(libiphlpapi, "DeleteIpNetEntry")
   145  	deletePersistentTcpPortReservation = doGetProcAddress(libiphlpapi, "DeletePersistentTcpPortReservation")
   146  	deletePersistentUdpPortReservation = doGetProcAddress(libiphlpapi, "DeletePersistentUdpPortReservation")
   147  	deleteProxyArpEntry = doGetProcAddress(libiphlpapi, "DeleteProxyArpEntry")
   148  	disableMediaSense = doGetProcAddress(libiphlpapi, "DisableMediaSense")
   149  	enableRouter = doGetProcAddress(libiphlpapi, "EnableRouter")
   150  	flushIpNetTable = doGetProcAddress(libiphlpapi, "FlushIpNetTable")
   151  	getAdapterIndex = doGetProcAddress(libiphlpapi, "GetAdapterIndex")
   152  	getAdapterOrderMap = doGetProcAddress(libiphlpapi, "GetAdapterOrderMap")
   153  	getAdaptersAddresses = doGetProcAddress(libiphlpapi, "GetAdaptersAddresses")
   154  	getAdaptersInfo = doGetProcAddress(libiphlpapi, "GetAdaptersInfo")
   155  	getBestInterface = doGetProcAddress(libiphlpapi, "GetBestInterface")
   156  	getBestInterfaceEx = doGetProcAddress(libiphlpapi, "GetBestInterfaceEx")
   157  	getBestRoute = doGetProcAddress(libiphlpapi, "GetBestRoute")
   158  	getExtendedTcpTable = doGetProcAddress(libiphlpapi, "GetExtendedTcpTable")
   159  	getExtendedUdpTable = doGetProcAddress(libiphlpapi, "GetExtendedUdpTable")
   160  	getFriendlyIfIndex = doGetProcAddress(libiphlpapi, "GetFriendlyIfIndex")
   161  	getIcmpStatistics = doGetProcAddress(libiphlpapi, "GetIcmpStatistics")
   162  	getIcmpStatisticsEx = doGetProcAddress(libiphlpapi, "GetIcmpStatisticsEx")
   163  	getIfEntry = doGetProcAddress(libiphlpapi, "GetIfEntry")
   164  	getIfTable = doGetProcAddress(libiphlpapi, "GetIfTable")
   165  	getInterfaceInfo = doGetProcAddress(libiphlpapi, "GetInterfaceInfo")
   166  	getIpAddrTable = doGetProcAddress(libiphlpapi, "GetIpAddrTable")
   167  	getIpErrorString = doGetProcAddress(libiphlpapi, "GetIpErrorString")
   168  	getIpForwardTable = doGetProcAddress(libiphlpapi, "GetIpForwardTable")
   169  	getIpNetTable = doGetProcAddress(libiphlpapi, "GetIpNetTable")
   170  	getIpStatistics = doGetProcAddress(libiphlpapi, "GetIpStatistics")
   171  	getIpStatisticsEx = doGetProcAddress(libiphlpapi, "GetIpStatisticsEx")
   172  	getNetworkParams = doGetProcAddress(libiphlpapi, "GetNetworkParams")
   173  	getNumberOfInterfaces = doGetProcAddress(libiphlpapi, "GetNumberOfInterfaces")
   174  	getOwnerModuleFromTcp6Entry = doGetProcAddress(libiphlpapi, "GetOwnerModuleFromTcp6Entry")
   175  	getOwnerModuleFromTcpEntry = doGetProcAddress(libiphlpapi, "GetOwnerModuleFromTcpEntry")
   176  	getOwnerModuleFromUdp6Entry = doGetProcAddress(libiphlpapi, "GetOwnerModuleFromUdp6Entry")
   177  	getOwnerModuleFromUdpEntry = doGetProcAddress(libiphlpapi, "GetOwnerModuleFromUdpEntry")
   178  	getPerAdapterInfo = doGetProcAddress(libiphlpapi, "GetPerAdapterInfo")
   179  	getPerTcp6ConnectionEStats = doGetProcAddress(libiphlpapi, "GetPerTcp6ConnectionEStats")
   180  	getPerTcpConnectionEStats = doGetProcAddress(libiphlpapi, "GetPerTcpConnectionEStats")
   181  	getRTTAndHopCount = doGetProcAddress(libiphlpapi, "GetRTTAndHopCount")
   182  	getTcp6Table = doGetProcAddress(libiphlpapi, "GetTcp6Table")
   183  	getTcp6Table2 = doGetProcAddress(libiphlpapi, "GetTcp6Table2")
   184  	getTcpStatistics = doGetProcAddress(libiphlpapi, "GetTcpStatistics")
   185  	getTcpStatisticsEx = doGetProcAddress(libiphlpapi, "GetTcpStatisticsEx")
   186  	getTcpTable = doGetProcAddress(libiphlpapi, "GetTcpTable")
   187  	getTcpTable2 = doGetProcAddress(libiphlpapi, "GetTcpTable2")
   188  	getUdp6Table = doGetProcAddress(libiphlpapi, "GetUdp6Table")
   189  	getUdpStatistics = doGetProcAddress(libiphlpapi, "GetUdpStatistics")
   190  	getUdpStatisticsEx = doGetProcAddress(libiphlpapi, "GetUdpStatisticsEx")
   191  	getUdpTable = doGetProcAddress(libiphlpapi, "GetUdpTable")
   192  	getUniDirectionalAdapterInfo = doGetProcAddress(libiphlpapi, "GetUniDirectionalAdapterInfo")
   193  	icmp6CreateFile = doGetProcAddress(libiphlpapi, "Icmp6CreateFile")
   194  	icmp6ParseReplies = doGetProcAddress(libiphlpapi, "Icmp6ParseReplies")
   195  	icmp6SendEcho2 = doGetProcAddress(libiphlpapi, "Icmp6SendEcho2")
   196  	icmpCloseHandle = doGetProcAddress(libiphlpapi, "IcmpCloseHandle")
   197  	icmpCreateFile = doGetProcAddress(libiphlpapi, "IcmpCreateFile")
   198  	icmpParseReplies = doGetProcAddress(libiphlpapi, "IcmpParseReplies")
   199  	icmpSendEcho = doGetProcAddress(libiphlpapi, "IcmpSendEcho")
   200  	icmpSendEcho2 = doGetProcAddress(libiphlpapi, "IcmpSendEcho2")
   201  	ipReleaseAddress = doGetProcAddress(libiphlpapi, "IpReleaseAddress")
   202  	ipRenewAddress = doGetProcAddress(libiphlpapi, "IpRenewAddress")
   203  	lookupPersistentTcpPortReservation = doGetProcAddress(libiphlpapi, "LookupPersistentTcpPortReservation")
   204  	lookupPersistentUdpPortReservation = doGetProcAddress(libiphlpapi, "LookupPersistentUdpPortReservation")
   205  	nhpAllocateAndGetInterfaceInfoFromStack = doGetProcAddress(libiphlpapi, "NhpAllocateAndGetInterfaceInfoFromStack")
   206  	notifyAddrChange = doGetProcAddress(libiphlpapi, "NotifyAddrChange")
   207  	notifyRouteChange = doGetProcAddress(libiphlpapi, "NotifyRouteChange")
   208  	parseNetworkString = doGetProcAddress(libiphlpapi, "ParseNetworkString")
   209  	resolveNeighbor = doGetProcAddress(libiphlpapi, "ResolveNeighbor")
   210  	restoreMediaSense = doGetProcAddress(libiphlpapi, "RestoreMediaSense")
   211  	sendARP = doGetProcAddress(libiphlpapi, "SendARP")
   212  	setIfEntry = doGetProcAddress(libiphlpapi, "SetIfEntry")
   213  	setIpForwardEntry = doGetProcAddress(libiphlpapi, "SetIpForwardEntry")
   214  	setIpNetEntry = doGetProcAddress(libiphlpapi, "SetIpNetEntry")
   215  	setIpStatistics = doGetProcAddress(libiphlpapi, "SetIpStatistics")
   216  	setIpStatisticsEx = doGetProcAddress(libiphlpapi, "SetIpStatisticsEx")
   217  	setIpTTL = doGetProcAddress(libiphlpapi, "SetIpTTL")
   218  	setPerTcp6ConnectionEStats = doGetProcAddress(libiphlpapi, "SetPerTcp6ConnectionEStats")
   219  	setPerTcpConnectionEStats = doGetProcAddress(libiphlpapi, "SetPerTcpConnectionEStats")
   220  	setTcpEntry = doGetProcAddress(libiphlpapi, "SetTcpEntry")
   221  	unenableRouter = doGetProcAddress(libiphlpapi, "UnenableRouter")
   222  	allocateAndGetIfTableFromStack = doGetProcAddress(libiphlpapi, "AllocateAndGetIfTableFromStack")
   223  	allocateAndGetIpAddrTableFromStack = doGetProcAddress(libiphlpapi, "AllocateAndGetIpAddrTableFromStack")
   224  	allocateAndGetIpForwardTableFromStack = doGetProcAddress(libiphlpapi, "AllocateAndGetIpForwardTableFromStack")
   225  	allocateAndGetIpNetTableFromStack = doGetProcAddress(libiphlpapi, "AllocateAndGetIpNetTableFromStack")
   226  	allocateAndGetTcpTableFromStack = doGetProcAddress(libiphlpapi, "AllocateAndGetTcpTableFromStack")
   227  	allocateAndGetUdpTableFromStack = doGetProcAddress(libiphlpapi, "AllocateAndGetUdpTableFromStack")
   228  	cancelMibChangeNotify2 = doGetProcAddress(libiphlpapi, "CancelMibChangeNotify2")
   229  	convertInterfaceGuidToLuid = doGetProcAddress(libiphlpapi, "ConvertInterfaceGuidToLuid")
   230  	convertInterfaceIndexToLuid = doGetProcAddress(libiphlpapi, "ConvertInterfaceIndexToLuid")
   231  	convertInterfaceLuidToGuid = doGetProcAddress(libiphlpapi, "ConvertInterfaceLuidToGuid")
   232  	convertInterfaceLuidToIndex = doGetProcAddress(libiphlpapi, "ConvertInterfaceLuidToIndex")
   233  	convertInterfaceLuidToName = doGetProcAddress(libiphlpapi, "ConvertInterfaceLuidToNameW")
   234  	convertInterfaceNameToLuid = doGetProcAddress(libiphlpapi, "ConvertInterfaceNameToLuidW")
   235  	createSortedAddressPairs = doGetProcAddress(libiphlpapi, "CreateSortedAddressPairs")
   236  	freeMibTable = doGetProcAddress(libiphlpapi, "FreeMibTable")
   237  	getIfEntry2 = doGetProcAddress(libiphlpapi, "GetIfEntry2")
   238  	getIfTable2 = doGetProcAddress(libiphlpapi, "GetIfTable2")
   239  	icmpSendEcho2Ex = doGetProcAddress(libiphlpapi, "IcmpSendEcho2Ex")
   240  	notifyIpInterfaceChange = doGetProcAddress(libiphlpapi, "NotifyIpInterfaceChange")
   241  	pfBindInterfaceToIPAddress = doGetProcAddress(libiphlpapi, "PfBindInterfaceToIPAddress")
   242  	pfCreateInterface = doGetProcAddress(libiphlpapi, "PfCreateInterface")
   243  	pfDeleteInterface = doGetProcAddress(libiphlpapi, "PfDeleteInterface")
   244  	pfUnBindInterface = doGetProcAddress(libiphlpapi, "PfUnBindInterface")
   245  }
   246  
   247  func AddIPAddress(address IPAddr, ipMask IPMask, ifIndex DWORD, nTEContext *uint32, nTEInstance *uint32) DWORD {
   248  	ret1 := syscall6(addIPAddress, 5,
   249  		uintptr(address),
   250  		uintptr(ipMask),
   251  		uintptr(ifIndex),
   252  		uintptr(unsafe.Pointer(nTEContext)),
   253  		uintptr(unsafe.Pointer(nTEInstance)),
   254  		0)
   255  	return DWORD(ret1)
   256  }
   257  
   258  func CancelIPChangeNotify(notifyOverlapped *OVERLAPPED) bool {
   259  	ret1 := syscall3(cancelIPChangeNotify, 1,
   260  		uintptr(unsafe.Pointer(notifyOverlapped)),
   261  		0,
   262  		0)
   263  	return ret1 != 0
   264  }
   265  
   266  func CreateIpForwardEntry(pRoute PMIB_IPFORWARDROW) DWORD {
   267  	ret1 := syscall3(createIpForwardEntry, 1,
   268  		uintptr(unsafe.Pointer(pRoute)),
   269  		0,
   270  		0)
   271  	return DWORD(ret1)
   272  }
   273  
   274  func CreateIpNetEntry(pArpEntry PMIB_IPNETROW) DWORD {
   275  	ret1 := syscall3(createIpNetEntry, 1,
   276  		uintptr(unsafe.Pointer(pArpEntry)),
   277  		0,
   278  		0)
   279  	return DWORD(ret1)
   280  }
   281  
   282  func CreatePersistentTcpPortReservation(startPort USHORT, numberOfPorts USHORT, token PULONG64) ULONG {
   283  	ret1 := syscall3(createPersistentTcpPortReservation, 3,
   284  		uintptr(startPort),
   285  		uintptr(numberOfPorts),
   286  		uintptr(unsafe.Pointer(token)))
   287  	return ULONG(ret1)
   288  }
   289  
   290  func CreatePersistentUdpPortReservation(startPort USHORT, numberOfPorts USHORT, token PULONG64) ULONG {
   291  	ret1 := syscall3(createPersistentUdpPortReservation, 3,
   292  		uintptr(startPort),
   293  		uintptr(numberOfPorts),
   294  		uintptr(unsafe.Pointer(token)))
   295  	return ULONG(ret1)
   296  }
   297  
   298  func CreateProxyArpEntry(dwAddress DWORD, dwMask DWORD, dwIfIndex DWORD) DWORD {
   299  	ret1 := syscall3(createProxyArpEntry, 3,
   300  		uintptr(dwAddress),
   301  		uintptr(dwMask),
   302  		uintptr(dwIfIndex))
   303  	return DWORD(ret1)
   304  }
   305  
   306  func DeleteIPAddress(nTEContext ULONG) DWORD {
   307  	ret1 := syscall3(deleteIPAddress, 1,
   308  		uintptr(nTEContext),
   309  		0,
   310  		0)
   311  	return DWORD(ret1)
   312  }
   313  
   314  func DeleteIpForwardEntry(pRoute PMIB_IPFORWARDROW) DWORD {
   315  	ret1 := syscall3(deleteIpForwardEntry, 1,
   316  		uintptr(unsafe.Pointer(pRoute)),
   317  		0,
   318  		0)
   319  	return DWORD(ret1)
   320  }
   321  
   322  func DeleteIpNetEntry(pArpEntry PMIB_IPNETROW) DWORD {
   323  	ret1 := syscall3(deleteIpNetEntry, 1,
   324  		uintptr(unsafe.Pointer(pArpEntry)),
   325  		0,
   326  		0)
   327  	return DWORD(ret1)
   328  }
   329  
   330  func DeletePersistentTcpPortReservation(startPort USHORT, numberOfPorts USHORT) ULONG {
   331  	ret1 := syscall3(deletePersistentTcpPortReservation, 2,
   332  		uintptr(startPort),
   333  		uintptr(numberOfPorts),
   334  		0)
   335  	return ULONG(ret1)
   336  }
   337  
   338  func DeletePersistentUdpPortReservation(startPort USHORT, numberOfPorts USHORT) ULONG {
   339  	ret1 := syscall3(deletePersistentUdpPortReservation, 2,
   340  		uintptr(startPort),
   341  		uintptr(numberOfPorts),
   342  		0)
   343  	return ULONG(ret1)
   344  }
   345  
   346  func DeleteProxyArpEntry(dwAddress DWORD, dwMask DWORD, dwIfIndex DWORD) DWORD {
   347  	ret1 := syscall3(deleteProxyArpEntry, 3,
   348  		uintptr(dwAddress),
   349  		uintptr(dwMask),
   350  		uintptr(dwIfIndex))
   351  	return DWORD(ret1)
   352  }
   353  
   354  func DisableMediaSense(pHandle *HANDLE, pOverLapped *OVERLAPPED) DWORD {
   355  	ret1 := syscall3(disableMediaSense, 2,
   356  		uintptr(unsafe.Pointer(pHandle)),
   357  		uintptr(unsafe.Pointer(pOverLapped)),
   358  		0)
   359  	return DWORD(ret1)
   360  }
   361  
   362  func EnableRouter(pHandle *HANDLE, pOverlapped *OVERLAPPED) DWORD {
   363  	ret1 := syscall3(enableRouter, 2,
   364  		uintptr(unsafe.Pointer(pHandle)),
   365  		uintptr(unsafe.Pointer(pOverlapped)),
   366  		0)
   367  	return DWORD(ret1)
   368  }
   369  
   370  func FlushIpNetTable(dwIfIndex DWORD) DWORD {
   371  	ret1 := syscall3(flushIpNetTable, 1,
   372  		uintptr(dwIfIndex),
   373  		0,
   374  		0)
   375  	return DWORD(ret1)
   376  }
   377  
   378  func GetAdapterIndex(adapterName LPWSTR, ifIndex *uint32) DWORD {
   379  	ret1 := syscall3(getAdapterIndex, 2,
   380  		uintptr(unsafe.Pointer(adapterName)),
   381  		uintptr(unsafe.Pointer(ifIndex)),
   382  		0)
   383  	return DWORD(ret1)
   384  }
   385  
   386  func GetAdapterOrderMap() PIP_ADAPTER_ORDER_MAP {
   387  	ret1 := syscall3(getAdapterOrderMap, 0,
   388  		0,
   389  		0,
   390  		0)
   391  	return (PIP_ADAPTER_ORDER_MAP)(unsafe.Pointer(ret1))
   392  }
   393  
   394  func GetAdaptersAddresses(family ULONG, flags ULONG, reserved uintptr, adapterAddresses PIP_ADAPTER_ADDRESSES, sizePointer *uint32) ULONG {
   395  	ret1 := syscall6(getAdaptersAddresses, 5,
   396  		uintptr(family),
   397  		uintptr(flags),
   398  		reserved,
   399  		uintptr(unsafe.Pointer(adapterAddresses)),
   400  		uintptr(unsafe.Pointer(sizePointer)),
   401  		0)
   402  	return ULONG(ret1)
   403  }
   404  
   405  func GetAdaptersInfo(adapterInfo PIP_ADAPTER_INFO, sizePointer *uint32) ULONG {
   406  	ret1 := syscall3(getAdaptersInfo, 2,
   407  		uintptr(unsafe.Pointer(adapterInfo)),
   408  		uintptr(unsafe.Pointer(sizePointer)),
   409  		0)
   410  	return ULONG(ret1)
   411  }
   412  
   413  func GetBestInterface(dwDestAddr IPAddr, pdwBestIfIndex *DWORD) DWORD {
   414  	ret1 := syscall3(getBestInterface, 2,
   415  		uintptr(dwDestAddr),
   416  		uintptr(unsafe.Pointer(pdwBestIfIndex)),
   417  		0)
   418  	return DWORD(ret1)
   419  }
   420  
   421  func GetBestInterfaceEx(pDestAddr *Sockaddr, pdwBestIfIndex *DWORD) DWORD {
   422  	ret1 := syscall3(getBestInterfaceEx, 2,
   423  		uintptr(unsafe.Pointer(pDestAddr)),
   424  		uintptr(unsafe.Pointer(pdwBestIfIndex)),
   425  		0)
   426  	return DWORD(ret1)
   427  }
   428  
   429  func GetBestRoute(dwDestAddr DWORD, dwSourceAddr DWORD, pBestRoute PMIB_IPFORWARDROW) DWORD {
   430  	ret1 := syscall3(getBestRoute, 3,
   431  		uintptr(dwDestAddr),
   432  		uintptr(dwSourceAddr),
   433  		uintptr(unsafe.Pointer(pBestRoute)))
   434  	return DWORD(ret1)
   435  }
   436  
   437  func GetExtendedTcpTable(pTcpTable uintptr, pdwSize *DWORD, bOrder bool, ulAf ULONG, tableClass TCP_TABLE_CLASS, reserved ULONG) DWORD {
   438  	ret1 := syscall6(getExtendedTcpTable, 6,
   439  		pTcpTable,
   440  		uintptr(unsafe.Pointer(pdwSize)),
   441  		getUintptrFromBool(bOrder),
   442  		uintptr(ulAf),
   443  		uintptr(tableClass),
   444  		uintptr(reserved))
   445  	return DWORD(ret1)
   446  }
   447  
   448  func GetExtendedUdpTable(pUdpTable uintptr, pdwSize *DWORD, bOrder bool, ulAf ULONG, tableClass UDP_TABLE_CLASS, reserved ULONG) DWORD {
   449  	ret1 := syscall6(getExtendedUdpTable, 6,
   450  		pUdpTable,
   451  		uintptr(unsafe.Pointer(pdwSize)),
   452  		getUintptrFromBool(bOrder),
   453  		uintptr(ulAf),
   454  		uintptr(tableClass),
   455  		uintptr(reserved))
   456  	return DWORD(ret1)
   457  }
   458  
   459  func GetFriendlyIfIndex(ifIndex DWORD) DWORD {
   460  	ret1 := syscall3(getFriendlyIfIndex, 1,
   461  		uintptr(ifIndex),
   462  		0,
   463  		0)
   464  	return DWORD(ret1)
   465  }
   466  
   467  func GetIcmpStatistics(statistics PMIB_ICMP) ULONG {
   468  	ret1 := syscall3(getIcmpStatistics, 1,
   469  		uintptr(unsafe.Pointer(statistics)),
   470  		0,
   471  		0)
   472  	return ULONG(ret1)
   473  }
   474  
   475  func GetIcmpStatisticsEx(statistics PMIB_ICMP_EX, family ULONG) ULONG {
   476  	ret1 := syscall3(getIcmpStatisticsEx, 2,
   477  		uintptr(unsafe.Pointer(statistics)),
   478  		uintptr(family),
   479  		0)
   480  	return ULONG(ret1)
   481  }
   482  
   483  func GetIfEntry(pIfRow PMIB_IFROW) DWORD {
   484  	ret1 := syscall3(getIfEntry, 1,
   485  		uintptr(unsafe.Pointer(pIfRow)),
   486  		0,
   487  		0)
   488  	return DWORD(ret1)
   489  }
   490  
   491  func GetIfTable(pIfTable PMIB_IFTABLE, pdwSize *uint32, bOrder bool) DWORD {
   492  	ret1 := syscall3(getIfTable, 3,
   493  		uintptr(unsafe.Pointer(pIfTable)),
   494  		uintptr(unsafe.Pointer(pdwSize)),
   495  		getUintptrFromBool(bOrder))
   496  	return DWORD(ret1)
   497  }
   498  
   499  func GetInterfaceInfo(pIfTable PIP_INTERFACE_INFO, dwOutBufLen *uint32) DWORD {
   500  	ret1 := syscall3(getInterfaceInfo, 2,
   501  		uintptr(unsafe.Pointer(pIfTable)),
   502  		uintptr(unsafe.Pointer(dwOutBufLen)),
   503  		0)
   504  	return DWORD(ret1)
   505  }
   506  
   507  func GetIpAddrTable(pIpAddrTable PMIB_IPADDRTABLE, pdwSize *uint32, bOrder bool) DWORD {
   508  	ret1 := syscall3(getIpAddrTable, 3,
   509  		uintptr(unsafe.Pointer(pIpAddrTable)),
   510  		uintptr(unsafe.Pointer(pdwSize)),
   511  		getUintptrFromBool(bOrder))
   512  	return DWORD(ret1)
   513  }
   514  
   515  func GetIpErrorString(errorCode IP_STATUS, buffer PWSTR, size *DWORD) DWORD {
   516  	ret1 := syscall3(getIpErrorString, 3,
   517  		uintptr(errorCode),
   518  		uintptr(unsafe.Pointer(buffer)),
   519  		uintptr(unsafe.Pointer(size)))
   520  	return DWORD(ret1)
   521  }
   522  
   523  func GetIpForwardTable(pIpForwardTable PMIB_IPFORWARDTABLE, pdwSize *uint32, bOrder bool) DWORD {
   524  	ret1 := syscall3(getIpForwardTable, 3,
   525  		uintptr(unsafe.Pointer(pIpForwardTable)),
   526  		uintptr(unsafe.Pointer(pdwSize)),
   527  		getUintptrFromBool(bOrder))
   528  	return DWORD(ret1)
   529  }
   530  
   531  func GetIpNetTable(ipNetTable PMIB_IPNETTABLE, sizePointer *uint32, order bool) ULONG {
   532  	ret1 := syscall3(getIpNetTable, 3,
   533  		uintptr(unsafe.Pointer(ipNetTable)),
   534  		uintptr(unsafe.Pointer(sizePointer)),
   535  		getUintptrFromBool(order))
   536  	return ULONG(ret1)
   537  }
   538  
   539  func GetIpStatistics(statistics PMIB_IPSTATS) ULONG {
   540  	ret1 := syscall3(getIpStatistics, 1,
   541  		uintptr(unsafe.Pointer(statistics)),
   542  		0,
   543  		0)
   544  	return ULONG(ret1)
   545  }
   546  
   547  func GetIpStatisticsEx(statistics PMIB_IPSTATS, family ULONG) ULONG {
   548  	ret1 := syscall3(getIpStatisticsEx, 2,
   549  		uintptr(unsafe.Pointer(statistics)),
   550  		uintptr(family),
   551  		0)
   552  	return ULONG(ret1)
   553  }
   554  
   555  func GetNetworkParams(pFixedInfo PFIXED_INFO, pOutBufLen *uint32) DWORD {
   556  	ret1 := syscall3(getNetworkParams, 2,
   557  		uintptr(unsafe.Pointer(pFixedInfo)),
   558  		uintptr(unsafe.Pointer(pOutBufLen)),
   559  		0)
   560  	return DWORD(ret1)
   561  }
   562  
   563  func GetNumberOfInterfaces(pdwNumIf *DWORD) DWORD {
   564  	ret1 := syscall3(getNumberOfInterfaces, 1,
   565  		uintptr(unsafe.Pointer(pdwNumIf)),
   566  		0,
   567  		0)
   568  	return DWORD(ret1)
   569  }
   570  
   571  func GetOwnerModuleFromTcp6Entry(pTcpEntry PMIB_TCP6ROW_OWNER_MODULE, class TCPIP_OWNER_MODULE_INFO_CLASS, pBuffer uintptr, pdwSize *DWORD) DWORD {
   572  	ret1 := syscall6(getOwnerModuleFromTcp6Entry, 4,
   573  		uintptr(unsafe.Pointer(pTcpEntry)),
   574  		uintptr(class),
   575  		pBuffer,
   576  		uintptr(unsafe.Pointer(pdwSize)),
   577  		0,
   578  		0)
   579  	return DWORD(ret1)
   580  }
   581  
   582  func GetOwnerModuleFromTcpEntry(pTcpEntry PMIB_TCPROW_OWNER_MODULE, class TCPIP_OWNER_MODULE_INFO_CLASS, pBuffer uintptr, pdwSize *DWORD) DWORD {
   583  	ret1 := syscall6(getOwnerModuleFromTcpEntry, 4,
   584  		uintptr(unsafe.Pointer(pTcpEntry)),
   585  		uintptr(class),
   586  		pBuffer,
   587  		uintptr(unsafe.Pointer(pdwSize)),
   588  		0,
   589  		0)
   590  	return DWORD(ret1)
   591  }
   592  
   593  func GetOwnerModuleFromUdp6Entry(pUdpEntry PMIB_UDP6ROW_OWNER_MODULE, class TCPIP_OWNER_MODULE_INFO_CLASS, pBuffer uintptr, pdwSize *DWORD) DWORD {
   594  	ret1 := syscall6(getOwnerModuleFromUdp6Entry, 4,
   595  		uintptr(unsafe.Pointer(pUdpEntry)),
   596  		uintptr(class),
   597  		pBuffer,
   598  		uintptr(unsafe.Pointer(pdwSize)),
   599  		0,
   600  		0)
   601  	return DWORD(ret1)
   602  }
   603  
   604  func GetOwnerModuleFromUdpEntry(pUdpEntry PMIB_UDPROW_OWNER_MODULE, class TCPIP_OWNER_MODULE_INFO_CLASS, pBuffer uintptr, pdwSize *DWORD) DWORD {
   605  	ret1 := syscall6(getOwnerModuleFromUdpEntry, 4,
   606  		uintptr(unsafe.Pointer(pUdpEntry)),
   607  		uintptr(class),
   608  		pBuffer,
   609  		uintptr(unsafe.Pointer(pdwSize)),
   610  		0,
   611  		0)
   612  	return DWORD(ret1)
   613  }
   614  
   615  func GetPerAdapterInfo(ifIndex ULONG, pPerAdapterInfo PIP_PER_ADAPTER_INFO, pOutBufLen *uint32) DWORD {
   616  	ret1 := syscall3(getPerAdapterInfo, 3,
   617  		uintptr(ifIndex),
   618  		uintptr(unsafe.Pointer(pPerAdapterInfo)),
   619  		uintptr(unsafe.Pointer(pOutBufLen)))
   620  	return DWORD(ret1)
   621  }
   622  
   623  func GetPerTcp6ConnectionEStats(row PMIB_TCP6ROW, estatsType TCP_ESTATS_TYPE, rw PUCHAR, rwVersion ULONG, rwSize ULONG, ros PUCHAR, rosVersion ULONG, rosSize ULONG, rod PUCHAR, rodVersion ULONG, rodSize ULONG) ULONG {
   624  	ret1 := syscall12(getPerTcp6ConnectionEStats, 11,
   625  		uintptr(unsafe.Pointer(row)),
   626  		uintptr(estatsType),
   627  		uintptr(unsafe.Pointer(rw)),
   628  		uintptr(rwVersion),
   629  		uintptr(rwSize),
   630  		uintptr(unsafe.Pointer(ros)),
   631  		uintptr(rosVersion),
   632  		uintptr(rosSize),
   633  		uintptr(unsafe.Pointer(rod)),
   634  		uintptr(rodVersion),
   635  		uintptr(rodSize),
   636  		0)
   637  	return ULONG(ret1)
   638  }
   639  
   640  func GetPerTcpConnectionEStats(row PMIB_TCPROW, estatsType TCP_ESTATS_TYPE, rw PUCHAR, rwVersion ULONG, rwSize ULONG, ros PUCHAR, rosVersion ULONG, rosSize ULONG, rod PUCHAR, rodVersion ULONG, rodSize ULONG) ULONG {
   641  	ret1 := syscall12(getPerTcpConnectionEStats, 11,
   642  		uintptr(unsafe.Pointer(row)),
   643  		uintptr(estatsType),
   644  		uintptr(unsafe.Pointer(rw)),
   645  		uintptr(rwVersion),
   646  		uintptr(rwSize),
   647  		uintptr(unsafe.Pointer(ros)),
   648  		uintptr(rosVersion),
   649  		uintptr(rosSize),
   650  		uintptr(unsafe.Pointer(rod)),
   651  		uintptr(rodVersion),
   652  		uintptr(rodSize),
   653  		0)
   654  	return ULONG(ret1)
   655  }
   656  
   657  func GetRTTAndHopCount(destIpAddress IPAddr, hopCount *uint32, maxHops ULONG, rTT *uint32) bool {
   658  	ret1 := syscall6(getRTTAndHopCount, 4,
   659  		uintptr(destIpAddress),
   660  		uintptr(unsafe.Pointer(hopCount)),
   661  		uintptr(maxHops),
   662  		uintptr(unsafe.Pointer(rTT)),
   663  		0,
   664  		0)
   665  	return ret1 != 0
   666  }
   667  
   668  func GetTcp6Table(tcpTable PMIB_TCP6TABLE, sizePointer *uint32, order bool) ULONG {
   669  	ret1 := syscall3(getTcp6Table, 3,
   670  		uintptr(unsafe.Pointer(tcpTable)),
   671  		uintptr(unsafe.Pointer(sizePointer)),
   672  		getUintptrFromBool(order))
   673  	return ULONG(ret1)
   674  }
   675  
   676  func GetTcp6Table2(tcpTable PMIB_TCP6TABLE2, sizePointer *uint32, order bool) ULONG {
   677  	ret1 := syscall3(getTcp6Table2, 3,
   678  		uintptr(unsafe.Pointer(tcpTable)),
   679  		uintptr(unsafe.Pointer(sizePointer)),
   680  		getUintptrFromBool(order))
   681  	return ULONG(ret1)
   682  }
   683  
   684  func GetTcpStatistics(statistics PMIB_TCPSTATS) ULONG {
   685  	ret1 := syscall3(getTcpStatistics, 1,
   686  		uintptr(unsafe.Pointer(statistics)),
   687  		0,
   688  		0)
   689  	return ULONG(ret1)
   690  }
   691  
   692  func GetTcpStatisticsEx(statistics PMIB_TCPSTATS, family ULONG) ULONG {
   693  	ret1 := syscall3(getTcpStatisticsEx, 2,
   694  		uintptr(unsafe.Pointer(statistics)),
   695  		uintptr(family),
   696  		0)
   697  	return ULONG(ret1)
   698  }
   699  
   700  func GetTcpTable(tcpTable PMIB_TCPTABLE, sizePointer *uint32, order bool) ULONG {
   701  	ret1 := syscall3(getTcpTable, 3,
   702  		uintptr(unsafe.Pointer(tcpTable)),
   703  		uintptr(unsafe.Pointer(sizePointer)),
   704  		getUintptrFromBool(order))
   705  	return ULONG(ret1)
   706  }
   707  
   708  func GetTcpTable2(tcpTable PMIB_TCPTABLE2, sizePointer *uint32, order bool) ULONG {
   709  	ret1 := syscall3(getTcpTable2, 3,
   710  		uintptr(unsafe.Pointer(tcpTable)),
   711  		uintptr(unsafe.Pointer(sizePointer)),
   712  		getUintptrFromBool(order))
   713  	return ULONG(ret1)
   714  }
   715  
   716  func GetUdp6Table(udp6Table PMIB_UDP6TABLE, sizePointer *uint32, order bool) ULONG {
   717  	ret1 := syscall3(getUdp6Table, 3,
   718  		uintptr(unsafe.Pointer(udp6Table)),
   719  		uintptr(unsafe.Pointer(sizePointer)),
   720  		getUintptrFromBool(order))
   721  	return ULONG(ret1)
   722  }
   723  
   724  func GetUdpStatistics(stats PMIB_UDPSTATS) ULONG {
   725  	ret1 := syscall3(getUdpStatistics, 1,
   726  		uintptr(unsafe.Pointer(stats)),
   727  		0,
   728  		0)
   729  	return ULONG(ret1)
   730  }
   731  
   732  func GetUdpStatisticsEx(statistics PMIB_UDPSTATS, family ULONG) ULONG {
   733  	ret1 := syscall3(getUdpStatisticsEx, 2,
   734  		uintptr(unsafe.Pointer(statistics)),
   735  		uintptr(family),
   736  		0)
   737  	return ULONG(ret1)
   738  }
   739  
   740  func GetUdpTable(udpTable PMIB_UDPTABLE, sizePointer *uint32, order bool) ULONG {
   741  	ret1 := syscall3(getUdpTable, 3,
   742  		uintptr(unsafe.Pointer(udpTable)),
   743  		uintptr(unsafe.Pointer(sizePointer)),
   744  		getUintptrFromBool(order))
   745  	return ULONG(ret1)
   746  }
   747  
   748  func GetUniDirectionalAdapterInfo(pIPIfInfo PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS, dwOutBufLen *uint32) DWORD {
   749  	ret1 := syscall3(getUniDirectionalAdapterInfo, 2,
   750  		uintptr(unsafe.Pointer(pIPIfInfo)),
   751  		uintptr(unsafe.Pointer(dwOutBufLen)),
   752  		0)
   753  	return DWORD(ret1)
   754  }
   755  
   756  func Icmp6CreateFile() HANDLE {
   757  	ret1 := syscall3(icmp6CreateFile, 0,
   758  		0,
   759  		0,
   760  		0)
   761  	return HANDLE(ret1)
   762  }
   763  
   764  func Icmp6ParseReplies(replyBuffer LPVOID, replySize DWORD) DWORD {
   765  	ret1 := syscall3(icmp6ParseReplies, 2,
   766  		uintptr(unsafe.Pointer(replyBuffer)),
   767  		uintptr(replySize),
   768  		0)
   769  	return DWORD(ret1)
   770  }
   771  
   772  func Icmp6SendEcho2(icmpHandle HANDLE, event HANDLE, apcRoutine PIO_APC_ROUTINE, apcContext uintptr, sourceAddress *SOCKADDR_IN6_LH, destinationAddress *SOCKADDR_IN6_LH, requestData LPVOID, requestSize WORD, requestOptions PIP_OPTION_INFORMATION, replyBuffer LPVOID, replySize DWORD, timeout DWORD) DWORD {
   773  	apcRoutineCallback := syscall.NewCallback(apcRoutine)
   774  	ret1 := syscall12(icmp6SendEcho2, 12,
   775  		uintptr(icmpHandle),
   776  		uintptr(event),
   777  		apcRoutineCallback,
   778  		apcContext,
   779  		uintptr(unsafe.Pointer(sourceAddress)),
   780  		uintptr(unsafe.Pointer(destinationAddress)),
   781  		uintptr(unsafe.Pointer(requestData)),
   782  		uintptr(requestSize),
   783  		uintptr(unsafe.Pointer(requestOptions)),
   784  		uintptr(unsafe.Pointer(replyBuffer)),
   785  		uintptr(replySize),
   786  		uintptr(timeout))
   787  	return DWORD(ret1)
   788  }
   789  
   790  func IcmpCloseHandle(icmpHandle HANDLE) bool {
   791  	ret1 := syscall3(icmpCloseHandle, 1,
   792  		uintptr(icmpHandle),
   793  		0,
   794  		0)
   795  	return ret1 != 0
   796  }
   797  
   798  func IcmpCreateFile() HANDLE {
   799  	ret1 := syscall3(icmpCreateFile, 0,
   800  		0,
   801  		0,
   802  		0)
   803  	return HANDLE(ret1)
   804  }
   805  
   806  func IcmpParseReplies(replyBuffer LPVOID, replySize DWORD) DWORD {
   807  	ret1 := syscall3(icmpParseReplies, 2,
   808  		uintptr(unsafe.Pointer(replyBuffer)),
   809  		uintptr(replySize),
   810  		0)
   811  	return DWORD(ret1)
   812  }
   813  
   814  func IcmpSendEcho(icmpHandle HANDLE, destinationAddress IPAddr, requestData LPVOID, requestSize WORD, requestOptions PIP_OPTION_INFORMATION, replyBuffer LPVOID, replySize DWORD, timeout DWORD) DWORD {
   815  	ret1 := syscall9(icmpSendEcho, 8,
   816  		uintptr(icmpHandle),
   817  		uintptr(destinationAddress),
   818  		uintptr(unsafe.Pointer(requestData)),
   819  		uintptr(requestSize),
   820  		uintptr(unsafe.Pointer(requestOptions)),
   821  		uintptr(unsafe.Pointer(replyBuffer)),
   822  		uintptr(replySize),
   823  		uintptr(timeout),
   824  		0)
   825  	return DWORD(ret1)
   826  }
   827  
   828  func IcmpSendEcho2(icmpHandle HANDLE, event HANDLE, apcRoutine PIO_APC_ROUTINE, apcContext uintptr, destinationAddress IPAddr, requestData LPVOID, requestSize WORD, requestOptions PIP_OPTION_INFORMATION, replyBuffer LPVOID, replySize DWORD, timeout DWORD) DWORD {
   829  	apcRoutineCallback := syscall.NewCallback(apcRoutine)
   830  	ret1 := syscall12(icmpSendEcho2, 11,
   831  		uintptr(icmpHandle),
   832  		uintptr(event),
   833  		apcRoutineCallback,
   834  		apcContext,
   835  		uintptr(destinationAddress),
   836  		uintptr(unsafe.Pointer(requestData)),
   837  		uintptr(requestSize),
   838  		uintptr(unsafe.Pointer(requestOptions)),
   839  		uintptr(unsafe.Pointer(replyBuffer)),
   840  		uintptr(replySize),
   841  		uintptr(timeout),
   842  		0)
   843  	return DWORD(ret1)
   844  }
   845  
   846  func IpReleaseAddress(adapterInfo PIP_ADAPTER_INDEX_MAP) DWORD {
   847  	ret1 := syscall3(ipReleaseAddress, 1,
   848  		uintptr(unsafe.Pointer(adapterInfo)),
   849  		0,
   850  		0)
   851  	return DWORD(ret1)
   852  }
   853  
   854  func IpRenewAddress(adapterInfo PIP_ADAPTER_INDEX_MAP) DWORD {
   855  	ret1 := syscall3(ipRenewAddress, 1,
   856  		uintptr(unsafe.Pointer(adapterInfo)),
   857  		0,
   858  		0)
   859  	return DWORD(ret1)
   860  }
   861  
   862  func LookupPersistentTcpPortReservation(startPort USHORT, numberOfPorts USHORT, token PULONG64) ULONG {
   863  	ret1 := syscall3(lookupPersistentTcpPortReservation, 3,
   864  		uintptr(startPort),
   865  		uintptr(numberOfPorts),
   866  		uintptr(unsafe.Pointer(token)))
   867  	return ULONG(ret1)
   868  }
   869  
   870  func LookupPersistentUdpPortReservation(startPort USHORT, numberOfPorts USHORT, token PULONG64) ULONG {
   871  	ret1 := syscall3(lookupPersistentUdpPortReservation, 3,
   872  		uintptr(startPort),
   873  		uintptr(numberOfPorts),
   874  		uintptr(unsafe.Pointer(token)))
   875  	return ULONG(ret1)
   876  }
   877  
   878  func NhpAllocateAndGetInterfaceInfoFromStack(ppTable **IP_INTERFACE_NAME_INFO, pdwCount *DWORD, bOrder bool, hHeap HANDLE, dwFlags DWORD) DWORD {
   879  	ret1 := syscall6(nhpAllocateAndGetInterfaceInfoFromStack, 5,
   880  		uintptr(unsafe.Pointer(ppTable)),
   881  		uintptr(unsafe.Pointer(pdwCount)),
   882  		getUintptrFromBool(bOrder),
   883  		uintptr(hHeap),
   884  		uintptr(dwFlags),
   885  		0)
   886  	return DWORD(ret1)
   887  }
   888  
   889  func NotifyAddrChange(handle *HANDLE, overlapped *OVERLAPPED) DWORD {
   890  	ret1 := syscall3(notifyAddrChange, 2,
   891  		uintptr(unsafe.Pointer(handle)),
   892  		uintptr(unsafe.Pointer(overlapped)),
   893  		0)
   894  	return DWORD(ret1)
   895  }
   896  
   897  func NotifyRouteChange(handle *HANDLE, overlapped *OVERLAPPED) DWORD {
   898  	ret1 := syscall3(notifyRouteChange, 2,
   899  		uintptr(unsafe.Pointer(handle)),
   900  		uintptr(unsafe.Pointer(overlapped)),
   901  		0)
   902  	return DWORD(ret1)
   903  }
   904  
   905  func ParseNetworkString(networkString /*const*/ *WCHAR, types DWORD, addressInfo PNET_ADDRESS_INFO, portNumber *USHORT, prefixLength *byte) DWORD {
   906  	ret1 := syscall6(parseNetworkString, 5,
   907  		uintptr(unsafe.Pointer(networkString)),
   908  		uintptr(types),
   909  		uintptr(unsafe.Pointer(addressInfo)),
   910  		uintptr(unsafe.Pointer(portNumber)),
   911  		uintptr(unsafe.Pointer(prefixLength)),
   912  		0)
   913  	return DWORD(ret1)
   914  }
   915  
   916  func ResolveNeighbor(networkAddress *SOCKADDR, physicalAddress uintptr, physicalAddressLength *uint32) ULONG {
   917  	ret1 := syscall3(resolveNeighbor, 3,
   918  		uintptr(unsafe.Pointer(networkAddress)),
   919  		physicalAddress,
   920  		uintptr(unsafe.Pointer(physicalAddressLength)))
   921  	return ULONG(ret1)
   922  }
   923  
   924  func RestoreMediaSense(pOverlapped *OVERLAPPED, lpdwEnableCount *uint32) DWORD {
   925  	ret1 := syscall3(restoreMediaSense, 2,
   926  		uintptr(unsafe.Pointer(pOverlapped)),
   927  		uintptr(unsafe.Pointer(lpdwEnableCount)),
   928  		0)
   929  	return DWORD(ret1)
   930  }
   931  
   932  func SendARP(destIP IPAddr, srcIP IPAddr, pMacAddr uintptr, phyAddrLen *uint32) DWORD {
   933  	ret1 := syscall6(sendARP, 4,
   934  		uintptr(destIP),
   935  		uintptr(srcIP),
   936  		pMacAddr,
   937  		uintptr(unsafe.Pointer(phyAddrLen)),
   938  		0,
   939  		0)
   940  	return DWORD(ret1)
   941  }
   942  
   943  func SetIfEntry(pIfRow PMIB_IFROW) DWORD {
   944  	ret1 := syscall3(setIfEntry, 1,
   945  		uintptr(unsafe.Pointer(pIfRow)),
   946  		0,
   947  		0)
   948  	return DWORD(ret1)
   949  }
   950  
   951  func SetIpForwardEntry(pRoute PMIB_IPFORWARDROW) DWORD {
   952  	ret1 := syscall3(setIpForwardEntry, 1,
   953  		uintptr(unsafe.Pointer(pRoute)),
   954  		0,
   955  		0)
   956  	return DWORD(ret1)
   957  }
   958  
   959  func SetIpNetEntry(pArpEntry PMIB_IPNETROW) DWORD {
   960  	ret1 := syscall3(setIpNetEntry, 1,
   961  		uintptr(unsafe.Pointer(pArpEntry)),
   962  		0,
   963  		0)
   964  	return DWORD(ret1)
   965  }
   966  
   967  func SetIpStatistics(pIpStats PMIB_IPSTATS) DWORD {
   968  	ret1 := syscall3(setIpStatistics, 1,
   969  		uintptr(unsafe.Pointer(pIpStats)),
   970  		0,
   971  		0)
   972  	return DWORD(ret1)
   973  }
   974  
   975  func SetIpStatisticsEx(statistics PMIB_IPSTATS, family ULONG) ULONG {
   976  	ret1 := syscall3(setIpStatisticsEx, 2,
   977  		uintptr(unsafe.Pointer(statistics)),
   978  		uintptr(family),
   979  		0)
   980  	return ULONG(ret1)
   981  }
   982  
   983  func SetIpTTL(nTTL UINT) DWORD {
   984  	ret1 := syscall3(setIpTTL, 1,
   985  		uintptr(nTTL),
   986  		0,
   987  		0)
   988  	return DWORD(ret1)
   989  }
   990  
   991  func SetPerTcp6ConnectionEStats(row PMIB_TCP6ROW, estatsType TCP_ESTATS_TYPE, rw PUCHAR, rwVersion ULONG, rwSize ULONG, offset ULONG) ULONG {
   992  	ret1 := syscall6(setPerTcp6ConnectionEStats, 6,
   993  		uintptr(unsafe.Pointer(row)),
   994  		uintptr(estatsType),
   995  		uintptr(unsafe.Pointer(rw)),
   996  		uintptr(rwVersion),
   997  		uintptr(rwSize),
   998  		uintptr(offset))
   999  	return ULONG(ret1)
  1000  }
  1001  
  1002  func SetPerTcpConnectionEStats(row PMIB_TCPROW, estatsType TCP_ESTATS_TYPE, rw PUCHAR, rwVersion ULONG, rwSize ULONG, offset ULONG) ULONG {
  1003  	ret1 := syscall6(setPerTcpConnectionEStats, 6,
  1004  		uintptr(unsafe.Pointer(row)),
  1005  		uintptr(estatsType),
  1006  		uintptr(unsafe.Pointer(rw)),
  1007  		uintptr(rwVersion),
  1008  		uintptr(rwSize),
  1009  		uintptr(offset))
  1010  	return ULONG(ret1)
  1011  }
  1012  
  1013  func SetTcpEntry(pTcpRow PMIB_TCPROW) DWORD {
  1014  	ret1 := syscall3(setTcpEntry, 1,
  1015  		uintptr(unsafe.Pointer(pTcpRow)),
  1016  		0,
  1017  		0)
  1018  	return DWORD(ret1)
  1019  }
  1020  
  1021  func UnenableRouter(pOverlapped *OVERLAPPED, lpdwEnableCount *uint32) DWORD {
  1022  	ret1 := syscall3(unenableRouter, 2,
  1023  		uintptr(unsafe.Pointer(pOverlapped)),
  1024  		uintptr(unsafe.Pointer(lpdwEnableCount)),
  1025  		0)
  1026  	return DWORD(ret1)
  1027  }
  1028  
  1029  func AllocateAndGetIfTableFromStack(ppIfTable *PMIB_IFTABLE, bOrder bool, heap HANDLE, flags DWORD) DWORD {
  1030  	ret1 := syscall6(allocateAndGetIfTableFromStack, 4,
  1031  		uintptr(unsafe.Pointer(ppIfTable)),
  1032  		getUintptrFromBool(bOrder),
  1033  		uintptr(heap),
  1034  		uintptr(flags),
  1035  		0,
  1036  		0)
  1037  	return DWORD(ret1)
  1038  }
  1039  
  1040  func AllocateAndGetIpAddrTableFromStack(ppIpAddrTable *PMIB_IPADDRTABLE, bOrder bool, heap HANDLE, flags DWORD) DWORD {
  1041  	ret1 := syscall6(allocateAndGetIpAddrTableFromStack, 4,
  1042  		uintptr(unsafe.Pointer(ppIpAddrTable)),
  1043  		getUintptrFromBool(bOrder),
  1044  		uintptr(heap),
  1045  		uintptr(flags),
  1046  		0,
  1047  		0)
  1048  	return DWORD(ret1)
  1049  }
  1050  
  1051  func AllocateAndGetIpForwardTableFromStack(ppIpForwardTable *PMIB_IPFORWARDTABLE, bOrder bool, heap HANDLE, flags DWORD) DWORD {
  1052  	ret1 := syscall6(allocateAndGetIpForwardTableFromStack, 4,
  1053  		uintptr(unsafe.Pointer(ppIpForwardTable)),
  1054  		getUintptrFromBool(bOrder),
  1055  		uintptr(heap),
  1056  		uintptr(flags),
  1057  		0,
  1058  		0)
  1059  	return DWORD(ret1)
  1060  }
  1061  
  1062  func AllocateAndGetIpNetTableFromStack(ppIpNetTable *PMIB_IPNETTABLE, bOrder bool, heap HANDLE, flags DWORD) DWORD {
  1063  	ret1 := syscall6(allocateAndGetIpNetTableFromStack, 4,
  1064  		uintptr(unsafe.Pointer(ppIpNetTable)),
  1065  		getUintptrFromBool(bOrder),
  1066  		uintptr(heap),
  1067  		uintptr(flags),
  1068  		0,
  1069  		0)
  1070  	return DWORD(ret1)
  1071  }
  1072  
  1073  func AllocateAndGetTcpTableFromStack(ppTcpTable *PMIB_TCPTABLE, bOrder bool, heap HANDLE, flags DWORD) DWORD {
  1074  	ret1 := syscall6(allocateAndGetTcpTableFromStack, 4,
  1075  		uintptr(unsafe.Pointer(ppTcpTable)),
  1076  		getUintptrFromBool(bOrder),
  1077  		uintptr(heap),
  1078  		uintptr(flags),
  1079  		0,
  1080  		0)
  1081  	return DWORD(ret1)
  1082  }
  1083  
  1084  func AllocateAndGetUdpTableFromStack(ppUdpTable *PMIB_UDPTABLE, bOrder bool, heap HANDLE, flags DWORD) DWORD {
  1085  	ret1 := syscall6(allocateAndGetUdpTableFromStack, 4,
  1086  		uintptr(unsafe.Pointer(ppUdpTable)),
  1087  		getUintptrFromBool(bOrder),
  1088  		uintptr(heap),
  1089  		uintptr(flags),
  1090  		0,
  1091  		0)
  1092  	return DWORD(ret1)
  1093  }
  1094  
  1095  func CancelMibChangeNotify2(handle HANDLE) DWORD {
  1096  	ret1 := syscall3(cancelMibChangeNotify2, 1,
  1097  		uintptr(handle),
  1098  		0,
  1099  		0)
  1100  	return DWORD(ret1)
  1101  }
  1102  
  1103  func ConvertInterfaceGuidToLuid(guid /*const*/ *GUID, luid *NET_LUID) DWORD {
  1104  	ret1 := syscall3(convertInterfaceGuidToLuid, 2,
  1105  		uintptr(unsafe.Pointer(guid)),
  1106  		uintptr(unsafe.Pointer(luid)),
  1107  		0)
  1108  	return DWORD(ret1)
  1109  }
  1110  
  1111  func ConvertInterfaceIndexToLuid(index NET_IFINDEX, luid *NET_LUID) DWORD {
  1112  	ret1 := syscall3(convertInterfaceIndexToLuid, 2,
  1113  		uintptr(index),
  1114  		uintptr(unsafe.Pointer(luid)),
  1115  		0)
  1116  	return DWORD(ret1)
  1117  }
  1118  
  1119  func ConvertInterfaceLuidToGuid(luid /*const*/ *NET_LUID, guid *GUID) DWORD {
  1120  	ret1 := syscall3(convertInterfaceLuidToGuid, 2,
  1121  		uintptr(unsafe.Pointer(luid)),
  1122  		uintptr(unsafe.Pointer(guid)),
  1123  		0)
  1124  	return DWORD(ret1)
  1125  }
  1126  
  1127  func ConvertInterfaceLuidToIndex(luid /*const*/ *NET_LUID, index *NET_IFINDEX) DWORD {
  1128  	ret1 := syscall3(convertInterfaceLuidToIndex, 2,
  1129  		uintptr(unsafe.Pointer(luid)),
  1130  		uintptr(unsafe.Pointer(index)),
  1131  		0)
  1132  	return DWORD(ret1)
  1133  }
  1134  
  1135  func ConvertInterfaceLuidToName(luid /*const*/ *NET_LUID, name *WCHAR, aLen SIZE_T) DWORD {
  1136  	ret1 := syscall3(convertInterfaceLuidToName, 3,
  1137  		uintptr(unsafe.Pointer(luid)),
  1138  		uintptr(unsafe.Pointer(name)),
  1139  		uintptr(aLen))
  1140  	return DWORD(ret1)
  1141  }
  1142  
  1143  func ConvertInterfaceNameToLuid(name /*const*/ *WCHAR, luid *NET_LUID) DWORD {
  1144  	ret1 := syscall3(convertInterfaceNameToLuid, 2,
  1145  		uintptr(unsafe.Pointer(name)),
  1146  		uintptr(unsafe.Pointer(luid)),
  1147  		0)
  1148  	return DWORD(ret1)
  1149  }
  1150  
  1151  func CreateSortedAddressPairs(src_list /*const*/ PSOCKADDR_IN6, src_count DWORD, dst_list /*const*/ PSOCKADDR_IN6, dst_count DWORD, options DWORD, pair_list *PSOCKADDR_IN6_PAIR, pair_count *uint32) DWORD {
  1152  	ret1 := syscall9(createSortedAddressPairs, 7,
  1153  		uintptr(unsafe.Pointer(src_list)),
  1154  		uintptr(src_count),
  1155  		uintptr(unsafe.Pointer(dst_list)),
  1156  		uintptr(dst_count),
  1157  		uintptr(options),
  1158  		uintptr(unsafe.Pointer(pair_list)),
  1159  		uintptr(unsafe.Pointer(pair_count)),
  1160  		0,
  1161  		0)
  1162  	return DWORD(ret1)
  1163  }
  1164  
  1165  func FreeMibTable(ptr uintptr) {
  1166  	syscall3(freeMibTable, 1,
  1167  		ptr,
  1168  		0,
  1169  		0)
  1170  }
  1171  
  1172  func GetIfEntry2(row2 *MIB_IF_ROW2) DWORD {
  1173  	ret1 := syscall3(getIfEntry2, 1,
  1174  		uintptr(unsafe.Pointer(row2)),
  1175  		0,
  1176  		0)
  1177  	return DWORD(ret1)
  1178  }
  1179  
  1180  func GetIfTable2(table **MIB_IF_TABLE2) DWORD {
  1181  	ret1 := syscall3(getIfTable2, 1,
  1182  		uintptr(unsafe.Pointer(table)),
  1183  		0,
  1184  		0)
  1185  	return DWORD(ret1)
  1186  }
  1187  
  1188  func IcmpSendEcho2Ex(icmpHandle HANDLE, event HANDLE, apcRoutine PIO_APC_ROUTINE, apcContext uintptr, sourceAddress IPAddr, destinationAddress IPAddr, requestData LPVOID, requestSize WORD, requestOptions PIP_OPTION_INFORMATION, replyBuffer LPVOID, replySize DWORD, timeout DWORD) DWORD {
  1189  	apcRoutineCallback := syscall.NewCallback(apcRoutine)
  1190  	ret1 := syscall12(icmpSendEcho2Ex, 12,
  1191  		uintptr(icmpHandle),
  1192  		uintptr(event),
  1193  		apcRoutineCallback,
  1194  		apcContext,
  1195  		uintptr(sourceAddress),
  1196  		uintptr(destinationAddress),
  1197  		uintptr(unsafe.Pointer(requestData)),
  1198  		uintptr(requestSize),
  1199  		uintptr(unsafe.Pointer(requestOptions)),
  1200  		uintptr(unsafe.Pointer(replyBuffer)),
  1201  		uintptr(replySize),
  1202  		uintptr(timeout))
  1203  	return DWORD(ret1)
  1204  }
  1205  
  1206  func NotifyIpInterfaceChange(family ULONG, callback uintptr, context uintptr, init_notify BOOLEAN, handle *HANDLE) DWORD {
  1207  	ret1 := syscall6(notifyIpInterfaceChange, 5,
  1208  		uintptr(family),
  1209  		callback,
  1210  		context,
  1211  		uintptr(init_notify),
  1212  		uintptr(unsafe.Pointer(handle)),
  1213  		0)
  1214  	return DWORD(ret1)
  1215  }
  1216  
  1217  func PfBindInterfaceToIPAddress(aInterface INTERFACE_HANDLE, aType PFADDRESSTYPE, ip *byte) DWORD {
  1218  	ret1 := syscall3(pfBindInterfaceToIPAddress, 3,
  1219  		uintptr(aInterface),
  1220  		uintptr(aType),
  1221  		uintptr(unsafe.Pointer(ip)))
  1222  	return DWORD(ret1)
  1223  }
  1224  
  1225  func PfCreateInterface(dwName DWORD, inAction PFFORWARD_ACTION, outAction PFFORWARD_ACTION, bUseLog bool, bMustBeUnique bool, ppInterface *INTERFACE_HANDLE) DWORD {
  1226  	ret1 := syscall6(pfCreateInterface, 6,
  1227  		uintptr(dwName),
  1228  		uintptr(inAction),
  1229  		uintptr(outAction),
  1230  		getUintptrFromBool(bUseLog),
  1231  		getUintptrFromBool(bMustBeUnique),
  1232  		uintptr(unsafe.Pointer(ppInterface)))
  1233  	return DWORD(ret1)
  1234  }
  1235  
  1236  func PfDeleteInterface(aInterface INTERFACE_HANDLE) DWORD {
  1237  	ret1 := syscall3(pfDeleteInterface, 1,
  1238  		uintptr(aInterface),
  1239  		0,
  1240  		0)
  1241  	return DWORD(ret1)
  1242  }
  1243  
  1244  func PfUnBindInterface(aInterface INTERFACE_HANDLE) DWORD {
  1245  	ret1 := syscall3(pfUnBindInterface, 1,
  1246  		uintptr(aInterface),
  1247  		0,
  1248  		0)
  1249  	return DWORD(ret1)
  1250  }