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.

77 lines
3.2 KiB

  1. #ifndef _INC_WSNMPEXT
  2. #define _INC_WSNMPEXT
  3. //
  4. // wsnmpext.h
  5. //
  6. // Externals include for NetPlus WinSNMP
  7. // Copyright 1995-1997 ACE*COMM Corp
  8. // Rleased to Microsoft under Contract
  9. // Beta 1 version, 970228
  10. // Bob Natale ([email protected])
  11. //
  12. //
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. extern TASK TaskData;
  17. extern SNMPTD SessDescr;
  18. extern SNMPTD PDUsDescr;
  19. extern SNMPTD VBLsDescr;
  20. extern SNMPTD EntsDescr;
  21. extern SNMPTD CntxDescr;
  22. extern SNMPTD MsgDescr;
  23. extern SNMPTD TrapDescr;
  24. extern SNMPTD AgentDescr;
  25. extern CRITICAL_SECTION cs_TASK;
  26. extern CRITICAL_SECTION cs_SESSION;
  27. extern CRITICAL_SECTION cs_PDU;
  28. extern CRITICAL_SECTION cs_VBL;
  29. extern CRITICAL_SECTION cs_ENTITY;
  30. extern CRITICAL_SECTION cs_CONTEXT;
  31. extern CRITICAL_SECTION cs_MSG;
  32. extern CRITICAL_SECTION cs_TRAP;
  33. extern CRITICAL_SECTION cs_AGENT;
  34. extern CRITICAL_SECTION cs_XMODE;
  35. extern SNMPAPI_STATUS SaveError(HSNMP_SESSION hSession, SNMPAPI_STATUS nError);
  36. extern SNMPAPI_STATUS snmpAllocTable(LPSNMPTD table);
  37. extern SNMPAPI_STATUS SNMPAPI_CALL SnmpIpxAddressToStr (LPBYTE, LPBYTE, LPSTR);
  38. extern BOOL BuildMessage (smiUINT32 version, smiLPOCTETS community,
  39. LPPDUS pdu, smiINT32 dllReqId, smiLPBYTE *msgAddr, smiLPUINT32 msgSize);
  40. extern smiUINT32 ParseMessage (smiLPBYTE msgPtr, smiUINT32 msgLen, smiLPUINT32 version, smiLPOCTETS *community, LPPDUS pdu);
  41. extern void FreeMsg (DWORD nMsg);
  42. extern void FreeOctetString (smiLPOCTETS os_ptr);
  43. extern void FreeVarBind (LPVARBIND vb_ptr);
  44. extern void FreeVarBindList (LPVARBIND vb_ptr);
  45. extern void FreeV1Trap (LPV1TRAP v1Trap_ptr);
  46. extern SNMPAPI_STATUS CheckRange (DWORD index, LPSNMPTD block);
  47. //-----------------------------------------------------------------
  48. // snmpInitTableDescr - initializes the table descriptor with the
  49. // parameters given as arguments. Creates and zeroes a first chunck of table.
  50. extern SNMPAPI_STATUS snmpInitTableDescr(/*in*/LPSNMPTD pTableDescr, /*in*/DWORD dwBlocksToAdd, /*in*/DWORD dwBlockSize);
  51. //-----------------------------------------------------------------
  52. // snmpFreeTableDescr - releases any memory allocated for the table
  53. extern VOID snmpFreeTableDescr(/*in*/LPSNMPTD pTableDescr);
  54. //-----------------------------------------------------------------
  55. // snmpAllocTableEntry - finds an empty entry into the table. If none
  56. // already exists, table is enlarged.
  57. extern SNMPAPI_STATUS snmpAllocTableEntry(/*in*/LPSNMPTD pTableDescr, /*out*/LPDWORD pIndex);
  58. //-----------------------------------------------------------------
  59. // snmpFreeTableEntry - free the location at index dwIndex from the
  60. // table described by pTableDescr.
  61. extern SNMPAPI_STATUS snmpFreeTableEntry(/*in*/LPSNMPTD pTableDescr, /*in*/DWORD dwIndex);
  62. //-----------------------------------------------------------------
  63. // snmpGetTableEntry - returns the entry at zero-based index dwIndex
  64. // from the table described by pTableDescr
  65. extern PVOID snmpGetTableEntry(/*in*/LPSNMPTD pTableDescr, /*in*/DWORD dwIndex);
  66. //-----------------------------------------------------------------
  67. // snmpValidTableEntry - returns TRUE or FALSE as an entry in the table
  68. // has valid data (is allocated) or not
  69. extern BOOL snmpValidTableEntry(/*in*/LPSNMPTD pTableDescr, /*in*/DWORD dwIndex);
  70. #ifdef __cplusplus
  71. }
  72. #endif
  73. #endif