8 struct snmp_enum_list {
9 struct snmp_enum_list *next;
15 #define SE_MAX_SUBIDS 32 /* needs to be a multiple of 8 */
18 * begin storage definitions
21 * These definitions correspond with the "storid" argument to the API
23 #define SE_LIBRARY_ID 0
25 #define SE_APPLICATION_ID 2
26 #define SE_ASSIGNED_ID 3
29 * library specific enum locations
37 #define SE_ALREADY_THERE 2
40 int init_snmp_enum(void);
41 struct snmp_enum_list *se_find_list(unsigned int major,
43 int se_store_list(struct snmp_enum_list *,
44 unsigned int major, unsigned int minor);
45 struct snmp_enum_list *se_find_list(unsigned int major,
47 int se_find_value(unsigned int major, unsigned int minor,
49 char *se_find_label(unsigned int major, unsigned int minor,
51 int se_add_pair(unsigned int major, unsigned int minor,
52 char *label, int value);
55 * finds a list of enums in a list of enum structs associated by a name.
58 * not as fast as the above routines, since two lists must be traversed.
60 char *se_find_label_in_slist(const char *listname,
62 int se_find_value_in_slist(const char *listname,
64 int se_add_pair_to_slist(const char *listname, char *label,
68 * operates directly on a possibly external list
70 char *se_find_label_in_list(struct snmp_enum_list *list,
72 int se_find_value_in_list(struct snmp_enum_list *list,
74 int se_add_pair_to_list(struct snmp_enum_list **list,
75 char *label, int value);
81 #endif /* SNMP_ENUM_H */