On tis, 2008-05-20 at 13:33 +0800, Tewen Hsieh wrote:
> Hi Magnus,
>
> Thanks for your reply.
> Is this method also feasible for template codes generated from a table
> (mib2c -c mib2c.mfd.conf xxxtable).
> How can I modify it?
It should work, just replace
> I use mib2c to generate tempalate codes. ==> mib2c -c mib2c.mfd.conf
> vdslLineTable
> Then I got following files:
>
> vdslLineTable-README-FIRST.txt
> vdslLineTable-README-vdslLineTable.txt
> vdslLineTable.c
> vdslLineTable.h
> vdslLineTable_data_access.c
> vdslLineTable_data_access.h
> vdslLineTable_data_get.c
> vdslLineTable_data_get.h
> vdslLineTable_data_set.c
> vdslLineTable_data_set.h
> vdslLineTable_enums.h
> vdslLineTable_interface.c
> vdslLineTable_interface.h
> vdslLineTable_oids.h
>
> These files are expected when we run "mib2c -c mib2c.mfd.conf xxxtable".
> So I think there should be a template makefile can be referenced.
I just tried to run "mib2c -c mib2c.mfd.conf smuxTreeTable" and one of
the questions that I got was:
===
Do you want a makefile and AgentX subagent source file generated?
This will let you test your table without having to link it into
snmpd. (You can still link it in later.)
1) do not generate makefile/AgentX code [DEFAULT]
2) generate makefile/AgentX code
===
so for the mfd helper there is support for makefile generation, even if
I admit to not agree with all choices made in the makefile - I think it
would have been better to have the makefile contain
$(TARGET): $(SOURCES)
net-snmp-config --compile-subagent $@ $(SOURCES)
but that is me.
Oh yes, the reason that the makefile doesn't contain the commands to
generate the shared object is that they vary pretyy wildly between
systems, the one I gave you is valid for linux systems. See libtool for
more on this.
/MF
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders