Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
3.8 KiB

  1. //=============================================================================
  2. // Copyright (c) Microsoft Corporation
  3. // Abstract:
  4. // This module handles talking to the IPv6 stack.
  5. //=============================================================================
  6. #define MALLOC(dwBytes) HeapAlloc(GetProcessHeap(), 0, dwBytes)
  7. #define FREE(ptr) HeapFree(GetProcessHeap(), 0, ptr)
  8. typedef enum {
  9. PUBLISH_NO,
  10. PUBLISH_AGE,
  11. PUBLISH_IMMORTAL
  12. } PUBLISH;
  13. typedef enum {
  14. FORMAT_NORMAL,
  15. FORMAT_VERBOSE,
  16. FORMAT_DUMP
  17. } FORMAT;
  18. DWORD AddTunnelInterface(PWCHAR pwszFriendlyName, IN_ADDR *pipLocalAddr,
  19. IN_ADDR *pipRemoteAddr, DWORD dwType, DWORD dwFlags,
  20. BOOL bPersistent);
  21. EXTERN_C DWORD AddOrRemoveIpv6(BOOL fAddIpv6);
  22. DWORD DeleteInterface(PWCHAR wszIfFriendlyName, BOOL bPersistent);
  23. DWORD DeletePrefixPolicy(IN6_ADDR *ipAddress, DWORD dwPrefixLength,
  24. BOOL bPersistent);
  25. DWORD FlushNeighborCache(PWCHAR wszIfFriendlyName, IN6_ADDR *pipAddress);
  26. DWORD FlushRouteCache(PWCHAR wszIfFriendlyName, IN6_ADDR *pipAddress);
  27. IPV6_INFO_INTERFACE *GetInterfaceByIpv6IfIndex(DWORD dwIfIndex);
  28. EXTERN_C DWORD IsIpv6Installed(BOOL *bInstalled);
  29. DWORD QueryBindingCache();
  30. DWORD QueryAddressTable(PWCHAR pwszIfFriendlyName, FORMAT Format,
  31. BOOL bPersistent);
  32. DWORD QueryMulticastAddressTable(PWCHAR pwszIfFriendlyName, FORMAT Format);
  33. DWORD QueryGlobalParameters(FORMAT Format, BOOL bPersistent);
  34. DWORD QueryInterface(PWCHAR wszIfFriendlyName, FORMAT Format, BOOL bPersistent);
  35. DWORD QueryMobilityParameters(FORMAT Format, BOOL bPersistent);
  36. DWORD QueryNeighborCache(PWCHAR wszIfFriendlyName, IN6_ADDR *pipAddress);
  37. DWORD QueryPrefixPolicy(FORMAT Format, BOOL bPersistent);
  38. DWORD QueryPrivacyParameters(FORMAT Format, BOOL bPersistent);
  39. DWORD QueryRouteCache(PWCHAR wszIfFriendlyName, IN6_ADDR *pipAddress,
  40. FORMAT Format);
  41. DWORD QueryRouteTable(FORMAT Format, BOOL bPersistent);
  42. DWORD QuerySitePrefixTable(FORMAT Format);
  43. DWORD RenewInterface(PWCHAR wszIfFriendlyName);
  44. DWORD ResetIpv6Config(BOOL bPersistent);
  45. DWORD UpdateMobilityParameters(DWORD dwSecurity, DWORD dwBindingCacheLimit,
  46. BOOL bPersistent);
  47. DWORD UpdateAddress(PWCHAR pwszIfFriendlyName, IN6_ADDR *pipAddress,
  48. DWORD dwType, DWORD dwValidLifetime,
  49. DWORD dwPreferredLifetime, BOOL bPersistent);
  50. DWORD UpdateGlobalParameters(DWORD dwDefaultCurHopLimit,
  51. DWORD dwNeighborCacheLimit,
  52. DWORD dwRouteCacheLimit, DWORD dwReassemblyLimit,
  53. BOOL bPersistent);
  54. DWORD UpdateInterface(PWCHAR wszIfFriendlyName, DWORD dwForwarding,
  55. DWORD dwAdvertises, DWORD dwMtu, DWORD dwSiteId,
  56. DWORD dwMetric, BOOL bPersistent);
  57. DWORD UpdatePrefixPolicy(IN6_ADDR *ipAddress, DWORD dwPrefixLength,
  58. DWORD dwPrecedence, DWORD dwLabel, BOOL bPersistent);
  59. DWORD UpdatePrivacyParameters(DWORD dwUseAnonymousAddresses,
  60. DWORD dwMaxDadAttempts,
  61. DWORD dwMaxValidLifetime,
  62. DWORD dwMaxPrefLifetime,
  63. DWORD dwRegenerateTime,
  64. DWORD dwMaxRandomTime,
  65. DWORD dwRandomTime, BOOL bPersistent);
  66. DWORD UpdateRouteTable(IN6_ADDR *ipPrefix, DWORD dwPrefixLength,
  67. PWCHAR pwszIfFriendlyName, IN6_ADDR *pipNextHop,
  68. DWORD dwMetric, PUBLISH Publish,
  69. DWORD dwSitePrefixLength, DWORD dwValidLifetime,
  70. DWORD dwPreferredLifetime, BOOL bPersistent);
  71. DWORD MyGetAdaptersInfo(OUT PIP_ADAPTER_ADDRESSES *ppAdapterInfo);