Net-snmp网站确实有全面的编码教程。 请查看 http://www.net-snmp.org/wiki/index.php/Tutorials#Coding_Tutorials 编辑: 另请参阅源代码以获取snmptrapd接收陷阱的指南。