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.

132 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1992-1996 Microsoft Corporation
  3. Module Name:
  4. testdll.c
  5. Abstract:
  6. LAN Manager MIB 2 Extension Agent DLL.
  7. Environment:
  8. User Mode - Win32
  9. Revision History:
  10. 10-May-1996 DonRyan
  11. Removed banner from Technology Dynamics, Inc.
  12. --*/
  13. //--------------------------- WINDOWS DEPENDENCIES --------------------------
  14. #include <windows.h>
  15. //--------------------------- STANDARD DEPENDENCIES -- #include<xxxxx.h> ----
  16. //#include <stdio.h>
  17. //--------------------------- MODULE DEPENDENCIES -- #include"xxxxx.h" ------
  18. #include <snmp.h>
  19. #include <snmputil.h>
  20. #include "hash.h"
  21. #include "mib.h"
  22. //--------------------------- SELF-DEPENDENCY -- ONE #include"module.h" -----
  23. //--------------------------- PUBLIC VARIABLES --(same as in module.h file)--
  24. //--------------------------- PRIVATE CONSTANTS -----------------------------
  25. //--------------------------- PRIVATE STRUCTS -------------------------------
  26. //--------------------------- PRIVATE VARIABLES -----------------------------
  27. DWORD timeZero = 0;
  28. //--------------------------- PRIVATE PROTOTYPES ----------------------------
  29. //--------------------------- PRIVATE PROCEDURES ----------------------------
  30. //--------------------------- PUBLIC PROCEDURES -----------------------------
  31. BOOL DllEntryPoint(
  32. HANDLE hDll,
  33. DWORD dwReason,
  34. LPVOID lpReserved)
  35. {
  36. switch(dwReason)
  37. {
  38. case DLL_PROCESS_ATTACH:
  39. case DLL_PROCESS_DETACH:
  40. case DLL_THREAD_ATTACH:
  41. case DLL_THREAD_DETACH:
  42. default:
  43. break;
  44. } // end switch()
  45. return TRUE;
  46. } // end DllEntryPoint()
  47. BOOL SnmpExtensionInit(
  48. IN DWORD timeZeroReference,
  49. OUT HANDLE *hPollForTrapEvent,
  50. OUT AsnObjectIdentifier *supportedView)
  51. {
  52. // record time reference from extendible agent
  53. timeZero = timeZeroReference;
  54. // setup trap notification
  55. *hPollForTrapEvent = NULL;
  56. // tell extendible agent what view this extension agent supports
  57. *supportedView = MIB_OidPrefix; // NOTE! structure copy
  58. // Initialize MIB access hash table
  59. MIB_HashInit();
  60. return TRUE;
  61. } // end SnmpExtensionInit()
  62. BOOL SnmpExtensionTrap(
  63. OUT AsnObjectIdentifier *enterprise,
  64. OUT AsnInteger *genericTrap,
  65. OUT AsnInteger *specificTrap,
  66. OUT AsnTimeticks *timeStamp,
  67. OUT RFC1157VarBindList *variableBindings)
  68. {
  69. return FALSE;
  70. } // end SnmpExtensionTrap()
  71. // This function is implemented in file RESOLVE.C
  72. #if 0
  73. BOOL SnmpExtensionQuery(
  74. IN BYTE requestType,
  75. IN OUT RFC1157VarBindList *variableBindings,
  76. OUT AsnInteger *errorStatus,
  77. OUT AsnInteger *errorIndex)
  78. {
  79. } // end SnmpExtensionQuery()
  80. #endif
  81. //-------------------------------- END --------------------------------------