00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SNMP_CLIENT_H
00027 #define SNMP_CLIENT_H
00028
00029 #include <net-snmp/types.h>
00030 #include <net-snmp/varbind_api.h>
00031 #include <net-snmp/pdu_api.h>
00032 #include <net-snmp/session_api.h>
00033
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00038
00039 struct snmp_pdu;
00040 struct snmp_session;
00041 struct variable_list;
00042
00043 struct synch_state {
00044 int waiting;
00045 int status;
00046
00047
00048
00049 #define STAT_SUCCESS 0
00050 #define STAT_ERROR 1
00051 #define STAT_TIMEOUT 2
00052 int reqid;
00053 netsnmp_pdu *pdu;
00054 };
00055
00056 void snmp_replace_var_types(netsnmp_variable_list * vbl,
00057 u_char old_type,
00058 u_char new_type);
00059 void snmp_reset_var_buffers(netsnmp_variable_list * var);
00060 void snmp_reset_var_types(netsnmp_variable_list * vbl,
00061 u_char new_type);
00062 int count_varbinds(netsnmp_variable_list * var_ptr);
00063 int count_varbinds_of_type(netsnmp_variable_list * var_ptr,
00064 u_char type);
00065 netsnmp_variable_list *find_varbind_of_type(netsnmp_variable_list *
00066 var_ptr, u_char type);
00067 netsnmp_variable_list *find_varbind_in_list(netsnmp_variable_list *vblist,
00068 oid *name, size_t len);
00069
00070 netsnmp_pdu *snmp_split_pdu(netsnmp_pdu *, int skipCount,
00071 int copyCount);
00072
00073 unsigned long snmp_varbind_len(netsnmp_pdu *pdu);
00074 int snmp_clone_var(netsnmp_variable_list *,
00075 netsnmp_variable_list *);
00076 const char *snmp_errstring(int);
00077 int snmp_synch_response_cb(netsnmp_session *,
00078 netsnmp_pdu *, netsnmp_pdu **,
00079 snmp_callback);
00080 int snmp_clone_mem(void **, const void *, unsigned);
00081
00082
00083 void netsnmp_query_set_default_session(netsnmp_session *);
00084 netsnmp_session * netsnmp_query_get_default_session( void );
00085 int netsnmp_query_get( netsnmp_variable_list *, netsnmp_session *);
00086 int netsnmp_query_getnext( netsnmp_variable_list *, netsnmp_session *);
00087 int netsnmp_query_walk( netsnmp_variable_list *, netsnmp_session *);
00088 int netsnmp_query_set( netsnmp_variable_list *, netsnmp_session *);
00089
00090 #ifdef __cplusplus
00091 }
00092 #endif
00093 #endif