zoukankan      html  css  js  c++  java
  • msdn snmp trap 研究可否 重入 转《Multiple Trap Registrations》

    Multiple Trap Registrations

    Several options are available when a WinSNMP application registers a WinSNMP session for traps or notifications. Because of this, an application can call the SnmpRegister function multiple times,

    in effect defining a custom filter for the reception of traps and notifications. For example, you can register for one type of trap or notification, or for all traps and notifications, depending on the value of the notification parameter. Additionally, the application can specify values in other parameters to the SnmpRegister function to further define the traps and notifications that should reach an application. For more information, see Managing Traps and Notifications.

    Following are instances in which multiple calls to SnmpRegister are redundant. In these instances SnmpRegister returns SNMPAPI_SUCCESS if the function completes successfully, but the redundant registration is ineffective.

    1. A call to the SnmpRegister function requesting filtered delivery of traps and notifications to the session, after a previous call toSnmpRegister requesting delivery of all traps and notifications (unfiltered delivery). This call is redundant because the session is already receiving all traps and notifications, including the single type defined by the filter.
    1. A duplicate call to SnmpRegister, or one in which the parameter list is identical to the parameter list in a previous call to SnmpRegisterfor the session.
    1. A call to the SnmpRegister function requesting filtered delivery of traps and notifications based on an object identifier (OID) whose prefix is an OID specified in a previous call to SnmpRegister. For example, you can specify "1.3.6.1.4.1.311" in the notification parameter to receive notifications originating from any Microsoft SNMP agent entity. If you call SnmpRegister again and specify "1.3.6.1.4.1.311.1", the second call is redundant because the session is already receiving all traps and notifications that contain the OID prefix "1.3.6.1.4.1.311".

    To unregister the session, you must match each unique registration call to the SnmpRegister function. Call SnmpRegister to unregister the session, and ensure that the first five parameters to SnmpRegister are identical to those in the initial registration call. The only difference between the initial call and the unregistering call is that when registering you must specify the value SNMPAPI_ON in the status parameter, and when you call the function to unregister, you must specify SNMPAPI_OFF. You do not need to match redundant registration calls to theSnmpRegister function. You need only match the first unique registration call.

    To change filtering criteria, it may be necessary for an application to first unregister and disable delivery of certain traps or notifications. Then the application can create a new filter by calling SnmpRegister, passing appropriate values.

    小结:冗余

  • 相关阅读:
    BIND_MISMATCH导致过多VERSION COUNT的问题
    Using dbms_shared_pool.purge to remove a single task from the library cache
    SQL Server 2012 新的分页函数 OFFSET & FETCH NEXT
    How to delete expired archive log files using rman?
    Oracle利用external table 查看trace文件
    全栈开发经验
    ASP.NET Core教程:使用Supervisor做ASP.NET Core应用程序守护进程
    ASP.NET Core教程:ASP.NET Core程序部署到Linux
    ASP.NET Core教程:ASP.NET Core 程序部署到Windows系统
    C#:窗体传值
  • 原文地址:https://www.cnblogs.com/titer1/p/2290395.html
Copyright © 2011-2022 走看看