forked from osmocom/wireshark
Work around changes made to recent Red Hat ucd-snmp packages. See
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=57421 for details. svn path=/trunk/; revision=4387
This commit is contained in:
parent
8bae6e2e3d
commit
3dedae14f9
|
@ -1,7 +1,7 @@
|
|||
/* acconfig.h
|
||||
* #ifdefs to be controlled by "configure"
|
||||
*
|
||||
* $Id: acconfig.h,v 1.20 2001/07/27 07:10:09 guy Exp $
|
||||
* $Id: acconfig.h,v 1.21 2001/12/12 05:26:53 gerald Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.org>
|
||||
|
@ -43,3 +43,5 @@
|
|||
#undef HAVE_PCAP_VERSION
|
||||
|
||||
#undef PLUGIN_DIR
|
||||
|
||||
#undef RED_HAT_MODIFIED_UCD_SNMP
|
||||
|
|
12
configure.in
12
configure.in
|
@ -1,4 +1,4 @@
|
|||
# $Id: configure.in,v 1.141 2001/12/07 22:56:56 guy Exp $
|
||||
# $Id: configure.in,v 1.142 2001/12/12 05:26:53 gerald Exp $
|
||||
dnl
|
||||
dnl Process this file with autoconf 2.13 or later to produce a
|
||||
dnl configure script; 2.12 doesn't generate a "configure" script that
|
||||
|
@ -494,6 +494,16 @@ else
|
|||
"$ac_cv_header_snmp_snmp_h" = yes ; then
|
||||
AC_MSG_ERROR([Both UCD and CMU SNMP libraries found - uninstall one of them.])
|
||||
fi
|
||||
|
||||
#
|
||||
# Look for the string 'sbuf' in ucd-snmp/mib.h. If found, assume
|
||||
# we've encountered a Red Hat-modified version of UCD SNMP.
|
||||
#
|
||||
# XXX - Check for 'binit()' in parse.h
|
||||
#
|
||||
AC_EGREP_HEADER(sprint_objid.*sbuf, ucd-snmp/mib.h,
|
||||
AC_DEFINE(RED_HAT_MODIFIED_UCD_SNMP))
|
||||
|
||||
|
||||
#
|
||||
# This may require "-lkstat" on Solaris, sigh.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* See RFCs 1905, 1906, 1909, and 1910 for SNMPv2u.
|
||||
*
|
||||
* $Id: packet-snmp.c,v 1.76 2001/12/10 00:25:36 guy Exp $
|
||||
* $Id: packet-snmp.c,v 1.77 2001/12/12 05:26:53 gerald Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -121,6 +121,12 @@
|
|||
# define VALTYPE_OBJECTID ASN_OBJECT_ID
|
||||
# define VALTYPE_BITSTR ASN_BIT_STR
|
||||
# define VALTYPE_COUNTER64 ASN_COUNTER64
|
||||
|
||||
# ifdef RED_HAT_MODIFIED_UCD_SNMP
|
||||
# include <ucd-snmp/parse.h>
|
||||
# endif
|
||||
|
||||
|
||||
# elif defined(HAVE_SNMP_SNMP_H)
|
||||
/*
|
||||
* CMU SNMP.
|
||||
|
@ -695,7 +701,12 @@ format_var(struct variable_list *variable, subid_t *variable_oid,
|
|||
}
|
||||
variable->val_len = vb_length;
|
||||
|
||||
# ifdef RED_HAT_MODIFIED_UCD_SNMP
|
||||
sprint_value(binit(NULL, buf, sizeof(buf)), variable_oid,
|
||||
variable_oid_length, variable);
|
||||
# else
|
||||
sprint_value(buf, variable_oid, variable_oid_length, variable);
|
||||
# endif
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
|
@ -1240,8 +1251,13 @@ dissect_common_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
variable_oid_length);
|
||||
|
||||
#if defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H)
|
||||
# ifdef RED_HAT_MODIFIED_UCD_SNMP
|
||||
sprint_objid(binit(NULL, vb_oid_string, sizeof(vb_oid_string)),
|
||||
variable_oid, variable_oid_length);
|
||||
# else
|
||||
sprint_objid(vb_oid_string, variable_oid,
|
||||
variable_oid_length);
|
||||
# endif
|
||||
proto_tree_add_text(tree, tvb, offset, sequence_length,
|
||||
"Object identifier %d: %s (%s)", vb_index,
|
||||
oid_string, vb_oid_string);
|
||||
|
|
Loading…
Reference in New Issue