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.

101 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. dhcprog.h
  5. Abstract:
  6. This file contain function prototypes for the DHCP server rogue detection
  7. routines.
  8. Author:
  9. Ramesh Vyaghrapuri (rameshv) 17-Aug-1998
  10. Environment:
  11. User Mode - Win32 - MIDL
  12. Revision History:
  13. --*/
  14. #ifndef ROGUE_H_INCLUDED
  15. #define ROGUE_H_INCLUDED
  16. //
  17. // Structure that holds the state information for Rogue detection
  18. //
  19. #define MAX_DNS_NAME_LEN 260
  20. typedef struct {
  21. BOOL fInitialized;
  22. HANDLE TerminateEvent;
  23. HANDLE WaitHandle;
  24. BOOL fDhcp;
  25. BOOL fLogEvents;
  26. BOOL fIsSamSrv;
  27. ULONG NoNetTriesCount;
  28. ULONG GetDsDcNameRetries;
  29. BOOL fIsWorkGroup;
  30. BOOL fDcIsDsEnabled;
  31. BOOL fJustUpgraded;
  32. ULONG CachedAuthStatus;
  33. ULONG RogueState;
  34. ULONG InformsSentCount;
  35. ULONG SleepTime;
  36. ULONG ReceiveTimeLimit;
  37. ULONG ProcessAckRetries;
  38. ULONG WaitForAckRetries;
  39. ULONG nResponses;
  40. BOOL fSomeDsExists;
  41. ULONG StartTime;
  42. ULONG LastUnauthLogTime;
  43. WCHAR DomainDnsName[MAX_DNS_NAME_LEN];
  44. WCHAR DnsForestName[MAX_DNS_NAME_LEN];
  45. SOCKET SendSocket;
  46. SOCKET RecvSocket;
  47. BOOL fFormattedMessage;
  48. BYTE SendMessage[DHCP_MESSAGE_SIZE];
  49. UUID FakeHardwareAddress;
  50. ULONG SendMessageSize;
  51. BYTE RecvMessage[DHCP_MESSAGE_SIZE];
  52. ULONG LastSeenIpAddress;
  53. WCHAR LastSeenDomain[MAX_DNS_NAME_LEN];
  54. LIST_ENTRY CachedServersList;
  55. } DHCP_ROGUE_STATE_INFO, *PDHCP_ROGUE_STATE_INFO;
  56. //
  57. // Rogue.C
  58. //
  59. DWORD
  60. APIENTRY
  61. DhcpRogueInit(
  62. IN OUT PDHCP_ROGUE_STATE_INFO Info OPTIONAL,
  63. IN HANDLE WaitEvent,
  64. IN HANDLE TerminateEvent
  65. );
  66. VOID
  67. APIENTRY
  68. DhcpRogueCleanup(
  69. IN OUT PDHCP_ROGUE_STATE_INFO Info OPTIONAL
  70. );
  71. ULONG
  72. APIENTRY
  73. RogueDetectStateMachine(
  74. IN OUT PDHCP_ROGUE_STATE_INFO Info OPTIONAL
  75. );
  76. #endif