diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-10-23 18:24:09 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-10-23 18:24:09 +0000 |
commit | cc8a765d8e36370a0ea48c683dcdbf3f862d513e (patch) | |
tree | aa6a14e465bfd44622f7a332997d0dcb77cdc093 /tethereal.c | |
parent | 3369c4f7c7f73d9e7bf4fe352fc35b4c661fa5e1 (diff) | |
download | wireshark-cc8a765d8e36370a0ea48c683dcdbf3f862d513e.tar.gz wireshark-cc8a765d8e36370a0ea48c683dcdbf3f862d513e.tar.bz2 wireshark-cc8a765d8e36370a0ea48c683dcdbf3f862d513e.zip |
From Wes Hardaker:
Define HAVE_SOME_SNMP if either HAVE_UCD_SNMP or HAVE_NET_SNMP
is defined, and use HAVE_SOME_SNMP, rather than HAVE_UCD_SNMP,
in most places when testing whether we have an SNMP library or
not.
Be more selective when including Net-SNMP header files.
Fix up {gtk,gtk2}/main.c to do the same SNMP stuff that tethereal.c
does - including the MIB stuff that gtk/main.c was doing but gtk2/main.c
wasn't doing.
Fix the copyright date in gtk/main.c.
svn path=/trunk/; revision=6483
Diffstat (limited to 'tethereal.c')
-rw-r--r-- | tethereal.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/tethereal.c b/tethereal.c index c842a277f2..4a7a75eb54 100644 --- a/tethereal.c +++ b/tethereal.c @@ -1,6 +1,6 @@ /* tethereal.c * - * $Id: tethereal.c,v 1.162 2002/10/23 03:49:10 guy Exp $ + * $Id: tethereal.c,v 1.163 2002/10/23 18:24:04 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -314,7 +314,7 @@ main(int argc, char *argv[]) #ifdef WIN32 WSADATA wsaData; -# ifdef HAVE_UCD_SNMP +# ifdef HAVE_SOME_SNMP char *mib_path; # define MIB_PATH_APPEND "\\snmp\\mibs" # endif /* HAVE_UCD_SNMP */ @@ -433,17 +433,27 @@ main(int argc, char *argv[]) g_string_append(comp_info_str, ", without libz"); #endif /* HAVE_LIBZ */ -/* Oh, this is pretty */ +/* Oh, this is pretty. */ +/* Oh, ha. you think that was pretty. Try this:! --Wes */ +#ifdef HAVE_SOME_SNMP + #ifdef HAVE_UCD_SNMP - g_string_append(comp_info_str, ", with UCD SNMP "); + g_string_append(comp_info_str, ", with UCD-SNMP "); #ifdef HAVE_UCD_SNMP_VERSION_H g_string_append(comp_info_str, VersionInfo); #else /* HAVE_UCD_SNMP_VERSION_H */ g_string_append(comp_info_str, "(version unknown)"); #endif /* HAVE_UCD_SNMP_VERSION_H */ +#endif /* HAVE_UCD_SNMP */ + +#ifdef HAVE_NET_SNMP + g_string_append(comp_info_str, ", with Net-SNMP "); + g_string_append(comp_info_str, netsnmp_get_version()); +#endif /* HAVE_NET_SNMP */ + #else /* no SNMP library */ - g_string_append(comp_info_str, ", without UCD SNMP"); -#endif + g_string_append(comp_info_str, ", without UCD-SNMP or Net-SNMP"); +#endif /* HAVE_SOME_SNMP */ /* Now get our args */ while ((opt = getopt(argc, argv, "a:b:c:Df:F:hi:lnN:o:pqr:R:s:St:vw:Vxz:")) != -1) { @@ -813,7 +823,7 @@ main(int argc, char *argv[]) /* Start windows sockets */ WSAStartup( MAKEWORD( 1, 1 ), &wsaData ); -# ifdef HAVE_UCD_SNMP +# ifdef HAVE_SOME_SNMP /* Set MIBDIRS so that the SNMP library can find its mibs. */ /* XXX - Should we set MIBS or MIBFILES as well? */ |