nginx服务器插件之net-snmp-5.6.1.1.tar.gz
nginx服务器安装时用到的插件亲测有效。
代码片段和文件信息
/* Portions of this file are subject to the following copyright(s). See
* the Net-SNMP‘s COPYING file for more details and other copyrights
* that may apply:
*/
/*
* Portions of this file are copyrighted by:
* Copyright ?2003 Sun Microsystems Inc. All rights reserved.
* Use is subject to license terms specified in the COPYING file
* distributed with the Net-SNMP package.
*/
#include
#include
#if HAVE_STRING_H
#include
#endif
#include
#include
#include
static netsnmp_mib_handler *_clone_handler(netsnmp_mib_handler *it);
/***********************************************************************/
/*
* New Handler based API
*/
/***********************************************************************/
/** @defgroup handler Net-SNMP Agent handler and extensibility API
* @ingroup agent
*
* The basic theory goes something like this: In the past with the
* original mib module api (which derived from the original CMU SNMP
* code) the underlying mib modules were passed very little
* information (only the truly most basic information about a
* request). This worked well at the time but in todays world of
* subagents device instrumentation low resource consumption etc
* it just isn‘t flexible enough. “handlers“ are here to fix all that.
*
* With the rewrite of the agent internals for the net-snmp 5.0
* release we introduce a modular calling scheme that allows agent
* modules to be written in a very flexible manner and more
* importantly allows reuse of code in a decent way (and without the
* memory and speed overheads of OO languages like C++).
*
* Functionally the notion of what a handler does is the same as the
* older api: A handler is @link netsnmp_create_handler() created@endlink and
* then @link netsnmp_register_handler() registered@endlink with the main
* agent at a given OID in the OID tree and gets called any time a
* request is made that it should respond to. You probably should
* use one of the convenience helpers instead of doing anything else
* yourself though:
*
* Most importantly though is that the handlers are built on the
* notion of modularity and reuse. Specifically rather than do all
* the really hard work (like parsing table indexes out of an
* incoming oid request) in each module the API is designed to make
* it easy to write “helper“ handlers that merely process some aspect
* of the request before passing it along to the final handler that
* returns the real answer. Most people will want to make use of the
* @link instance instance@endlink @link table table@endlink @link
* table_iterator table_iterator@endlink @link table_data
* table_data@endlink or @link table_dataset table_dataset@endlink
* helpers to make their life easier. These “helpers“ interpert
* important aspects o
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)