9 * Definitions for the Simple Network Management Protocol (RFC 1067).
12 /**********************************************************************
14 * Copyright 1998 by Carnegie Mellon University
18 * Permission to use, copy, modify, and distribute this software and its
19 * documentation for any purpose and without fee is hereby granted,
20 * provided that the above copyright notice appear in all copies and that
21 * both that copyright notice and this permission notice appear in
22 * supporting documentation, and that the name of CMU not be
23 * used in advertising or publicity pertaining to distribution of the
24 * software without specific, written prior permission.
26 * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
27 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
28 * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
29 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
31 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
34 * $Id: libsnmp.h,v 5.0 2002/04/20 07:30:12 hardaker Exp $
36 **********************************************************************/
38 #include <ucd-snmp/ucd-snmp-config.h>
51 #include <sys/types.h>
53 #include <netinet/in.h>
55 #if TIME_WITH_SYS_TIME
57 # include <sys/timeb.h>
59 # include <sys/time.h>
64 # include <sys/time.h>
70 #include <sys/select.h>
80 #include <arpa/inet.h>
83 #ifdef UCD_SNMP_LIBRARY
85 #define snmp_parse cmu_snmp_parse
87 #include <ucd-snmp/asn1.h>
88 #include <ucd-snmp/snmp_api.h>
89 #include <ucd-snmp/snmp_impl.h>
90 #include <ucd-snmp/snmp_client.h>
91 #include <ucd-snmp/mib.h>
92 #include <ucd-snmp/parse.h>
93 #include <ucd-snmp/snmp.h>
94 #include <ucd-snmp/system.h>
95 #include <ucd-snmp/int64.h>
96 #include <ucd-snmp/version.h>
98 #define Version version /* netsnmp_session member */
100 #define SMI_NOSUCHOBJECT SNMP_NOSUCHOBJECT
101 #define SMI_NOSUCHINSTANCE SNMP_NOSUCHINSTANCE
102 #define SMI_ENDOFMIBVIEW SNMP_ENDOFMIBVIEW
105 #else /* !UCD_SNMP_LIBRARY */
107 #include <sys/types.h>
109 #include <netinet/in.h>
112 #include <snmp/asn1.h>
113 #include <snmp/snmp_error.h>
114 #include <snmp/mibii.h>
115 #include <snmp/snmp_extra.h>
116 #include <snmp/snmp_dump.h>
118 #include <snmp/snmp_session.h>
120 #include <snmp/snmp_vars.h>
121 #include <snmp/snmp_pdu.h>
122 #include <snmp/snmp_msg.h>
124 #include <snmp/snmp_coexist.h>
125 #include <snmp/version.h>
126 #include <snmp/snmp_api_error.h>
127 #include <snmp/mini-client.h>
129 #include <snmp/snmp_impl.h>
130 #include <snmp/snmp_api.h>
131 #include <snmp/snmp_client.h>
132 #include <snmp/snmp-internal.h>
133 #include <snmp/mib.h>
134 #include <snmp/parse.h>
135 #include <snmp/snmp_compat.h>
138 * Load UC-Davis differential
141 #define SNMP_MSG_GET GET_REQ_MSG
142 #define SNMP_MSG_GETNEXT GETNEXT_REQ_MSG
143 #define SNMP_MSG_RESPONSE GET_RSP_MSG
144 #define SNMP_MSG_SET SET_REQ_MSG
145 #define SNMP_MSG_TRAP TRP_REQ_MSG
146 #define SNMP_MSG_GETBULK (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x5)
147 #define SNMP_MSG_INFORM (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x6)
148 #define SNMP_MSG_TRAP2 (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x7)
149 #define SNMP_MSG_REPORT (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x8)
150 #define SNMP_NOSUCHOBJECT SMI_NOSUCHOBJECT
151 #define SNMP_NOSUCHINSTANCE SMI_NOSUCHINSTANCE
152 #define SNMP_ENDOFMIBVIEW SMI_ENDOFMIBVIEW
154 #define ASN_IPADDRESS (ASN_APPLICATION | 0)
155 #define ASN_UNSIGNED (ASN_APPLICATION | 2) /* RFC 1902 - same as GAUGE */
156 #define ASN_TIMETICKS (ASN_APPLICATION | 3)
158 #define snmp_perror(X) perror(X)
159 #define snmp_set_dump_packet(X)
160 #define snmp_set_quick_print(X)
161 #define snmp_set_do_debugging(X)
162 #define snmp_set_full_objid(X)
163 #define snmp_set_suffix_only(X)
165 #define VersionInfo snmp_Version
166 #define get_node read_objid
167 #define version Version /* netsnmp_session member */
169 #define SNMP_VERSION_2c SNMP_VERSION_2
170 #define SNMP_VERSION_2p 129
172 #define SOCK_STARTUP winsock_startup()
173 #define SOCK_CLEANUP winsock_cleanup()
175 #endif /* !UCD_SNMP_LIBRARY */
180 #endif /* _LIBSNMP_H_ */