2 ######################################################################
4 ######################################################################
6 *** Warning: only generating code for nodes of MIB type INTEGER
9 * Note: this file originally auto-generated by mib2c using
10 * $Id: mib2c.int_watch.conf,v 1.2 2002/07/17 14:41:53 dts12 Exp $
15 /* function declarations */
16 void init_$name(void);
18 #endif /* $name.uc_H */
19 ######################################################################
21 ######################################################################
24 * Note: this file originally auto-generated by mib2c using
25 * $Id: mib2c.int_watch.conf,v 1.2 2002/07/17 14:41:53 dts12 Exp $
28 #include <net-snmp/net-snmp-config.h>
29 #include <net-snmp/net-snmp-includes.h>
30 #include <net-snmp/agent/net-snmp-agent-includes.h>
33 /* the variable we want to tie an OID to. The agent will handle all
34 * GET and SET requests to this variable changing its value as needed.
38 @if $i.type eq "ASN_INTEGER"@
39 static int $i = 0; /* XXX: set default value */
44 * our initialization routine, automatically called by the agent
45 * (to get called, the function name must match init_FILENAME())
51 @if $i.type eq "ASN_INTEGER"@
52 static oid ${i}_oid[] = { $i.commaoid, 0 };
57 * a debugging statement. Run the agent with -D$name to see
58 * the output of this debugging statement.
60 DEBUGMSGTL(("$name", "Initializing the $name module\n"));
64 * the line below registers our variables defined above as
65 * accessible and makes them writable. A read only version of any
66 * of these registrations would merely call
67 * register_read_only_int_instance() instead. The functions
68 * called below should be consistent with your MIB, however.
70 * If you wanted a callback when the value was retrieved or set
71 * (even though the details of doing this are handled for you),
72 * you could change the NULL pointer below to a valid handler
76 @if $i.type eq "ASN_INTEGER"@
78 "Initializing $i scalar integer. Default value = %d\n",
81 netsnmp_register_int_instance("$i",
87 netsnmp_register_read_only_int_instance("$i",
96 "Done initalizing $name module\n"));