Re: Watcher: what is it?

2007-12-10 Thread Magnus Fromreide
On mån, 2007-12-10 at 09:49 +, Dave Shield wrote: > On 08/12/2007, Giuseppe Modugno <[EMAIL PROTECTED]> wrote: > > Thanks Dave, your explanation is very clear, but I can't find a real > > situation > > where a "watcher" helper could help. > > > It's difficult to have a situation where the OID

Creating an SNMP agent using personal MIBs

2007-12-10 Thread Leif Pitcock
I have created an SNMP Agent using the example-daemon code as a go by and making it a master agent implementing the mib2c code I converted into a class for a personal mib.When I initialize the SNMP agent and then deinitialize the agent, I can't start up the agent again without shutting down

Re: Handler: netsnmp_request_info parameter

2007-12-10 Thread Dave Shield
On 10/12/2007, Giuseppe Modugno <[EMAIL PROTECTED]> wrote: > Scalar helper is based on instance handler, so it is serialized too. > Is it correct? Err... probably, yes. > > > When I register a custom scalar or a group of scalar, what should I write > > > in > > > the MODE_GET case (but also in

Re: Handler: netsnmp_request_info parameter

2007-12-10 Thread Giuseppe Modugno
2007/12/10, Dave Shield <[EMAIL PROTECTED]>: > On 10/12/2007, Giuseppe Modugno <[EMAIL PROTECTED]> wrote: > > The fourth parameter of an handler is netsnmp_request_info type. > > This appears as a list of requests > > Correct. > This is the list of varbinds from the incoming request that are > rele

Re: Handler: netsnmp_request_info parameter

2007-12-10 Thread Dave Shield
On 10/12/2007, Giuseppe Modugno <[EMAIL PROTECTED]> wrote: > The fourth parameter of an handler is netsnmp_request_info type. > This appears as a list of requests Correct. This is the list of varbinds from the incoming request that are relevant to this particular handler. > Another field is 'net

Handler: netsnmp_request_info parameter

2007-12-10 Thread Giuseppe Modugno
The fourth parameter of an handler is netsnmp_request_info type. This appears as a list of requests, in fact there are 'next' and 'prev' field. Another field is 'netsnmp_variable_list *requestvb' that is a list of variable bindings. I don't understand why there are two lists: requests (netsnmp_re

Handler: netsnmp_request_info parameter

2007-12-10 Thread Giuseppe Modugno
The fourth parameter of an handler is netsnmp_request_info type. This appears as a list of requests, in fact there are 'next' and 'prev' field. Another field is 'netsnmp_variable_list *requestvb' that is a list of variable bindings. I don't understand why there are two lists: requests (netsnmp_re

Re: Handler in the netsnmp_handler_registration struct or elsewhere?

2007-12-10 Thread Dave Shield
On 10/12/2007, Giuseppe Modugno <[EMAIL PROTECTED]> wrote: > I'm reading watcher code and I found the following: > whandler = netsnmp_get_watcher_handler(); > netsnmp_inject_handler(reginfo, whandler); > return netsnmp_register_scalar(reginfo); > The injected handler is whan

Implementing tables using 'pass'

2007-12-10 Thread Ben Nizette
Hi all, Being very new to snmp I'm struggling a little with an mfd table at the moment. The table is very very simple, if I have the fully qualified OID then simple external code can return the value without a problem. Processing of getnext shouldn't be hard either, so long as I know how a table

Handler in the netsnmp_handler_registration struct or elsewhere?

2007-12-10 Thread Giuseppe Modugno
I'm reading watcher code and I found the following: --- int netsnmp_register_watched_scalar(netsnmp_handler_registration *reginfo, netsnmp_watcher_info *watchinfo) { netsnmp_mib_handler *whandler; whandler = netsnmp_get_watcher_handler();

Re: Watcher: what is it?

2007-12-10 Thread Dave Shield
On 08/12/2007, Giuseppe Modugno <[EMAIL PROTECTED]> wrote: > Thanks Dave, your explanation is very clear, but I can't find a real situation > where a "watcher" helper could help. > It's difficult to have a situation where the OID variable is really the > variable > of the agent process... isn't i