Re: confusion reg Baby steps interface in Net-SNMP

2006-03-02 Thread V M Gadag




Hi Dave,

Thanks alot for the input,

Thanks & Regards,
Gadag



On Thu, 2006-03-02 at 19:05, Dave Shield wrote:

On Tue, 2006-02-28 at 17:07 +0530, V M Gadag wrote:
> 1) What is "Baby step" Interface in Net-SNMP? 

It's a framework for implementing MIB modules, that breaks
the basic four-pass model (RESERVE1/RESERVE2/ACTION/COMMIT)
of the Net-SNMP agent into a large number of much smaller steps.

The idea is to allow the MIB implementer to concentrate on
one tightly focused aspect at a time, without having to bother
with the wider picture.   There's a diagram of how this works
in the 'baby_steps.c' file (and somewhere on the web, though
I can't remember where Robert's alternative FAQ is located).

I believe that the baby_steps helper is only currently used
by the Mibs For Dummies framework (MfD), which takes the same
idea a step further, by defining individual routines for each
task on each MIB object separately.

But you're better off asking Robert about this - he's much more
familiar with this framework than I am.   I have a feeling he's
not currently reading the users list (though I could be wrong)
so you might want to ask on the IRC channel.



> 3) Is that mib2c & "Baby Steps Interface" can be used interchangeably?
> if so, what is the difference & similarity between them? 

mib2c is a tool for generating code (using one of a number of
possible approaches).   MfD (which uses the baby_steps helper)
is just one of these.
   It's probably impractical to implement a MIB using the MfD
framework *without* using mib2c to generate this code - since
the whole point is to handle as much as possible automatically.

 
> 4)Is there any other tool or framework ( as generated by mib2c ) in
> Net-Snmp where in i can set / get multiple MIB objects under a single
> switch case?

Some of the other mib2c templates will do this - certainly
mib2c.{container,create-dataset,table_data}.conf will.
Those are all concerned with implementing tables.

For scalar objects, the only real option is mib2c.scalar.conf which
(currently) generates a separate handler for each scalar object. But 
it *is* possible to merge these into one 'scalar_group' handler.
At some point, I'll have to look at providing a mib2c.scalar_group.conf
template.   But don't hold your breath.


If you want to implement several scalars together, the simplest is
probably to generate the multi-handler code file, and I'll show
you how to merge them into one.



> That is I think, I should get the multiple requests in a single
> call to a handler, which will handle get / set cases.

Note that the agent will inherently process each SNMP request
separately.  There may be several varbinds in that request (which
will be passed all together to the relevant handlers).  But if you
have two separate SNMP requests, then they will trigger separate
calls to your MIB handler routine.


Dave


---DISCLAIMER--
The information transmitted herewith is confidential and proprietary information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
---




Re: confusion reg Baby steps interface in Net-SNMP

2006-03-02 Thread Dave Shield
On Tue, 2006-02-28 at 17:07 +0530, V M Gadag wrote:
> 1) What is "Baby step" Interface in Net-SNMP? 

It's a framework for implementing MIB modules, that breaks
the basic four-pass model (RESERVE1/RESERVE2/ACTION/COMMIT)
of the Net-SNMP agent into a large number of much smaller steps.

The idea is to allow the MIB implementer to concentrate on
one tightly focused aspect at a time, without having to bother
with the wider picture.   There's a diagram of how this works
in the 'baby_steps.c' file (and somewhere on the web, though
I can't remember where Robert's alternative FAQ is located).

I believe that the baby_steps helper is only currently used
by the Mibs For Dummies framework (MfD), which takes the same
idea a step further, by defining individual routines for each
task on each MIB object separately.

But you're better off asking Robert about this - he's much more
familiar with this framework than I am.   I have a feeling he's
not currently reading the users list (though I could be wrong)
so you might want to ask on the IRC channel.



> 3) Is that mib2c & "Baby Steps Interface" can be used interchangeably?
> if so, what is the difference & similarity between them? 

mib2c is a tool for generating code (using one of a number of
possible approaches).   MfD (which uses the baby_steps helper)
is just one of these.
   It's probably impractical to implement a MIB using the MfD
framework *without* using mib2c to generate this code - since
the whole point is to handle as much as possible automatically.

 
> 4)Is there any other tool or framework ( as generated by mib2c ) in
> Net-Snmp where in i can set / get multiple MIB objects under a single
> switch case?

Some of the other mib2c templates will do this - certainly
mib2c.{container,create-dataset,table_data}.conf will.
Those are all concerned with implementing tables.

For scalar objects, the only real option is mib2c.scalar.conf which
(currently) generates a separate handler for each scalar object. But 
it *is* possible to merge these into one 'scalar_group' handler.
At some point, I'll have to look at providing a mib2c.scalar_group.conf
template.   But don't hold your breath.


If you want to implement several scalars together, the simplest is
probably to generate the multi-handler code file, and I'll show
you how to merge them into one.



> That is I think, I should get the multiple requests in a single
> call to a handler, which will handle get / set cases.

Note that the agent will inherently process each SNMP request
separately.  There may be several varbinds in that request (which
will be passed all together to the relevant handlers).  But if you
have two separate SNMP requests, then they will trigger separate
calls to your MIB handler routine.


Dave


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
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


confusion reg Baby steps interface in Net-SNMP

2006-02-28 Thread V M Gadag




Hi All,
Can anyone please help me, ( I am very much new to Net-SNMP )

I was just trying to Instrument the Set functionality for some of the MIB objects using the frame work generated by mib2c, & i got the following doubts,

1) What is "Baby step" Interface in Net-SNMP? 
2) Is there anything like, I can replace my implementation of a MIB file using mib2c tool with that of "Baby step Interface" (I don't know what is this )?
3) Is that mib2c & "Baby Steps Interface" can be used interchangeably? if so, what is the difference & similarity between them? 
4)Is there any other tool or framework ( as generated by mib2c ) in Net-Snmp where in i can set / get multiple MIB objects under a single switch case?    That is I think, I should get the multiple requests in a single call to a handler, which will handle get / set cases.

please correct me if I am wrong...

Thanks & Regards,
chetan


---DISCLAIMER--
The information transmitted herewith is confidential and proprietary information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
---