00001
00002
00003
00004
00005
00006 #include <net-snmp/net-snmp-config.h>
00007
00008 #include <net-snmp/types.h>
00009 #include <net-snmp/session_api.h>
00010 #include <net-snmp/config_api.h>
00011 #include <net-snmp/library/mib.h>
00012
00013
00014
00015
00016 int
00017 snmp_get_errno(void)
00018 {
00019 return SNMPERR_SUCCESS;
00020 }
00021
00022
00023
00024
00025 void
00026 snmp_synch_reset(netsnmp_session * notused)
00027 {
00028 }
00029 void
00030 snmp_synch_setup(netsnmp_session * notused)
00031 {
00032 }
00033
00034
00035 void
00036 snmp_set_dump_packet(int x)
00037 {
00038 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
00039 NETSNMP_DS_LIB_DUMP_PACKET, x);
00040 }
00041
00042 int
00043 snmp_get_dump_packet(void)
00044 {
00045 return netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
00046 NETSNMP_DS_LIB_DUMP_PACKET);
00047 }
00048
00049 void
00050 snmp_set_quick_print(int x)
00051 {
00052 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
00053 NETSNMP_DS_LIB_QUICK_PRINT, x);
00054 }
00055
00056 int
00057 snmp_get_quick_print(void)
00058 {
00059 return netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
00060 NETSNMP_DS_LIB_QUICK_PRINT);
00061 }
00062
00063
00064 void
00065 snmp_set_suffix_only(int x)
00066 {
00067 netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID,
00068 NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, x);
00069 }
00070
00071 int
00072 snmp_get_suffix_only(void)
00073 {
00074 return netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID,
00075 NETSNMP_DS_LIB_OID_OUTPUT_FORMAT);
00076 }
00077
00078 void
00079 snmp_set_full_objid(int x)
00080 {
00081 netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT,
00082 NETSNMP_OID_OUTPUT_FULL);
00083 }
00084
00085 int
00086 snmp_get_full_objid(void)
00087 {
00088 return (NETSNMP_OID_OUTPUT_FULL ==
00089 netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT));
00090 }
00091
00092 void
00093 snmp_set_random_access(int x)
00094 {
00095 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
00096 NETSNMP_DS_LIB_RANDOM_ACCESS, x);
00097 }
00098
00099 int
00100 snmp_get_random_access(void)
00101 {
00102 return netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
00103 NETSNMP_DS_LIB_RANDOM_ACCESS);
00104 }
00105
00106 void
00107 snmp_set_mib_errors(int err)
00108 {
00109 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
00110 NETSNMP_DS_LIB_MIB_ERRORS, err);
00111 }
00112
00113 void
00114 snmp_set_mib_warnings(int warn)
00115 {
00116 netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID,
00117 NETSNMP_DS_LIB_MIB_WARNINGS, warn);
00118 }
00119
00120 void
00121 snmp_set_save_descriptions(int save)
00122 {
00123 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
00124 NETSNMP_DS_LIB_SAVE_MIB_DESCRS, save);
00125 }
00126
00127 void
00128 snmp_set_mib_comment_term(int save)
00129 {
00130
00131
00132
00133 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
00134 NETSNMP_DS_LIB_MIB_COMMENT_TERM, save);
00135 }
00136
00137 void
00138 snmp_set_mib_parse_label(int save)
00139 {
00140
00141
00142
00143 netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
00144 NETSNMP_DS_LIB_MIB_PARSE_LABEL, save);
00145 }
00146
00147 int
00148 ds_set_boolean (int storeid, int which, int value)
00149 {
00150 return netsnmp_ds_set_boolean(storeid, which, value);
00151 }
00152
00153 int
00154 ds_get_boolean (int storeid, int which)
00155 {
00156 return netsnmp_ds_get_boolean(storeid, which);
00157 }
00158
00159 int
00160 ds_toggle_boolean (int storeid, int which)
00161 {
00162 return netsnmp_ds_toggle_boolean(storeid, which);
00163 }
00164
00165 int
00166 ds_set_int (int storeid, int which, int value)
00167 {
00168 return netsnmp_ds_set_int(storeid, which, value);
00169 }
00170
00171 int
00172 ds_get_int (int storeid, int which)
00173 {
00174 return netsnmp_ds_get_int(storeid, which);
00175 }
00176
00177
00178 int
00179 ds_set_string (int storeid, int which, const char *value)
00180 {
00181 return netsnmp_ds_set_string(storeid, which, value);
00182 }
00183
00184 char *
00185 ds_get_string (int storeid, int which)
00186 {
00187 return netsnmp_ds_get_string(storeid, which);
00188 }
00189
00190 int
00191 ds_set_void (int storeid, int which, void *value)
00192 {
00193 return netsnmp_ds_set_void(storeid, which, value);
00194 }
00195
00196 void *
00197 ds_get_void (int storeid, int which)
00198 {
00199 return netsnmp_ds_get_void(storeid, which);
00200 }
00201
00202 int
00203 ds_register_config (u_char type, const char *ftype,
00204 const char *token, int storeid, int which)
00205 {
00206 return netsnmp_ds_register_config(type, ftype, token, storeid, which);
00207 }
00208
00209 int
00210 ds_register_premib (u_char type, const char *ftype,
00211 const char *token, int storeid, int which)
00212 {
00213 return netsnmp_ds_register_premib(type, ftype, token, storeid, which);
00214 }
00215
00216 void
00217 ds_shutdown (void)
00218 {
00219 netsnmp_ds_shutdown();
00220 }