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.

87 lines
2.0 KiB

  1. //#--------------------------------------------------------------
  2. //
  3. // File: proxystate.h
  4. //
  5. // Synopsis: This file holds the declarations of the
  6. // CProxyState class
  7. //
  8. //
  9. // History: 9/23/97 MKarki Created
  10. //
  11. // Copyright (C) 1997-98 Microsoft Corporation
  12. // All rights reserved.
  13. //
  14. //----------------------------------------------------------------
  15. #ifndef _PROXYSTATE_H_
  16. #define _PROXYSTATE_H_
  17. #include "radcommon.h"
  18. #include "packetradius.h"
  19. #include "proxyinfo.h"
  20. #include "perimeter.h"
  21. //
  22. // here is the format of the proxy state attribute
  23. //
  24. #pragma pack (push, 1)
  25. typedef struct _proxy_state_
  26. {
  27. DWORD dwCheckSum;
  28. DWORD dwIPAddress;
  29. DWORD dwIndex;
  30. } PROXYSTATE, *PPROXYSTATE;
  31. #pragma pack (pop)
  32. class CProxyState : Perimeter
  33. {
  34. public:
  35. BOOL Init (
  36. /*[in]*/ DWORD dwIPAddress,
  37. /*[in]*/ DWORD dwTableSize
  38. );
  39. BOOL GenerateProxyState (
  40. /*[in]*/ CPacketRadius *pCPacketRadius,
  41. /*[out]*/ PDWORD pdwProxyStateId
  42. );
  43. BOOL SetProxyStateInfo(
  44. /*[in]*/ CPacketRadius *pCPacketRadius,
  45. /*[in]*/ DWORD dwProxyStateId,
  46. /*[in]*/ PBYTE pbyProxyReqAuthenticator
  47. );
  48. BOOL ValidateProxyState (
  49. /*[in]*/ CPacketRadius *pCPacketRadius,
  50. /*[out]*/ PBYTE pbyReqAuthenticator
  51. );
  52. CProxyState();
  53. virtual ~CProxyState();
  54. private:
  55. BOOL CalculateCheckSum (
  56. /*[in]*/ PPROXYSTATE pProxyState,
  57. /*[out]*/ PDWORD pdwCheckSum
  58. );
  59. BOOL Validate (
  60. /*[out]*/ PPROXYSTATE pProxyState
  61. );
  62. DWORD m_dwIPAddress;
  63. CProxyInfo **m_pProxyStateTable;
  64. DWORD m_dwTableIndex;
  65. DWORD m_dwTableSize;
  66. };
  67. #endif // ifndef _PROXYSTATE_H_