[root@localhost snmp.yu]# mib2c QS /*我添加的注释,mib2c 是条命令,QS 是在MIB文件中定义的节点名*/
writing to -
mib2c has multiple configuration filesdepending on the type of
code you need to write. You must pick one depending on your need.
You requested mib2c to be run on thefollowing part of the MIB tree:
OID: QS
numeric translation: .1.3.6.1.4.1.3002
number of scalars within: 1
number of tables within: 0
number of notifications within: 0
First,do you want to generate code that is compatible with the
ucd-snmp 4.X line of code, or code forthe newer Net-SNMP 5.X code
base (which provides a much greaterchoice of APIs to pick from):
1) ucd-snmp style code
2) Net-SNMP style code
Select your choice: 2 /*我添加的注释,选2,因为我们装的就是2*/
**********************************************************************
GENERATING CODE FORSCALAR OBJECTS:
**********************************************************************
It looks like you have some scalars in the mib you requested, so I
will now generate code for them if you wish. You have two choices
for scalar API styles currently. Pick between them, or choose not
to generate any code for the scalars:
1) If you're writing code for some genericscalars
(by hand use: "mib2c -c mib2c.scalar.conf QS")
2) If you want to magically "tie"integer variables to integer
scalars
(by hand use: "mib2c -c mib2c.int_watch.conf QS")
3) Don't generate any code for the scalars
Selectyour choice: 2
using the mib2c.int_watch.conf configuration file to generate your code.
*** Warning: only generating code fornodes of MIB type INTEGER
writing to QS.h
writing to QS.c
**********************************************************************
* NOTE WELL: The code generated bymib2c is only a template. *YOU* *
* must fill in the code before it'llwork most of the time. In many *
* cases, spots that MUST be editedwithin the files are marked with *
* /* XXX */ or /* TODO */comments. *
**********************************************************************
running indent on QS.c /*我添加的注释,生成了.c 文件,这里包含响应函数。*/
running indent on QS.h