> Question 1 about net-snmp-5.1.2/agent/mibgroup/examples/scalar_int.ch
> As described by
>     http://net-snmp.sourceforge.net/tutorial/agent/04-basic-code.html

Nope.
That tutorial is describing the older v4 (or UCD) MIB module API.
Most of the examples under 'mibgroup/examples' use the newer v5 API.

That works in a different way, and doesn't use REGISTER_MIB etc.
See
        http://www.net-snmp.org/tutorial-5/
                                              instead.



> Quesiton 2:
> I did not find the related function to operation netSnmpExampleInteger.
> why?

Because this example is showing the use of an "internal helper"
that does *all* of the work for you.

See
    http://www.net-snmp.org/tutorial-5/agent/scalar__int_8c-example.html



> Question 3

> These commands work.
> But I didnot find a MIB related the ..../examples/example
> under  /usr/local/share/snmp/mibs after make install
> Why? Whether I can say that a variable or table can work without MIB? 

Because the agent effectively hardcodes the contents of the MIB definitions.
into the code that implements that MIB.
  The MIB file is essentially a design document - it's not needed to
provide the relevant values.

It *is* needed to translate the numeric OIDs etc that SNMP uses
back into "meaningful" textual forms.  But if you're happy to work
with numeric OIDs, and bare values (ignoring display hints, enumerated
values, etc),  then you don't need any MIB files at all.


> Question 4:
> You know my computer is not a fast one. If I changed only one line in
> source code eg "net-snmp-5.1.2/agent/mibgroup/examples/scalar_int.c"
> I have to redo the make and make install for whole net-snmp-5.1.2, right? 

Wrong.
You only need to run "make install" in the 'agent' directory.
And it shouldn't actually recompile most of the files anyway.
As long as nothing else has changed, then it should *only* recompile
'scalar_int.c', recreate the MIB module library, and relink the agent.

It would only recompile everything if you've changed some of the
main header files (or re-run configure).

Dave



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to