00001 #ifndef SNMP_IMPL_H
00002 #define SNMP_IMPL_H
00003
00004 #ifdef __cplusplus
00005 extern "C" {
00006 #endif
00007
00008
00009
00010
00011
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 #include<stdio.h>
00039 #include<net-snmp/types.h>
00040
00041 #define COMMUNITY_MAX_LEN 256
00042
00043
00044
00045
00046 #define SPRINT_MAX_LEN 2560
00047
00048
00049 #ifndef NULL
00050 #define NULL 0
00051 #endif
00052
00053 #ifndef TRUE
00054 #define TRUE 1
00055 #endif
00056 #ifndef FALSE
00057 #define FALSE 0
00058 #endif
00059
00060 #define READ 1
00061 #define WRITE 0
00062
00063 #define RESERVE1 0
00064 #define RESERVE2 1
00065 #define ACTION 2
00066 #define COMMIT 3
00067 #define FREE 4
00068 #define UNDO 5
00069 #define FINISHED_SUCCESS 9
00070 #define FINISHED_FAILURE 10
00071
00072
00073
00074
00075 #define RONLY 0x1
00076 #define RWRITE 0x2
00077
00078 #define NOACCESS 0x0000
00079
00080
00081
00082
00083 #define ASN_IPADDRESS (ASN_APPLICATION | 0)
00084 #define ASN_COUNTER (ASN_APPLICATION | 1)
00085 #define ASN_GAUGE (ASN_APPLICATION | 2)
00086 #define ASN_UNSIGNED (ASN_APPLICATION | 2)
00087 #define ASN_TIMETICKS (ASN_APPLICATION | 3)
00088 #define ASN_OPAQUE (ASN_APPLICATION | 4)
00089
00090
00091
00092
00093 #define ASN_NSAP (ASN_APPLICATION | 5)
00094 #define ASN_COUNTER64 (ASN_APPLICATION | 6)
00095 #define ASN_UINTEGER (ASN_APPLICATION | 7)
00096
00097 #ifdef OPAQUE_SPECIAL_TYPES
00098
00099
00100
00101 #define ASN_FLOAT (ASN_APPLICATION | 8)
00102 #define ASN_DOUBLE (ASN_APPLICATION | 9)
00103 #define ASN_INTEGER64 (ASN_APPLICATION | 10)
00104 #define ASN_UNSIGNED64 (ASN_APPLICATION | 11)
00105 #endif
00106
00107
00108
00109
00110 #ifndef ERROR_MSG
00111 #define ERROR_MSG(string) snmp_set_detail(string)
00112 #endif
00113
00114
00115
00116
00117 extern u_char sid[];
00118 NETSNMP_IMPORT int snmp_errno;
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 #define FIRST_PASS 1
00131 #define LAST_PASS 2
00132 u_char *snmp_comstr_parse(u_char *, size_t *, u_char *,
00133 size_t *, long *);
00134 u_char *snmp_comstr_build(u_char *, size_t *, u_char *,
00135 size_t *, long *, size_t);
00136
00137 int has_access(u_char, int, int, int);
00138 #ifdef __cplusplus
00139 }
00140 #endif
00141 #endif