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.

49 lines
1.7 KiB

  1. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  2. /*--------------------------------------------------
  3. Filename: tsent.hpp
  4. Author: B.Rajeev
  5. Purpose: Provides declarations for the TransportSentStateStore class
  6. --------------------------------------------------*/
  7. #ifndef __TRANSPORT_SENT_STATE_STORE
  8. #define __TRANSPORT_SENT_STATE_STORE
  9. #include "common.h"
  10. #include "forward.h"
  11. /*---------------------------------------------------------------
  12. Overview: The SnmpUdpIpTransport must call the SnmpSession instance
  13. back with the status of each transmission attempt. Therefore,
  14. the transport instance registers an error report
  15. (Snmp_Success, Snmp_No_Error) for the transport_frame_id and posts
  16. a SENT_FRAME_EVENT before transmission. This is done in order to
  17. ensure that the sent frame window message is queued before a reply
  18. (and consequently a window message) is received. in case of an
  19. error in transmission, the error report is modified to reflect the
  20. nature of the error. When the SENT_FRAME_EVENT is processed, the
  21. SnmpSession instance is called back with the error report for the
  22. transport_frame_id.
  23. The TransportSentStateStore stores the above mentioned error reports.
  24. -------------------------------------------------------------*/
  25. class TransportSentStateStore
  26. {
  27. typedef CMap<TransportFrameId, TransportFrameId, SnmpErrorReport *, SnmpErrorReport *> Store;
  28. Store store;
  29. public:
  30. void Register(IN TransportFrameId id,
  31. IN const SnmpErrorReport &error_report);
  32. void Modify(IN TransportFrameId id,
  33. IN const SnmpErrorReport &error_report);
  34. SnmpErrorReport Remove(IN TransportFrameId id);
  35. ~TransportSentStateStore(void);
  36. };
  37. #endif // __TRANSPORT_SENT_STATE_STORE