aboutsummaryrefslogtreecommitdiffstats
path: root/packet-snmp.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-10-24 07:08:26 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-10-24 07:08:26 +0000
commitf007c811a58aecac778c2fc3fb65f5a1e2bdb544 (patch)
treeb2bb4c308fc1bb70991458a136a98a11352085fa /packet-snmp.c
parente9986a84371216d04cac5a16b10086e52c3160b4 (diff)
Don't include the header file to get the SNMP version unless we're
building with an SNMP library. If we have Net-SNMP, include <net-snmp/version.h>, not <ucd-snmp/version.h>. Don't include any of the SNMP headers unless HAVE_SOME_SNMP is defined. Include <net-snmp/config_api.h> if we have Net-SNMP, to declare "read_premib_configs()" and "read_configs()". Supply the include directories for Net-SNMP in the Makefile.nmake for GTK 1.2 and GTK 2. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6493 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-snmp.c')
-rw-r--r--packet-snmp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/packet-snmp.c b/packet-snmp.c
index 125ae98e7b..a8bcf0ebaf 100644
--- a/packet-snmp.c
+++ b/packet-snmp.c
@@ -10,7 +10,7 @@
*
* See RFCs 2570-2576 for SNMPv3
*
- * $Id: packet-snmp.c,v 1.99 2002/10/24 06:39:09 tpot Exp $
+ * $Id: packet-snmp.c,v 1.100 2002/10/24 07:08:22 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -53,11 +53,13 @@
#include "etypes.h"
#include "packet-ipx.h"
+#ifdef HAVE_SOME_SNMP
#ifdef HAVE_NET_SNMP
# include <net-snmp/net-snmp-config.h>
# include <net-snmp/mib_api.h>
# include <net-snmp/library/default_store.h>
-#elif defined(HAVE_UCD_SNMP)
+# include <net-snmp/config_api.h>
+#else /* HAVE_NET_SNMP */
# include <ucd-snmp/ucd-snmp-config.h>
# include <ucd-snmp/asn1.h>
# include <ucd-snmp/snmp_api.h>
@@ -71,9 +73,8 @@
# define NETSNMP_DS_LIBRARY_ID DS_LIBRARY_ID
# define NETSNMP_DS_LIB_NO_TOKEN_WARNINGS DS_LIB_NO_TOKEN_WARNINGS
# define NETSNMP_DS_LIB_PRINT_SUFFIX_ONLY DS_LIB_PRINT_SUFFIX_ONLY
-#endif
+#endif /* HAVE_NET_SNMP */
-#ifdef HAVE_SOME_SNMP
/*
* Define values "sprint_realloc_value()" expects.
*/
@@ -89,7 +90,7 @@
# define VALTYPE_BITSTR ASN_BIT_STR
# define VALTYPE_COUNTER64 ASN_COUNTER64
-#endif
+#endif /* HAVE_SOME_SNMP */
#include "asn1.h"