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.7 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) Microsoft Corporation
  4. //
  5. // SYNOPSIS
  6. //
  7. // Declares the class RadiusProxy.
  8. //
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef PROXY_H
  11. #define PROXY_H
  12. #pragma once
  13. #define IDS_RadiusProxy 201
  14. #include <radproxy.h>
  15. #include <counters.h>
  16. #include <translate.h>
  17. #include <iastl.h>
  18. #include <iastlutl.h>
  19. using namespace IASTL;
  20. class DataStoreObject;
  21. class Resolver;
  22. class __declspec(uuid("6BC0989F-0CE6-11D1-BAAE-00C04FC2E20D")) RadiusProxy;
  23. ///////////////////////////////////////////////////////////////////////////////
  24. //
  25. // CLASS
  26. //
  27. // RadiusProxy
  28. //
  29. // DESCRIPTION
  30. //
  31. // Implements the RadiusProxy request handler.
  32. //
  33. ///////////////////////////////////////////////////////////////////////////////
  34. class ATL_NO_VTABLE RadiusProxy :
  35. public IASTL::IASRequestHandler,
  36. public CComCoClass<RadiusProxy, &__uuidof(RadiusProxy)>,
  37. public RadiusProxyClient
  38. {
  39. public:
  40. IAS_DECLARE_REGISTRY(RadiusProxy, 1, IAS_REGISTRY_AUTO, IASTypeLibrary)
  41. RadiusProxy();
  42. ~RadiusProxy() throw ();
  43. HRESULT FinalConstruct() throw ();
  44. STDMETHOD(PutProperty)(LONG Id, VARIANT* pValue);
  45. // RadiusProxyClient methods.
  46. virtual void onEvent(
  47. const RadiusEvent& event
  48. ) throw ();
  49. virtual void onComplete(
  50. RadiusProxyEngine::Result result,
  51. PVOID context,
  52. RemoteServer* server,
  53. BYTE code,
  54. const RadiusAttribute* begin,
  55. const RadiusAttribute* end
  56. ) throw ();
  57. protected:
  58. // Receives requests from the pipeline.
  59. void onAsyncRequest(IRequest* pRequest) throw ();
  60. // Update configuration.
  61. void configure(IUnknown* unk);
  62. // Read the configuration for a single server in a group.
  63. void configureServer(
  64. const Resolver& localAddress,
  65. const wchar_t* groupName,
  66. DataStoreObject& inServer,
  67. RemoteServers& outServers
  68. );
  69. // Default vector for retrieving attributes.
  70. typedef IASAttributeVectorWithBuffer<32> AttributeVector;
  71. typedef AttributeVector::iterator AttributeIterator;
  72. Translator translator; // Converts attributes to RADIUS format.
  73. RadiusProxyEngine engine; // The actual proxy code.
  74. ProxyCounters counters; // Maintains the PerfMon/SNMP counters.
  75. DWORD maxServerGroups; // Maximum number of server groups allowed.
  76. // Not implemented.
  77. RadiusProxy(const RadiusProxy&);
  78. RadiusProxy& operator=(const RadiusProxy&);
  79. };
  80. #endif // PROXY_H