[ First - *please* don't mail me privately, without copying
any responses to the mailing list.  I don't have the time     or
inclination to offer private, unpaid, SNMP consultancy.     Keep
discussions to the list, where others can both learn     and offer
advice.  Thanks.   ]
2011/12/30 朱飞 <zhufe...@gmail.com>:
> Dear Dave,
>     Thank you very much for your kind reply. In fact, I used the tool
> 'mib2c' to generate the code, and I found that every trap had its own
> function which can't be used directly.

The mib2c.notify.conf template generates code based on a separate
routine for each notification - yes.   But if you can sensibly combine
two or more routines into one (perhaps with a minor tweak to the
parameters), then you are perfectly free to do so.
   I'm not quite sure what you mean by "can't be used directly", but
the output of mib2c is only ever intended as a starting point for your
code.   It doesn't claim to be the finished product.


>                            In every trap's function we should
> give the value to each of its binding event, does this mean that I can use a
> common trap for all of the events? Every time, the alarm event happened, I
> sent the event into this common trap.

It's impossible to answer that question - you still haven't said anything
about what these traps are reporting, or what information you need to
include with them.


>                         If can't, can you send me a standard
> trap, including trap message and mib if you can.

There is no such thing as a universal "standard trap".
The whole idea of a trap is that it is reporting a particular type of event
(e.g. a network interface going up or down,   an unauthorised access,
or a monitored value going out of range)
   A given trap is specific to a particular type of event.
You can't meaningfully have a standard trap that is applicable to "anything".


You need to give us more details about what you are trying to do here.
What would be a typical scenario in which you would need to send
one of these traps.

Dave

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to