Difference between revisions of "Template:FAQ:Coding 12"
From Net-SNMP Wiki
m (5.4 release synchronisation) |
|||
Line 1: | Line 1: | ||
+ | <!-- NB: | ||
+ | There is a mismatch between the template numbering | ||
+ | for this entry, and the FAQ entries that refer to it. | ||
+ | This follows a review of the entries in the | ||
+ | Coding section. | ||
+ | --> | ||
If you're using the main source tree to compile your new module, then | If you're using the main source tree to compile your new module, then | ||
put these two files (<CODE>mymib.[ch]</CODE>) in the directory <CODE>'agent/mibgroup'</CODE>. | put these two files (<CODE>mymib.[ch]</CODE>) in the directory <CODE>'agent/mibgroup'</CODE>. |
Revision as of 13:48, 29 December 2006
If you're using the main source tree to compile your new module, then
put these two files (mymib.[ch]
) in the directory 'agent/mibgroup'
.
You should then re-run configure to add in your new module
("configure --with-mib-modules=mymib"
) and recompile.
If you've got a number of new modules to add, it might be
sensible to put them all into a single subdirectory of 'mibgroup'
.
Then create a header file, listing the individual components.
This might look something like:
config_require(mymib/myObjects) config_require(mymib/myTable) config_require(mymib/myOtherTable)
If this was saved as the file 'mymib.h'
, then the same configure
line given above, would pull in all three modules. See the
current contents of 'agent/mibgroup'
for examples of this.