2 * For compatibility with applications built using
3 * previous versions of the UCD library only.
6 #include <net-snmp/net-snmp-config.h>
8 #include <net-snmp/types.h>
9 #include <net-snmp/session_api.h>
10 #include <net-snmp/config_api.h>
11 #include <net-snmp/library/mib.h> /* for OID O/P format enums */
13 #ifdef BRCM_SNMP_NOT_USED
15 * use <netsnmp_session *)->s_snmp_errno instead
20 return SNMPERR_SUCCESS;
24 * synch_reset and synch_setup are no longer used.
27 snmp_synch_reset(netsnmp_session * notused)
31 snmp_synch_setup(netsnmp_session * notused)
34 #endif /* BRCM_SNMP_NOT_USED */
37 snmp_set_dump_packet(int x)
39 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
40 NETSNMP_DS_LIB_DUMP_PACKET, x);
43 #ifdef BRCM_SNMP_NOT_USED
45 snmp_get_dump_packet(void)
47 return netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
48 NETSNMP_DS_LIB_DUMP_PACKET);
52 snmp_set_quick_print(int x)
54 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
55 NETSNMP_DS_LIB_QUICK_PRINT, x);
58 #ifdef BRCM_SNMP_NOT_USED
60 snmp_get_quick_print(void)
62 return netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
63 NETSNMP_DS_LIB_QUICK_PRINT);
68 snmp_set_suffix_only(int x)
70 netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID,
71 NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, x);
75 snmp_get_suffix_only(void)
77 return netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID,
78 NETSNMP_DS_LIB_OID_OUTPUT_FORMAT);
82 snmp_set_full_objid(int x)
84 netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT,
85 NETSNMP_OID_OUTPUT_FULL);
89 snmp_get_full_objid(void)
91 return (NETSNMP_OID_OUTPUT_FULL ==
92 netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT));
96 snmp_set_random_access(int x)
98 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
99 NETSNMP_DS_LIB_RANDOM_ACCESS, x);
103 snmp_get_random_access(void)
105 return netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
106 NETSNMP_DS_LIB_RANDOM_ACCESS);
110 snmp_set_mib_errors(int err)
112 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
113 NETSNMP_DS_LIB_MIB_ERRORS, err);
117 snmp_set_mib_warnings(int warn)
119 netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID,
120 NETSNMP_DS_LIB_MIB_WARNINGS, warn);
124 snmp_set_save_descriptions(int save)
126 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
127 NETSNMP_DS_LIB_SAVE_MIB_DESCRS, save);
131 snmp_set_mib_comment_term(int save)
134 * 0=strict, 1=EOL terminated
136 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
137 NETSNMP_DS_LIB_MIB_COMMENT_TERM, save);
141 snmp_set_mib_parse_label(int save)
144 * 0=strict, 1=underscore OK in label
146 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
147 NETSNMP_DS_LIB_MIB_PARSE_LABEL, save);
151 ds_set_boolean (int storeid, int which, int value)
153 return netsnmp_ds_set_boolean(storeid, which, value);
157 ds_get_boolean (int storeid, int which)
159 return netsnmp_ds_get_boolean(storeid, which);
163 ds_toggle_boolean (int storeid, int which)
165 return netsnmp_ds_toggle_boolean(storeid, which);
169 ds_set_int (int storeid, int which, int value)
171 return netsnmp_ds_set_int(storeid, which, value);
175 ds_get_int (int storeid, int which)
177 return netsnmp_ds_get_int(storeid, which);
182 ds_set_string (int storeid, int which, const char *value)
184 return netsnmp_ds_set_string(storeid, which, value);
188 ds_get_string (int storeid, int which)
190 return netsnmp_ds_get_string(storeid, which);
194 ds_set_void (int storeid, int which, void *value)
196 return netsnmp_ds_set_void(storeid, which, value);
200 ds_get_void (int storeid, int which)
202 return netsnmp_ds_get_void(storeid, which);
206 ds_register_config (u_char type, const char *ftype,
207 const char *token, int storeid, int which)
209 return netsnmp_ds_register_config(type, ftype, token, storeid, which);
213 ds_register_premib (u_char type, const char *ftype,
214 const char *token, int storeid, int which)
216 return netsnmp_ds_register_premib(type, ftype, token, storeid, which);
222 netsnmp_ds_shutdown();
225 #endif /* BRCM_SNMP_NOT_USED */