Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于那些尝试使用 net-snmp 库的人,如何添加新的 mib 模块?到目前为止,我所做的是使用 mib2c 命令生成模板 newmodule.c 和 newmodule.h 文件。现在,我不知道在启动 net-snmp 应用程序期间在哪里放置 init_newmodule() 函数来注册新的 mib?
谢谢!
在您的 snmpd.conf 中,添加:
dlmod myNewModule /path/to/libnewmodule.so
这将加载 libnewmodule.so 并调用 init_myNewModule()。