The growing importance of network management, SNMP is widely used for its simple, flexible features. M1B repository is a collection of resources and attributes in network management,is the core of network ,to access the MIB database, it must be converted into C language. MIB database into C files, first according to certain syntax prepared MIB files, put the new MIB file into the MIB database, and then according to a simple variable or a table variable use the NET-SNMP source package's template conversion converted the MIB file to C file . The experiment proved that this method can quickly and easily convert the MIB file to C file, and converted the C code file format is unified,after a few changes you can recompile the source code to the SNMP package and use it.%网络管理日益重要,SNMP以其简单、灵活的特点而得到广泛应用.MIB库是网络管理中的资源以及属性的集合,是网管的核心,要访问MIB库,必须将其转换成C语言.MIB库转换成C文件,先要按照一定的语法格式编写MIB文件,将新编写的MIB文件放入MIB库中,然后根据是转换简单变量还是表变量使用NET-SNMP源码包自带的模板转换.经实验证明,这种方法能够简单快速地将MIB文件转换成C文件,并且转换后的C文件代码格式统一,经过少量的修改,就可以重新编译到SNMP源码包中使用.
展开▼