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.

162 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1998, Microsoft Corporation
  3. Module Name:
  4. rmapi.h
  5. Abstract:
  6. This module contains declarations for the part of the router-manager
  7. interface which is common to all the protocols in this component.
  8. Author:
  9. Abolade Gbadegesin (aboladeg) 4-Mar-1998
  10. Revision History:
  11. --*/
  12. #ifndef _NATHLP_RMAPI_H_
  13. #define _NATHLP_RMAPI_H_
  14. typedef enum {
  15. NhUninitializedMode,
  16. NhSharedAccessMode,
  17. NhRoutingProtocolMode,
  18. NhMaximumMode
  19. } NH_COMPONENT_MODE, *PNH_COMPONENT_MODE;
  20. #define NhIsBoundaryInterface(i,b) NatIsBoundaryInterface((i),(b))
  21. #define NhQuerySharedConnectionDomainName() NatQuerySharedConnectionDomainName()
  22. extern NH_COMPONENT_MODE NhComponentMode;
  23. extern CRITICAL_SECTION NhLock;
  24. extern const WCHAR NhTcpipParametersString[];
  25. //
  26. // Application settings (response protocols) handling
  27. //
  28. extern LIST_ENTRY NhApplicationSettingsList;
  29. extern LIST_ENTRY NhDhcpReservationList;
  30. extern DWORD NhDhcpScopeAddress;
  31. extern DWORD NhDhcpScopeMask;
  32. typedef struct _NAT_APP_ENTRY
  33. {
  34. LIST_ENTRY Link;
  35. UCHAR Protocol;
  36. USHORT Port;
  37. USHORT ResponseCount;
  38. HNET_RESPONSE_RANGE *ResponseArray;
  39. } NAT_APP_ENTRY, *PNAT_APP_ENTRY;
  40. typedef struct _NAT_DHCP_RESERVATION
  41. {
  42. LIST_ENTRY Link;
  43. LPWSTR Name;
  44. ULONG Address;
  45. } NAT_DHCP_RESERVATION, *PNAT_DHCP_RESERVATION;
  46. typedef DWORD (CALLBACK *MAPINTERFACETOADAPTER)(DWORD);
  47. VOID
  48. NhBuildDhcpReservations(
  49. VOID
  50. );
  51. ULONG
  52. NhDialSharedConnection(
  53. VOID
  54. );
  55. VOID
  56. NhFreeApplicationSettings(
  57. VOID
  58. );
  59. VOID
  60. NhFreeDhcpReservations(
  61. VOID
  62. );
  63. BOOLEAN
  64. NhIsDnsProxyEnabled(
  65. VOID
  66. );
  67. BOOLEAN
  68. NhIsLocalAddress(
  69. ULONG Address
  70. );
  71. BOOLEAN
  72. NhIsWinsProxyEnabled(
  73. VOID
  74. );
  75. PIP_ADAPTER_BINDING_INFO
  76. NhQueryBindingInformation(
  77. ULONG AdapterIndex
  78. );
  79. NTSTATUS
  80. NhQueryDomainName(
  81. PCHAR* DomainName
  82. );
  83. NTSTATUS
  84. NhQueryValueKey(
  85. HANDLE Key,
  86. const WCHAR ValueName[],
  87. PKEY_VALUE_PARTIAL_INFORMATION* Information
  88. );
  89. VOID
  90. NhSignalNatInterface(
  91. ULONG Index,
  92. BOOLEAN Boundary
  93. );
  94. ULONG
  95. NhMapAddressToAdapter(
  96. ULONG Address
  97. );
  98. ULONG
  99. NhMapInterfaceToAdapter(
  100. ULONG Index
  101. );
  102. extern
  103. ULONG
  104. NhMapInterfaceToRouterIfType(
  105. ULONG Index
  106. );
  107. VOID
  108. NhResetComponentMode(
  109. VOID
  110. );
  111. BOOLEAN
  112. NhSetComponentMode(
  113. NH_COMPONENT_MODE ComponentMode
  114. );
  115. VOID
  116. NhUpdateApplicationSettings(
  117. VOID
  118. );
  119. ULONG
  120. APIENTRY
  121. RegisterProtocol(
  122. IN OUT PMPR_ROUTING_CHARACTERISTICS RoutingCharacteristics,
  123. IN OUT PMPR_SERVICE_CHARACTERISTICS ServiceCharacteristics
  124. );
  125. #endif // _NATHLP_RMAPI_H_