Leaked source code of windows server 2003
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.

186 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Abstract:
  4. Defines and prototypes for the 6to4 service
  5. --*/
  6. #define SECONDS 1
  7. #define MINUTES (60 * SECONDS)
  8. #define HOURS (60 * MINUTES)
  9. #define DAYS (24 * HOURS)
  10. #define V4_COMPAT_IFINDEX 2
  11. #define SIX_TO_FOUR_IFINDEX 3
  12. #define KEY_GLOBAL L"System\\CurrentControlSet\\Services\\6to4\\Config"
  13. #define KEY_INTERFACES L"System\\CurrentControlSet\\Services\\6to4\\Interfaces"
  14. typedef struct _ADDR_INFO {
  15. LPSOCKADDR lpSockaddr;
  16. INT iSockaddrLength;
  17. ULONG ul6over4IfIndex;
  18. } ADDR_INFO, *PADDR_INFO;
  19. typedef struct _ADDR_LIST {
  20. INT iAddressCount;
  21. ADDR_INFO Address[1];
  22. } ADDR_LIST, *PADDR_LIST;
  23. extern ADDR_LIST *g_pIpv4AddressList;
  24. //////////////////////////
  25. // Routines from svcmain.c
  26. //////////////////////////
  27. VOID
  28. SetHelperServiceStatus(
  29. IN DWORD dwState,
  30. IN DWORD dwErr);
  31. typedef enum {
  32. DEFAULT = 0,
  33. AUTOMATIC,
  34. ENABLED,
  35. DISABLED
  36. } STATE;
  37. //////////////////////////
  38. // Routines from 6to4svc.c
  39. //////////////////////////
  40. extern STATE g_stService;
  41. extern SOCKET g_sIPv4Socket;
  42. VOID
  43. StopHelperService(
  44. IN DWORD Error);
  45. VOID
  46. CleanupHelperService(
  47. VOID);
  48. DWORD
  49. OnConfigChange(
  50. VOID);
  51. DWORD
  52. StartHelperService(
  53. VOID);
  54. VOID
  55. UpdateServiceRequirements(
  56. IN PIP_ADAPTER_ADDRESSES Adapters);
  57. VOID
  58. IncEventCount(
  59. IN PCHAR pszWhere);
  60. VOID
  61. DecEventCount(
  62. IN PCHAR pszWhere);
  63. BOOL
  64. ConvertOemToUnicode(
  65. IN LPSTR OemString,
  66. OUT LPWSTR UnicodeString,
  67. IN int UnicodeLen);
  68. ULONG
  69. GetInteger(
  70. IN HKEY hKey,
  71. IN LPCTSTR lpName,
  72. IN ULONG ulDefault);
  73. VOID
  74. GetString(
  75. IN HKEY hKey,
  76. IN LPCTSTR lpName,
  77. IN PWCHAR pBuff,
  78. IN ULONG ulLength,
  79. IN PWCHAR pDefault);
  80. DWORD
  81. ConfigureAddressUpdate(
  82. IN u_int Interface,
  83. IN SOCKADDR_IN6 *Sockaddr,
  84. IN u_int Lifetime,
  85. IN int Type,
  86. IN u_int PrefixConf,
  87. IN u_int SuffixConf);
  88. //////////////////////////
  89. // Routines from ipv6.c
  90. //////////////////////////
  91. extern void
  92. ForEachInterface(void (*func)(IPV6_INFO_INTERFACE *, void *), void *Context);
  93. extern int
  94. InitIPv6Library(void);
  95. extern void
  96. UninitIPv6Library(void);
  97. extern BOOL
  98. ReconnectInterface(PWCHAR AdapterName);
  99. extern int
  100. UpdateRouteTable(IPV6_INFO_ROUTE_TABLE *Route);
  101. extern int
  102. UpdateAddress(IPV6_UPDATE_ADDRESS *Address);
  103. extern u_int
  104. ConfirmIPv6Reachability(SOCKADDR_IN6 *Dest, u_int Timeout);
  105. extern BOOL
  106. DeleteInterface(u_int IfIndex);
  107. extern u_int
  108. CreateV6V4Interface(IN_ADDR SrcAddr, IN_ADDR DstAddr);
  109. extern u_int
  110. Create6over4Interface(IN_ADDR SrcAddr);
  111. extern int
  112. UpdateInterface(IPV6_INFO_INTERFACE *Update);
  113. extern IPV6_INFO_INTERFACE *
  114. GetInterfaceStackInfo(WCHAR *pwszAdapterName);
  115. extern BOOL
  116. UpdateRouterLinkAddress(u_int IfIndex, IN_ADDR SrcAddr, IN_ADDR DstAddr);
  117. extern VOID
  118. GetFirstSitePrefix(ULONG IfIndex, IPV6_INFO_SITE_PREFIX *Prefix);
  119. //////////////////////////
  120. // Routines from dyndns.c
  121. //////////////////////////
  122. DWORD
  123. StartIpv6AddressChangeNotification(VOID);
  124. VOID
  125. StopIpv6AddressChangeNotification(VOID);
  126. VOID CALLBACK
  127. OnIpv6AddressChange(IN PVOID lpParameter, IN BOOLEAN TimerOrWaitFired);
  128. //////////////////////////
  129. // Routines from proxy.c
  130. //////////////////////////
  131. BOOL
  132. QueueUpdateGlobalPortState(IN PVOID Unused);
  133. VOID
  134. UninitializePorts(VOID);
  135. VOID
  136. InitializePorts(VOID);