00001
00002
00003
00004
00005
00006 #ifndef _SNMP_VARS_H_
00007 #define _SNMP_VARS_H_
00008
00009 #ifdef __cplusplus
00010 extern "C" {
00011 #endif
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 struct variable;
00047
00048
00049
00050
00051 typedef int (WriteMethod) (int action,
00052 u_char * var_val,
00053 u_char var_val_type,
00054 size_t var_val_len,
00055 u_char * statP,
00056 oid * name, size_t length);
00057
00058
00059
00060
00061 typedef u_char *(FindVarMethod) (struct variable * vp,
00062 oid * name,
00063 size_t * length,
00064 int exact,
00065 size_t * var_len,
00066 WriteMethod ** write_method);
00067
00068
00069
00070
00071 typedef int (AddVarMethod) (netsnmp_agent_session *asp,
00072 netsnmp_variable_list * vbp);
00073
00074 struct nlist;
00075
00076 extern long long_return;
00077 extern u_char return_buf[];
00078
00079 extern oid nullOid[];
00080 extern int nullOidLen;
00081
00082 #define INST 0xFFFFFFFF
00083
00084 struct variable {
00085 u_char magic;
00086 char type;
00087
00088
00089
00090 u_short acl;
00091 FindVarMethod *findVar;
00092 u_char namelen;
00093 oid name[MAX_OID_LEN];
00094 };
00095
00096 int init_agent(const char *);
00097 void shutdown_agent(void);
00098
00099 int should_init(const char *module_name);
00100 void add_to_init_list(char *module_list);
00101
00102 #ifdef USING_AGENTX_SUBAGENT_MODULE
00103 void netsnmp_enable_subagent(void);
00104 #endif
00105
00106 #ifndef _AGENT_REGISTRY_H
00107 #include <net-snmp/agent/agent_handler.h>
00108 #include <net-snmp/agent/var_struct.h>
00109 #include <net-snmp/agent/agent_registry.h>
00110 #endif
00111
00112
00113
00114
00115 #define MATCH_FAILED (-1)
00116 #define MATCH_SUCCEEDED 0
00117
00118 #ifdef __cplusplus
00119 }
00120 #endif
00121 #endif