2 * Template MIB group interface - example.h
7 * Don't include ourselves twice
9 #ifndef _MIBGROUP_EXAMPLE_H
10 #define _MIBGROUP_EXAMPLE_H
13 * We use 'header_generic' from the util_funcs module,
14 * so make sure this module is included in the agent.
16 config_require(util_funcs)
20 * Declare our publically-visible functions.
21 * Typically, these will include the initialization and shutdown functions,
22 * the main request callback routine and any writeable object methods.
24 * Function prototypes are provided for the callback routine ('FindVarMethod')
25 * and writeable object methods ('WriteMethod').
27 extern void init_example(void);
28 extern FindVarMethod var_example;
29 extern WriteMethod write_exampleint;
30 extern WriteMethod write_exampletrap;
31 extern WriteMethod write_exampletrap2;
35 * Magic number definitions.
36 * These must be unique for each object implemented within a
37 * single mib module callback routine.
39 * Typically, these will be the last OID sub-component for
40 * each entry, or integers incrementing from 1.
41 * (which may well result in the same values anyway).
43 * Here, the second and third objects are form a 'sub-table' and
44 * the magic numbers are chosen to match these OID sub-components.
45 * This is purely for programmer convenience.
46 * All that really matters is that the numbers are unique.
49 #define EXAMPLESTRING 1
50 #define EXAMPLEINTEGER 21
51 #define EXAMPLEOBJECTID 22
52 #define EXAMPLETIMETICKS 3
53 #define EXAMPLEIPADDRESS 4
54 #define EXAMPLECOUNTER 5
55 #define EXAMPLEGAUGE 6
56 #define EXAMPLETRIGGERTRAP 7
57 #define EXAMPLETRIGGERTRAP2 8
59 #endif /* _MIBGROUP_EXAMPLE_H */