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.

130 lines
3.6 KiB

  1. //#--------------------------------------------------------------
  2. //
  3. // File: recvfrompipe
  4. //
  5. // Synopsis: This file holds the declarations of the
  6. // CRecvFromPipe class
  7. //
  8. //
  9. // History: 10/22/97 MKarki Created
  10. //
  11. // Copyright (C) 1997-98 Microsoft Corporation
  12. // All rights reserved.
  13. //
  14. //----------------------------------------------------------------
  15. #ifndef _RECVFROMPIPE_H_
  16. #define _RECVFROMPIPE_H_
  17. #include "vsafilter.h"
  18. #include "packetradius.h"
  19. #include "clients.h"
  20. #include "tunnelpassword.h"
  21. #include "reportevent.h"
  22. class CPreProcessor;
  23. class CRecvFromPipe
  24. {
  25. public:
  26. //
  27. // processess the outbound RADIUS packet received from the
  28. // pipeline
  29. //
  30. HRESULT Process (
  31. /*[in]*/ IRequest *pIRequest
  32. );
  33. //
  34. // constructor
  35. //
  36. CRecvFromPipe(
  37. /*[in]*/ CPreProcessor *pCPreProcessor,
  38. /*[in]*/ CHashMD5 *pCHashMD5,
  39. /*[in]*/ CHashHmacMD5 *pCHashHmacMD5,
  40. /*[in]*/ CClients *pCClients,
  41. /*[in]*/ VSAFilter *pCVSAFilter,
  42. /*[in]*/ CTunnelPassword *pCTunnelPassword,
  43. /*[in]*/ CReportEvent *pCReportEvent
  44. );
  45. //
  46. // destructor
  47. //
  48. virtual ~CRecvFromPipe();
  49. private:
  50. HRESULT GeneratePacketRadius (
  51. /*[out]*/ CPacketRadius **ppCPacketRadius,
  52. /*[in]*/ IAttributesRaw *pIAttributesRaw
  53. );
  54. HRESULT GetOutPacketInfo (
  55. /*[out]*/ PDWORD pdwIPAddress,
  56. /*[out]*/ PWORD pwPort,
  57. /*[out]*/ IIasClient **ppClient,
  58. /*[out]*/ PBYTE pPacketHeader,
  59. /*[in]*/ IAttributesRaw *pIAttributesRaw
  60. );
  61. HRESULT InjectSignatureIfNeeded (
  62. /*[in]*/ PACKETTYPE ePacketType,
  63. /*[in]*/ IAttributesRaw *pIAttributesRaw,
  64. /*[in]*/ CPacketRadius *pCPacketRadius
  65. );
  66. //
  67. // converts the IAS response code to RADIUS packet type
  68. //
  69. HRESULT ConvertResponseToRadiusCode (
  70. LONG iasResponse,
  71. PPACKETTYPE pPacketType,
  72. CPacketRadius *pCPacketRadius
  73. );
  74. //
  75. // split the specific attribute into multiple ones that
  76. // can fit in a packet
  77. //
  78. HRESULT SplitAndAdd (
  79. /*[in]*/ IAttributesRaw *pIAttributesRaw,
  80. /*[in]*/ PIASATTRIBUTE pIasAttribute,
  81. /*[in]*/ IASTYPE iasType,
  82. /*[in]*/ DWORD dwAttributeLength,
  83. /*[in]*/ DWORD dwMaxLength
  84. );
  85. //
  86. // carries out splitting of attributes if required
  87. //
  88. HRESULT SplitAttributes (
  89. /*[in]*/ IAttributesRaw *pIAttributesRaw
  90. );
  91. //
  92. // converts IAS reason code to RADIUS error codes
  93. //
  94. HRESULT CRecvFromPipe::ConvertReasonToRadiusError (
  95. /*[in]*/ LONG iasReason,
  96. /*[out]*/ PRADIUSLOGTYPE pRadError
  97. );
  98. CPreProcessor *m_pCPreProcessor;
  99. CHashMD5 *m_pCHashMD5;
  100. CHashHmacMD5 *m_pCHashHmacMD5;
  101. CClients *m_pCClients;
  102. VSAFilter *m_pCVSAFilter;
  103. CTunnelPassword *m_pCTunnelPassword;
  104. CReportEvent *m_pCReportEvent;
  105. };
  106. #endif // ifndef _RECVFROMPIPE_H_