Difference between revisions of "Template:FAQ:Coding 10"

From Net-SNMP Wiki
Jump to: navigation, search
 
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
 +
  Perl section.
 +
-->
 
This uses a very powerful tool called a "text editor" :-)
 
This uses a very powerful tool called a "text editor" :-)
  
The v5 Net-SNMP mib2c tool uses separate configuration files to
+
The v5 Net-SNMP <CODE>mib2c</CODE> tool uses separate configuration
 +
files to
 
generate code for scalar objects, and for tables.  This means that
 
generate code for scalar objects, and for tables.  This means that
 
it's not possible to automatically generate a single code file
 
it's not possible to automatically generate a single code file

Revision as of 23:33, 28 December 2006

This uses a very powerful tool called a "text editor" :-)

The v5 Net-SNMP mib2c tool uses separate configuration files to generate code for scalar objects, and for tables. This means that it's not possible to automatically generate a single code file that supports both scalars and tables.

Instead, the two code files need to be generated separately, and then combined manually. The handler and supporting routines from one file can simply be included in the other with no changes needed. The corresponding registration of these handlers can then be copied from the first initialisation routine into the second.