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.

99 lines
2.4 KiB

  1. /*
  2. Copyright (c) 1998, Microsoft Corporation, all rights reserved
  3. Description:
  4. History:
  5. */
  6. #ifndef _RASSRVR__H_
  7. #define _RASSRVR__H_
  8. #include "rasiphlp_.h"
  9. #include <mprlog.h>
  10. #include <dns.h>
  11. #include <dnsapi.h>
  12. #include <dhcpcapi.h>
  13. #include <raserror.h>
  14. #include <malloc.h>
  15. #include <rasman.h>
  16. #include <llinfo.h>
  17. #include <ddwanarp.h>
  18. #include "helper.h"
  19. #include "tcpreg.h"
  20. #include "rasdhcp.h"
  21. #include "rasstat.h"
  22. #include "rastcp.h"
  23. #include "rassrvr.h"
  24. #define SERVER_HPORT 0xee170466
  25. #define AINODE_FLAG_NOTIFY_DLL 0x00000001
  26. #define AINODE_FLAG_ACTIVATED 0x00000002
  27. #define AINODE_FLAG_EASYNET 0x00000004
  28. typedef struct _ACQUIRED_IPADDR
  29. {
  30. struct _ACQUIRED_IPADDR* pNext;
  31. HPORT hPort; // For diagnostic purposes
  32. IPADDR nboIpAddr;
  33. WCHAR* wszUserName;
  34. WCHAR* wszPortName;
  35. DWORD fFlags; // See AINODE_FLAG_*
  36. } AINODE;
  37. MPRADMINGETIPADDRESSFORUSER* pfnMprAdminGetIpAddressForUser = NULL;
  38. MPRADMINRELEASEIPADDRESS* pfnMprAdminReleaseIpAddress = NULL;
  39. IPADDR RasSrvrNboServerIpAddress = 0;
  40. IPADDR RasSrvrNboServerSubnetMask = 0;
  41. AINODE* RasSrvrAcquiredIpAddresses = NULL;
  42. BOOL RasSrvrRunning = FALSE;
  43. BOOL RasSrvrAdapterMapped = FALSE;
  44. MIB_SERVER_HANDLE RasSrvrHMIBServer = NULL;
  45. WCHAR g_rgwcAdapterName[WANARP_MAX_DEVICE_NAME_LEN + 2];
  46. extern HANDLE HelperWanArpHandle;
  47. // This critical section controls access to the above global variables
  48. extern CRITICAL_SECTION RasSrvrCriticalSection;
  49. DWORD
  50. rasSrvrInitAdapterName(
  51. VOID
  52. );
  53. AINODE*
  54. rasSrvrFindAiNode(
  55. IN IPADDR nboIpAddr,
  56. IN BOOL fRemoveFromList
  57. );
  58. VOID
  59. rasSrvrFreeAiNode(
  60. IN AINODE* pNode
  61. );
  62. DWORD
  63. rasSrvrSetIpAddressInRegistry(
  64. IN IPADDR nboIpAddr,
  65. IN IPADDR nboIpMask
  66. );
  67. DWORD
  68. rasSrvrAcquireAddressEx(
  69. IN HPORT hPort,
  70. IN OUT IPADDR* pnboIpAddr,
  71. IN OUT IPADDR* pnboIpMask,
  72. OUT BOOL* pfEasyNet
  73. );
  74. DWORD
  75. rasSrvrGetAddressForServerAdapter(
  76. VOID
  77. );
  78. #endif // #ifndef _RASSRVR__H_