Netsnmp 使用dlmod安装oid节点库

1,引入

        netsnmp-5.9.1使用snmpd.conf中可以使用dlmod去动态加载我们自己的oid节点库,这看起来很通用和灵活,这次就在官网上找了个例子简单的验证了一下这个功能。

2,netsnmp-5.9.1编译

编译选项:
    ./configure --prefix=/home/net-snmp-5.9.1/installs --enable-shared --disable-static --with-defaults --enable-applications --disable-ipv6 --without-libwrap --without-rpm --without-zlib --disable-embedded-perl --disable-as-needed --without-perl-modules --with-mib-modules=ucd_snmp

注:
    必须的选项:--enable-shared  --with-mib-modules=ucd_snmp (ucd支持)


make && make install

3,在官网获取example文件

TUT:Writing a Dynamically Loadable Object - Net-SNMP Wiki

 mib库也在其中下载:NET-SNMP-TUTORIAL-MIB.txt

 nstAgentPluginObject.h

/*
 * Note: this file originally auto-generated by mib2c using
 *        : mib2c.int_watch.conf,v 5.0 2002/04/20 07:30:13 hardaker Exp $
 */
#ifndef NSTAGENTPLUGINOBJECT_H
#define NSTAGENTPLUGINOBJECT_H

/*
 * function declarations 
 */
void            init_nstAgentPluginObject(void);

#endif        
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值