From Andrew Hood: translate enterprise OIDs in SNMP traps to strings if

possible.

svn path=/trunk/; revision=4758
This commit is contained in:
Guy Harris 2002-02-19 09:35:45 +00:00
parent 642d7239dc
commit ddf6a753f0
2 changed files with 14 additions and 1 deletions

View File

@ -713,6 +713,7 @@ Andy Hood <ahood[AT]westpac.com.au> {
compiled with crypto support and needs -lcrypto
On Solaris, with GCC, add flags to reduce warnings from
inadequacies of function declarations in X11 headers
Translate enterprise OIDs in SNMP traps to strings if possible
}
Randy McEoin <rmceoin[AT]pe.net> {

View File

@ -8,7 +8,7 @@
*
* See RFCs 1905, 1906, 1909, and 1910 for SNMPv2u.
*
* $Id: packet-snmp.c,v 1.79 2002/01/24 09:20:51 guy Exp $
* $Id: packet-snmp.c,v 1.80 2002/02/19 09:35:45 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -1098,8 +1098,20 @@ dissect_common_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
if (tree) {
oid_string = format_oid(enterprise, enterprise_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)),
enterprise, enterprise_length);
# else
sprint_objid(vb_oid_string, enterprise,
enterprise_length);
# endif
proto_tree_add_text(tree, tvb, offset, length,
"Enterprise: %s (%s)", oid_string, vb_oid_string);
#else /* defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H) */
proto_tree_add_text(tree, tvb, offset, length,
"Enterprise: %s", oid_string);
#endif /* defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H) */
g_free(oid_string);
}
g_free(enterprise);