Don't include the header file to get the SNMP version unless we're
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 24 Oct 2002 07:08:26 +0000 (07:08 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 24 Oct 2002 07:08:26 +0000 (07:08 +0000)
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

gtk/Makefile.nmake
gtk/main.c
gtk2/Makefile.nmake
gtk2/main.c
packet-snmp.c
tethereal.c

index a834050e85eb61ff111abbeca3b402826bd6476a..4edefe0e00a37af86ee0583085b2eb44efd94de6 100644 (file)
@@ -1,7 +1,7 @@
 ## Makefile for building ethereal.exe with Microsoft C and nmake
 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
 #
-# $Id: Makefile.nmake,v 1.31 2002/09/23 17:07:39 jmayer Exp $
+# $Id: Makefile.nmake,v 1.32 2002/10/24 07:08:24 guy Exp $
 
 include ..\config.nmake
 
@@ -13,7 +13,8 @@ CFLAGS=-DHAVE_CONFIG_H /I.. /I../wiretap \
        /I$(ZLIB_DIR) \
        /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \
        /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \
-       /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+       /I$(PCAP_DIR)\include /I$(NET_SNMP_DIR)\include \
+       /I$(NET_SNMP_DIR)\win32 -D_U_="" $(LOCAL_CFLAGS)
 
 CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
 
index d1d5a1663c4133c86cfb43e45631b34225728d79..c4f059bc929ff582b447598e2a4cada3b15d6b6d 100644 (file)
@@ -1,6 +1,6 @@
 /* main.c
  *
- * $Id: main.c,v 1.267 2002/10/23 18:24:07 guy Exp $
+ * $Id: main.c,v 1.268 2002/10/24 07:08:24 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 # include "snprintf.h"
 #endif
 
+#ifdef HAVE_SOME_SNMP
+#ifdef HAVE_NET_SNMP
+#include <net-snmp/version.h>
+#else /* HAVE_NET_SNMP */
+/*
+ * XXX - we no longer support old versions of UCD SNMP; do all the
+ * versions we support have, and install, this header?
+ */
 #ifdef HAVE_UCD_SNMP_VERSION_H
 #include <ucd-snmp/version.h>
 #endif /* HAVE_UCD_SNMP_VERSION_H */
+#endif /* HAVE_NET_SNMP */
+#endif /* HAVE_SOME_SNMP */
 
 #ifdef NEED_STRERROR_H
 #include "strerror.h"
index 3f17200cdf5cdea6bfaea9ae6f180da58d8a904a..88ff38da2d1ea859bc007dd4b446de07465ff954 100644 (file)
@@ -1,7 +1,7 @@
 ## Makefile for building ethereal.exe with Microsoft C and nmake
 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
 #
-# $Id: Makefile.nmake,v 1.7 2002/09/23 15:00:39 jmayer Exp $
+# $Id: Makefile.nmake,v 1.8 2002/10/24 07:08:26 guy Exp $
 
 include ..\config.nmake
 
@@ -13,7 +13,8 @@ CFLAGS=-DHAVE_CONFIG_H /I.. /I../wiretap \
        /I$(ZLIB_DIR) \
        /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \
        /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \
-       /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+       /I$(PCAP_DIR)\include /I$(NET_SNMP_DIR)\include \
+       /I$(NET_SNMP_DIR)\win32 -D_U_="" $(LOCAL_CFLAGS)
 
 CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
 
index 6c9a2095ac3cbaf1dbf3a17eac1c3282d84b4c42..5ba3feabc4840b19cef2fb8995998d4843d6b681 100644 (file)
@@ -1,6 +1,6 @@
 /* main.c
  *
- * $Id: main.c,v 1.15 2002/10/23 18:24:09 guy Exp $
+ * $Id: main.c,v 1.16 2002/10/24 07:08:26 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 # include "snprintf.h"
 #endif
 
+#ifdef HAVE_SOME_SNMP
+#ifdef HAVE_NET_SNMP
+#include <net-snmp/version.h>
+#else /* HAVE_NET_SNMP */
+/*
+ * XXX - we no longer support old versions of UCD SNMP; do all the
+ * versions we support have, and install, this header?
+ */
 #ifdef HAVE_UCD_SNMP_VERSION_H
 #include <ucd-snmp/version.h>
 #endif /* HAVE_UCD_SNMP_VERSION_H */
+#endif /* HAVE_NET_SNMP */
+#endif /* HAVE_SOME_SNMP */
 
 #ifdef NEED_STRERROR_H
 #include "strerror.h"
index 125ae98e7b3d5f450afa09d183e68fe46aa40d28..a8bcf0ebaf838c11aafe649e0cb6c3b9826201e8 100644 (file)
@@ -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>
 #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"
 
index 4a7a75eb54291086321e0fbc007969a2451ef112..8bc1f4cda4e659a252a41f295ec60f3e85f3c289 100644 (file)
@@ -1,6 +1,6 @@
 /* tethereal.c
  *
- * $Id: tethereal.c,v 1.163 2002/10/23 18:24:04 guy Exp $
+ * $Id: tethereal.c,v 1.164 2002/10/24 07:08:22 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 # include "snprintf.h"
 #endif
 
+#ifdef HAVE_SOME_SNMP
+#ifdef HAVE_NET_SNMP
+#include <net-snmp/version.h>
+#else /* HAVE_NET_SNMP */
+/*
+ * XXX - we no longer support old versions of UCD SNMP; do all the
+ * versions we support have, and install, this header?
+ */
 #ifdef HAVE_UCD_SNMP_VERSION_H
 #include <ucd-snmp/version.h>
 #endif /* HAVE_UCD_SNMP_VERSION_H */
+#endif /* HAVE_NET_SNMP */
+#endif /* HAVE_SOME_SNMP */
 
 #ifdef NEED_STRERROR_H
 #include "strerror.h"