diff options
-rw-r--r-- | Makefile.nmake | 1 | ||||
-rw-r--r-- | acinclude.m4 | 140 | ||||
-rw-r--r-- | asn1/snmp/packet-snmp-template.c | 60 | ||||
-rw-r--r-- | cmakeconfig.h.in | 6 | ||||
-rw-r--r-- | config.h.win32 | 4 | ||||
-rw-r--r-- | config.nmake | 2 | ||||
-rw-r--r-- | configure.in | 51 | ||||
-rw-r--r-- | epan/dissectors/format-oid.h | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-cops.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-snmp.c | 70 |
10 files changed, 53 insertions, 298 deletions
diff --git a/Makefile.nmake b/Makefile.nmake index 96aed8f049..175397e9ed 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -253,7 +253,6 @@ config.h : config.h.win32 config.nmake -e "s/@HAVE_LIBPORTAUDIO@/$(PORTAUDIO_CONFIG)/" \ -e "s/@PORTAUDIO_API_1@/$(PORTAUDIO_API_CONFIG)/" \ -e "s/@HAVE_NET_SNMP@/$(NET_SNMP_CONFIG)/" \ - -e "s/@HAVE_SOME_SNMP@/$(SOME_SNMP_CONFIG)/" \ < config.h.win32 > $@ ps.c : rdps.exe print.ps diff --git a/acinclude.m4 b/acinclude.m4 index 4d55b9934d..f10287c9fc 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1181,146 +1181,6 @@ AC_DEFUN([AC_WIRESHARK_NETSNMP_CHECK], ]) # -# AC_WIRESHARK_UCDSNMP_CHECK -# -AC_DEFUN([AC_WIRESHARK_UCDSNMP_CHECK], -[ - if test "x$ucdsnmp_dir" != "x" - then - # - # The user specified a directory in which UCD SNMP resides, - # so add the "include" subdirectory of that directory to - # the include file search path and the "lib" subdirectory - # of that directory to the library search path. - # - # XXX - if there's also a libpcap in a directory that's - # already in CFLAGS, CPPFLAGS, or LDFLAGS, this won't - # make us find the version in the specified directory, - # as the compiler and/or linker will search that other - # directory before it searches the specified directory. - # - CFLAGS="$CFLAGS -I$ucdsnmp_dir/include" - CPPFLAGS="$CPPFLAGS -I$ucdsnmp_dir/include" - AC_WIRESHARK_ADD_DASH_L(LDFLAGS, $ucdsnmp_dir/lib) - fi - - # - # Check for one of the UCD SNMP header files we include, - # to see whether we have UCD SNMP installed. - # - AC_CHECK_HEADER(ucd-snmp/ucd-snmp-config.h, - [ - # - # UCD SNMP or Net-SNMP might require various helper - # libraries on various platforms, such as "-ldes425" - # in "/usr/kerberos/lib" on some versions of Red - # Hat Linux, or "-lkstat" on Solaris. - # - # It might also require "-lcrypto" on some platforms; - # if the user didn't specify --with-ssl, we check - # whether it would have made a difference and, if so, - # we tell the user that they needed to request it. - # (There are annoying licensing issues with it and - # GPL'ed code, so we don't include it by default.) - # - # XXX - autoconf really needs a way to test for - # a given routine in a given library *and* to test - # whether additional "-L"/"-R"/whatever flags are - # needed *before* the "-l" flag for the library - # and to test whether additional libraries are - # needed after the library *and* to cache all that - # information. - # - wireshark_save_LIBS="$LIBS" - found_sprint_realloc_objid=no - for extras in "" "-L/usr/kerberos/lib -ldes425" "-lkstat" - do - LIBS="-lsnmp $extras $SOCKET_LIBS $NSL_LIBS $SSL_LIBS" - if test -z "$extras" - then - AC_MSG_CHECKING([whether UCD SNMP includes sprint_realloc_objid]) - else - AC_MSG_CHECKING([whether UCD SNMP includes sprint_realloc_objid (linking with $extras)]) - fi - AC_TRY_LINK( - [ - ], - [ - sprint_realloc_objid(); - ], - [ - # - # We found "sprint_realloc_objid()", - # and required the libraries in - # extras as well. - # - AC_MSG_RESULT(yes) - SNMP_LIBS="-lsnmp $extras"; break; - found_sprint_realloc_objid=yes - break - ], - [ - # - # The link failed. If they didn't ask - # for SSL, try linking with -lcrypto - # as well, and if *that* succeeds, - # tell them they'll need to specify - # --want-ssl. - # - AC_MSG_RESULT(no) - if test "x$want_ssl" = "xno" - then - LIBS="$LIBS -lcrypto" - AC_TRY_LINK( - [ - ], - [ - sprint_realloc_objid(); - ], - [ - # - # It worked with -lcrypto; tell - # them they'll need to specify - # --with-ssl. - # - found_sprint_realloc_objid=yesnocrypto - AC_MSG_RESULT([UCD SNMP requires -lcrypto but --with-ssl was not specified - disabling UCD SNMP.]) - ]) - fi - ]) - done - LIBS="$wireshark_save_LIBS" - - # - # If we didn't find "sprint_realloc_objid()", fail. - # Either the user needs a newer version of UCD SNMP - # with "sprint_realloc_objid()", or they may need to - # specify "--with-ssl". - # - if test "$found_snmp_sprint_realloc_objid" = no; then - AC_MSG_RESULT([UCD SNMP header files found, but sprint_realloc_objid not found in SNMP library - disabling UCD SNMP.]) - elif test "$found_snmp_sprint_realloc_objid" != yes -a "x$want_ucdsnmp" = "xyes"; then - AC_MSG_ERROR(UCD SNMP requested but fails to build) - fi - - # - # We found it, so we have UCD SNMP. - # - AC_DEFINE(HAVE_UCD_SNMP, 1, [Define to enable support for UCD-SNMP]) - have_ucd_snmp="yes" - ],[ - # - # No, we don't have it. - # If the user explicitly asked for UCD SNMP, fail, - # otherwise just don't use the UCD SNMP library. - # - if test "x$want_ucdsnmp" = "xyes" ; then - AC_MSG_ERROR(Header file ucd-snmp/snmp.h not found.) - fi - ]) -]) - -# # AC_WIRESHARK_RPM_CHECK # Looks for the rpm program, and checks to see if we can redefine "_topdir". # diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c index 7930fd5fde..962ea5d708 100644 --- a/asn1/snmp/packet-snmp-template.c +++ b/asn1/snmp/packet-snmp-template.c @@ -64,31 +64,11 @@ #include "packet-ber.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> # 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> -# include <ucd-snmp/snmp_impl.h> -# include <ucd-snmp/mib.h> -# include <ucd-snmp/default_store.h> -# include <ucd-snmp/read_config.h> -# include <ucd-snmp/tools.h> -#endif /* HAVE_NET_SNMP */ - -#ifndef NETSNMP_DS_LIBRARY_ID -# 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 -# define netsnmp_ds_set_boolean ds_set_boolean -# define netsnmp_ds_set_int ds_set_int -#endif #ifdef _WIN32 # include <epan/filesystem.h> @@ -109,7 +89,7 @@ # define VALTYPE_BITSTR ASN_BIT_STR # define VALTYPE_COUNTER64 ASN_COUNTER64 -#endif /* HAVE_SOME_SNMP */ +#endif /* HAVE_NET_SNMP */ #include "packet-snmp.h" #include "format-oid.h" @@ -392,7 +372,7 @@ format_oid(subid_t *oid, guint oid_length) int len; unsigned int i; char *buf; -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP guchar *oid_string; size_t oid_string_len; size_t oid_out_len; @@ -400,7 +380,7 @@ format_oid(subid_t *oid, guint oid_length) result_len = oid_length * 22; -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP /* * Get the decoded form of the OID, and add its length to the * length of the result string. @@ -429,7 +409,7 @@ format_oid(subid_t *oid, guint oid_length) buf += len; } -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP /* * Append the decoded form of the OID. */ @@ -448,7 +428,7 @@ new_format_oid(subid_t *oid, guint oid_length, int len; unsigned int i; char *buf; -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP guchar *oid_string; size_t oid_string_len; size_t oid_out_len; @@ -459,7 +439,7 @@ new_format_oid(subid_t *oid, guint oid_length, return; } -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP /* * Get the decoded form of the OID, and add its length to the * length of the result string. @@ -498,7 +478,7 @@ new_format_oid(subid_t *oid, guint oid_length, } } -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP static gboolean check_var_length(guint vb_length, guint required_length, guchar **errmsg) { @@ -796,7 +776,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv gint oid_len; guint variable_oid_length = 0; const guint8 *var_oid_buf; -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP struct variable_list variable; long value; #endif @@ -845,7 +825,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv offset = dissect_ber_integer(FALSE, pinfo, NULL, tvb, start, -1, &vb_integer_value); length = offset - vb_value_start; if (snmp_tree) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP value = vb_integer_value; variable.val.integer = &value; vb_display_string = format_var(&variable, @@ -873,7 +853,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv offset = dissect_ber_integer(FALSE, pinfo, NULL, tvb, start, -1, &vb_uinteger_value); length = offset - vb_value_start; if (snmp_tree) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP value = vb_uinteger_value; variable.val.integer = &value; vb_display_string = format_var(&variable, @@ -907,7 +887,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv length = offset - vb_value_start; if (snmp_tree) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP variable.val.string = vb_octet_string; vb_display_string = format_var(&variable, variable_oid, variable_oid_length, vb_type, @@ -977,7 +957,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv offset = offset + vb_length; length = offset - vb_value_start; if (snmp_tree) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP variable.val.objid = vb_oid; vb_display_string = format_var(&variable, variable_oid, variable_oid_length, vb_type, @@ -991,7 +971,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv vb_value_start, length, "Value: %s: [Out of memory]", vb_type_name); } -#else /* HAVE_SOME_SNMP */ +#else /* HAVE_NET_SNMP */ vb_display_string = format_oid(vb_oid, vb_oid_length); if (vb_display_string != NULL) { proto_tree_add_text(snmp_tree, tvb, @@ -1003,7 +983,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv vb_value_start, length, "Value: %s: [Out of memory]", vb_type_name); } -#endif /* HAVE_SOME_SNMP */ +#endif /* HAVE_NET_SNMP */ } break; @@ -1291,7 +1271,7 @@ dissect_smux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void process_prefs(void) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP gchar *tmp_mib_modules; static gboolean mibs_loaded = FALSE; @@ -1341,12 +1321,12 @@ process_prefs(void) init_mib(); read_configs(); mibs_loaded = TRUE; -#endif /* HAVE_SOME_SNMP */ +#endif /* HAVE_NET_SNMP */ } /*--- proto_register_snmp -------------------------------------------*/ void proto_register_snmp(void) { -#if defined(_WIN32) && defined(HAVE_SOME_SNMP) +#if defined(_WIN32) && defined(HAVE_NET_SNMP) char *mib_path; int mib_path_len; #define MIB_PATH_APPEND "snmp\\mibs" @@ -1408,7 +1388,7 @@ void proto_register_snmp(void) { }; module_t *snmp_module; - #ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP #ifdef _WIN32 /* Set MIBDIRS so that the SNMP library can find its mibs. */ @@ -1424,7 +1404,7 @@ void proto_register_snmp(void) { /* * Suppress warnings about unknown tokens - we aren't initializing - * UCD SNMP in its entirety, we're just initializing the + * Net-SNMP in its entirety, we're just initializing the * MIB-handling part because that's all we're using, which * means that entries in the configuration file for other * pars of the library will not be handled, and we don't want @@ -1434,7 +1414,7 @@ void proto_register_snmp(void) { NETSNMP_DS_LIB_NO_TOKEN_WARNINGS, TRUE); netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_SUFFIX_ONLY, 2); -#endif /* HAVE_SOME_SNMP */ +#endif /* HAVE_NET_SNMP */ /* Register protocol */ diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 701b535e16..52d9ee425b 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -170,9 +170,6 @@ /* Define if sa_len field exists in struct sockaddr */ #cmakedefine HAVE_SA_LEN 1 -/* Define to 1 if some SNMP support is to be used */ -#cmakedefine HAVE_SOME_SNMP 1 - /* Define to 1 if you have the <stdarg.h> header file. */ #cmakedefine HAVE_STDARG_H 1 @@ -221,9 +218,6 @@ /* Define to 1 if you have the <sys/wait.h> header file. */ #cmakedefine HAVE_SYS_WAIT_H 1 -/* Define to enable support for UCD-SNMP */ -#cmakedefine HAVE_UCD_SNMP 1 - /* Define to 1 if you have the <unistd.h> header file. */ #cmakedefine HAVE_UNISTD_H 1 diff --git a/config.h.win32 b/config.h.win32 index 39233043b5..c9f8b884ac 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -77,7 +77,6 @@ #endif @HAVE_NET_SNMP@ -@HAVE_SOME_SNMP@ /* Define if you have the gethostbyname2 function. */ /* #undef HAVE_GETHOSTBYNAME2 */ @@ -133,9 +132,6 @@ /* Define if you have the <sys/wait.h> header file. */ /* #undef HAVE_SYS_WAIT_H */ -/* Define if you have the <ucd-snmp/version.h> header file. */ -/* #undef HAVE_UCD_SNMP_VERSION_H */ - /* Define if you have the <unistd.h> header file. */ /* #define HAVE_UNISTD_H 1 */ diff --git a/config.nmake b/config.nmake index 115ffc5cac..17393880f7 100644 --- a/config.nmake +++ b/config.nmake @@ -525,12 +525,10 @@ NET_SNMP_CFLAGS=/I$(NET_SNMP_DIR)\include /I$(NET_SNMP_DIR)\win32 NET_SNMP_LIBS=$(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib # Nmake uses carets to escape special characters NET_SNMP_CONFIG=^#define HAVE_NET_SNMP 1 -SOME_SNMP_CONFIG=^#define HAVE_SOME_SNMP 1 !else NET_SNMP_CFLAGS= NET_SNMP_LIBS= NET_SNMP_CONFIG= -SOME_SNMP_CONFIG= !ENDIF !IFDEF ADNS_DIR diff --git a/configure.in b/configure.in index 7b962165f1..c75e61be29 100644 --- a/configure.in +++ b/configure.in @@ -940,7 +940,7 @@ else fi AC_SUBST(SSL_LIBS) -dnl UCD SNMP/Net-SNMP Check +dnl Net-SNMP Check SNMP_LIBS='' AC_ARG_WITH(net-snmp, @@ -964,30 +964,8 @@ AC_ARG_WITH(net-snmp, want_netsnmp=ifavailable ]) -AC_ARG_WITH(ucd-snmp, -[ --with-ucd-snmp[[=DIR]] use UCD SNMP client library (located in directory DIR, if supplied). [[default=yes, if available]]], -[ - if test $withval = no - then - want_ucdsnmp=no - elif test $withval = yes - then - want_ucdsnmp=yes - else - want_ucdsnmp=yes - ucdsnmp_dir=$withval - fi -],[ - # - # Set "want_ucdsnmp" to "ifavailable" to make the default "use it - # if you find it, otherwise don't". - # - want_ucdsnmp=ifavailable - ucdsnmp_dir= -]) - # -# Try Net-SNMP first. +# Try Net-SNMP # AC_MSG_CHECKING(whether to use Net-SNMP library) if test "x$want_netsnmp" = "xno" ; then @@ -1001,25 +979,8 @@ else AC_WIRESHARK_NETSNMP_CHECK fi -# -# If that didn't find Net-SNMP, try UCD SNMP. -# -if test "x$have_net_snmp" != "xyes" ; then - AC_MSG_CHECKING(whether to use UCD SNMP library) - if test "x$want_ucdsnmp" = "xno" ; then - AC_MSG_RESULT(no) - else - if test "x$want_ucdsnmp" = "xifavailable" ; then - AC_MSG_RESULT([yes, if available]) - else - AC_MSG_RESULT(yes) - fi - AC_WIRESHARK_UCDSNMP_CHECK - fi -fi - -if test "x$have_net_snmp" = "xyes" || test "x$have_ucd_snmp" = "xyes"; then - AC_DEFINE(HAVE_SOME_SNMP, 1, [Define to 1 if some SNMP support is to be used]) +if test "x$have_net_snmp" = "xyes"; then + AC_DEFINE(HAVE_NET_SNMP, 1, [Define to 1 if Net-SNMP support is to be used]) fi AC_SUBST(SNMP_LIBS) @@ -1453,9 +1414,7 @@ else fi if test "x$have_net_snmp" = "xyes" ; then - snmp_libs_message="yes (net-snmp)" -elif test "x$have_ucdsnmp" = "xyes" ; then - snmp_libs_message="yes (ucd-snmp)" + snmp_libs_message="yes" else snmp_libs_message="no" fi diff --git a/epan/dissectors/format-oid.h b/epan/dissectors/format-oid.h index 33d2f48cfb..866b4f4e1b 100644 --- a/epan/dissectors/format-oid.h +++ b/epan/dissectors/format-oid.h @@ -51,10 +51,10 @@ * "config.h", to get the right #defines defined, so that we properly * typedef "subid_t". */ -#if defined(HAVE_SOME_SNMP) -typedef gulong subid_t; /* Net-SNMP or UCD SNMP */ +#if defined(HAVE_NET_SNMP) +typedef gulong subid_t; /* Net-SNMP */ #else -typedef guint subid_t; /* CMU SNMP, libsmi, or nothing */ +typedef guint subid_t; /* CMU SNMP, UCD SNMP, libsmi, or nothing */ #endif extern int oid_to_subid_buf(const guint8 *oid, gint oid_len, subid_t *buf, int buf_len); diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c index 45e09c1cfc..cc618fd618 100644 --- a/epan/dissectors/packet-cops.c +++ b/epan/dissectors/packet-cops.c @@ -67,23 +67,12 @@ #include "packet-ipv6.h" #include "packet-tcp.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> # 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> -# include <ucd-snmp/snmp_impl.h> -# include <ucd-snmp/mib.h> -# include <ucd-snmp/default_store.h> -# include <ucd-snmp/read_config.h> -# include <ucd-snmp/tools.h> #endif /* HAVE_NET_SNMP */ -#endif /* HAVE_SOME_SNMP */ #include <epan/dissectors/format-oid.h> #include <epan/prefs.h> diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index c366178a88..a054435975 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -72,31 +72,11 @@ #include "packet-ber.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> # 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> -# include <ucd-snmp/snmp_impl.h> -# include <ucd-snmp/mib.h> -# include <ucd-snmp/default_store.h> -# include <ucd-snmp/read_config.h> -# include <ucd-snmp/tools.h> -#endif /* HAVE_NET_SNMP */ - -#ifndef NETSNMP_DS_LIBRARY_ID -# 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 -# define netsnmp_ds_set_boolean ds_set_boolean -# define netsnmp_ds_set_int ds_set_int -#endif #ifdef _WIN32 # include <epan/filesystem.h> @@ -117,7 +97,7 @@ # define VALTYPE_BITSTR ASN_BIT_STR # define VALTYPE_COUNTER64 ASN_COUNTER64 -#endif /* HAVE_SOME_SNMP */ +#endif /* HAVE_NET_SNMP */ #include "packet-snmp.h" #include "format-oid.h" @@ -283,7 +263,7 @@ static int hf_snmp_priority = -1; /* INTEGER_M1_2147483647 */ static int hf_snmp_operation = -1; /* T_operation */ /*--- End of included file: packet-snmp-hf.c ---*/ -#line 191 "packet-snmp-template.c" +#line 171 "packet-snmp-template.c" static int hf_smux_version = -1; static int hf_smux_pdutype = -1; @@ -323,7 +303,7 @@ static gint ett_snmp_SimpleOpen = -1; static gint ett_snmp_RReqPDU = -1; /*--- End of included file: packet-snmp-ett.c ---*/ -#line 202 "packet-snmp-template.c" +#line 182 "packet-snmp-template.c" /* defined in net-SNMP; include/net-snmp/library/snmp.h */ #undef SNMP_MSG_GET @@ -517,7 +497,7 @@ format_oid(subid_t *oid, guint oid_length) int len; unsigned int i; char *buf; -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP guchar *oid_string; size_t oid_string_len; size_t oid_out_len; @@ -525,7 +505,7 @@ format_oid(subid_t *oid, guint oid_length) result_len = oid_length * 22; -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP /* * Get the decoded form of the OID, and add its length to the * length of the result string. @@ -554,7 +534,7 @@ format_oid(subid_t *oid, guint oid_length) buf += len; } -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP /* * Append the decoded form of the OID. */ @@ -573,7 +553,7 @@ new_format_oid(subid_t *oid, guint oid_length, int len; unsigned int i; char *buf; -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP guchar *oid_string; size_t oid_string_len; size_t oid_out_len; @@ -584,7 +564,7 @@ new_format_oid(subid_t *oid, guint oid_length, return; } -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP /* * Get the decoded form of the OID, and add its length to the * length of the result string. @@ -623,7 +603,7 @@ new_format_oid(subid_t *oid, guint oid_length, } } -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP static gboolean check_var_length(guint vb_length, guint required_length, guchar **errmsg) { @@ -921,7 +901,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv gint oid_len; guint variable_oid_length = 0; const guint8 *var_oid_buf; -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP struct variable_list variable; long value; #endif @@ -970,7 +950,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv offset = dissect_ber_integer(FALSE, pinfo, NULL, tvb, start, -1, &vb_integer_value); length = offset - vb_value_start; if (snmp_tree) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP value = vb_integer_value; variable.val.integer = &value; vb_display_string = format_var(&variable, @@ -998,7 +978,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv offset = dissect_ber_integer(FALSE, pinfo, NULL, tvb, start, -1, &vb_uinteger_value); length = offset - vb_value_start; if (snmp_tree) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP value = vb_uinteger_value; variable.val.integer = &value; vb_display_string = format_var(&variable, @@ -1032,7 +1012,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv length = offset - vb_value_start; if (snmp_tree) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP variable.val.string = vb_octet_string; vb_display_string = format_var(&variable, variable_oid, variable_oid_length, vb_type, @@ -1102,7 +1082,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv offset = offset + vb_length; length = offset - vb_value_start; if (snmp_tree) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP variable.val.objid = vb_oid; vb_display_string = format_var(&variable, variable_oid, variable_oid_length, vb_type, @@ -1116,7 +1096,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv vb_value_start, length, "Value: %s: [Out of memory]", vb_type_name); } -#else /* HAVE_SOME_SNMP */ +#else /* HAVE_NET_SNMP */ vb_display_string = format_oid(vb_oid, vb_oid_length); if (vb_display_string != NULL) { proto_tree_add_text(snmp_tree, tvb, @@ -1128,7 +1108,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv vb_value_start, length, "Value: %s: [Out of memory]", vb_type_name); } -#endif /* HAVE_SOME_SNMP */ +#endif /* HAVE_NET_SNMP */ } break; @@ -2705,7 +2685,7 @@ static void dissect_SMUX_PDUs_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree /*--- End of included file: packet-snmp-fn.c ---*/ -#line 1044 "packet-snmp-template.c" +#line 1024 "packet-snmp-template.c" guint dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo, @@ -2956,7 +2936,7 @@ dissect_smux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void process_prefs(void) { -#ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP gchar *tmp_mib_modules; static gboolean mibs_loaded = FALSE; @@ -3006,12 +2986,12 @@ process_prefs(void) init_mib(); read_configs(); mibs_loaded = TRUE; -#endif /* HAVE_SOME_SNMP */ +#endif /* HAVE_NET_SNMP */ } /*--- proto_register_snmp -------------------------------------------*/ void proto_register_snmp(void) { -#if defined(_WIN32) && defined(HAVE_SOME_SNMP) +#if defined(_WIN32) && defined(HAVE_NET_SNMP) char *mib_path; int mib_path_len; #define MIB_PATH_APPEND "snmp\\mibs" @@ -3397,7 +3377,7 @@ void proto_register_snmp(void) { "snmp.T_operation", HFILL }}, /*--- End of included file: packet-snmp-hfarr.c ---*/ -#line 1399 "packet-snmp-template.c" +#line 1379 "packet-snmp-template.c" }; /* List of subtrees */ @@ -3435,11 +3415,11 @@ void proto_register_snmp(void) { &ett_snmp_RReqPDU, /*--- End of included file: packet-snmp-ettarr.c ---*/ -#line 1408 "packet-snmp-template.c" +#line 1388 "packet-snmp-template.c" }; module_t *snmp_module; - #ifdef HAVE_SOME_SNMP +#ifdef HAVE_NET_SNMP #ifdef _WIN32 /* Set MIBDIRS so that the SNMP library can find its mibs. */ @@ -3455,7 +3435,7 @@ void proto_register_snmp(void) { /* * Suppress warnings about unknown tokens - we aren't initializing - * UCD SNMP in its entirety, we're just initializing the + * Net-SNMP in its entirety, we're just initializing the * MIB-handling part because that's all we're using, which * means that entries in the configuration file for other * pars of the library will not be handled, and we don't want @@ -3465,7 +3445,7 @@ void proto_register_snmp(void) { NETSNMP_DS_LIB_NO_TOKEN_WARNINGS, TRUE); netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_SUFFIX_ONLY, 2); -#endif /* HAVE_SOME_SNMP */ +#endif /* HAVE_NET_SNMP */ /* Register protocol */ |