Don't define the variables passed to "dissect_snmp_pdu()" if we don't

have an SNMP dissector.

svn path=/trunk/; revision=1056
This commit is contained in:
Guy Harris 1999-11-18 08:28:30 +00:00
parent 71fb29b83d
commit d6a877f3c5
1 changed files with 11 additions and 1 deletions

View File

@ -1,7 +1,7 @@
/* packet-atm.c
* Routines for ATM packet disassembly
*
* $Id: packet-atm.c,v 1.3 1999/11/18 07:29:54 guy Exp $
* $Id: packet-atm.c,v 1.4 1999/11/18 08:28:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -36,18 +36,24 @@
#include "packet.h"
#include "resolv.h"
#if defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H)
#include "packet-snmp.h"
#endif
static int proto_atm = -1;
static int proto_atm_lane = -1;
#if defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H)
static int proto_ilmi = -1;
#endif
static gint ett_atm = -1;
static gint ett_atm_lane = -1;
static gint ett_atm_lane_lc_lan_dest = -1;
static gint ett_atm_lane_lc_lan_dest_rd = -1;
static gint ett_atm_lane_lc_flags = -1;
#if defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H)
static gint ett_ilmi = -1;
#endif
/*
* See
@ -563,10 +569,14 @@ proto_register_atm(void)
&ett_atm_lane_lc_lan_dest,
&ett_atm_lane_lc_lan_dest_rd,
&ett_atm_lane_lc_flags,
#if defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H)
&ett_ilmi,
#endif
};
proto_atm = proto_register_protocol("ATM", "atm");
proto_atm_lane = proto_register_protocol("ATM LANE", "lane");
#if defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H)
proto_ilmi = proto_register_protocol("ILMI", "ilmi");
#endif
proto_register_subtree_array(ett, array_length(ett));
}