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.

67 lines
1.6 KiB

  1. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  2. /*--------------------------------------------------
  3. Filename: tsess.hpp
  4. Author: B.Rajeev
  5. Purpose: Provides declarations for the TransportSession class
  6. --------------------------------------------------*/
  7. #ifndef __TRANSPORT_SESSION__
  8. #define __TRANSPORT_SESSION__
  9. #include "wsess.h"
  10. class WinSnmpVariables
  11. {
  12. public:
  13. HSNMP_ENTITY m_SrcEntity ;
  14. HSNMP_ENTITY m_DstEntity ;
  15. HSNMP_CONTEXT m_Context ;
  16. HSNMP_PDU m_Pdu;
  17. HSNMP_VBL m_Vbl;
  18. ULONG m_RequestId ;
  19. } ;
  20. /*---------------------------------------------------------------
  21. Overview: The TransportSession class provides an abstraction for a
  22. WinSNMP session and a window message queue (both are available through
  23. the WinSnmpSession class). The SnmpUdpIpTransport class uses it
  24. for services such as sending a PDU, posting window messages for
  25. internal events and receiving a reply and notifying the
  26. SnmpUdpIpTransport instance ("owner") of the receipt as well
  27. as internal events.
  28. -------------------------------------------------------------*/
  29. class TransportWindow : public Window
  30. {
  31. SnmpImpTransport &owner;
  32. HSNMP_SESSION m_Session ;
  33. // over-rides the HandleEvent method provided by the
  34. // WinSnmpSession. Receives the Pdu and passes it to
  35. // the owner (SnmpTransport)
  36. LONG_PTR HandleEvent (
  37. HWND hWnd ,
  38. UINT message ,
  39. WPARAM wParam ,
  40. LPARAM lParam
  41. );
  42. BOOL ReceivePdu ( SnmpPdu &a_Pdu ) ;
  43. public:
  44. TransportWindow (
  45. SnmpImpTransport &owner
  46. );
  47. ~TransportWindow () ;
  48. BOOL SendPdu ( SnmpPdu &a_Pdu ) ;
  49. };
  50. #endif // __TRANSPORT_SESSION__