No3. net-snmp 使用mib2c命令生成.c和.h文件

[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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值