Call the GVRP dissector through a handle.

Update Gerald's e-mail address.

svn path=/trunk/; revision=3459
This commit is contained in:
Guy Harris 2001-05-27 07:07:34 +00:00
parent fe4dc960d3
commit aa5d59b735
4 changed files with 17 additions and 49 deletions

View File

@ -1,10 +1,10 @@
# Makefile.am
# Automake file for Ethereal
#
# $Id: Makefile.am,v 1.325 2001/05/27 04:50:51 guy Exp $
# $Id: Makefile.am,v 1.326 2001/05/27 07:07:34 guy Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@zing.org>
# By Gerald Combs <gerald@ethereal.com>
# Copyright 1998 Gerald Combs
#
#
@ -271,7 +271,6 @@ noinst_HEADERS = \
packet-fddi.h \
packet-fr.h \
packet-frame.h \
packet-gvrp.h \
packet-h261.h \
packet-hclnfsd.h \
packet-http.h \

View File

@ -1,12 +1,12 @@
/* packet-bpdu.c
* Routines for BPDU (Spanning Tree Protocol) disassembly
*
* $Id: packet-bpdu.c,v 1.24 2001/03/13 21:34:23 gram Exp $
* $Id: packet-bpdu.c,v 1.25 2001/05/27 07:07:34 guy Exp $
*
* Copyright 1999 Christophe Tronche <ch.tronche@computer.org>
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
@ -45,9 +45,6 @@
#include "ppptypes.h"
#include "resolv.h"
/* Include this for GVRP dissector */
#include "packet-gvrp.h"
/* Offsets of fields within a BPDU */
#define BPDU_IDENTIFIER 0
@ -79,6 +76,8 @@ static int hf_bpdu_forward_delay = -1;
static gint ett_bpdu = -1;
static dissector_handle_t gvrp_handle;
static void
dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
guint16 protocol_identifier;
@ -126,7 +125,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
case 0x21:
/* for GVRP */
dissect_gvrp(tvb, pinfo, tree);
call_dissector(gvrp_handle, tvb, pinfo, tree);
return;
}
@ -336,6 +335,11 @@ proto_register_bpdu(void)
void
proto_reg_handoff_bpdu(void)
{
/*
* Get handle for the GVRP dissector.
*/
gvrp_handle = find_dissector("gvrp");
dissector_add("llc.dsap", SAP_BPDU, dissect_bpdu, proto_bpdu);
dissector_add("ppp.protocol", PPP_BPDU, dissect_bpdu, proto_bpdu);
}

View File

@ -2,10 +2,10 @@
* Routines for GVRP (GARP VLAN Registration Protocol) dissection
* Copyright 2000, Kevin Shi <techishi@ms22.hinet.net>
*
* $Id: packet-gvrp.c,v 1.4 2001/01/03 06:55:28 guy Exp $
* $Id: packet-gvrp.c,v 1.5 2001/05/27 07:07:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
@ -105,7 +105,7 @@ static const value_string event_vals[] = {
};
/* Code to actually dissect the packets */
void
static void
dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
@ -114,10 +114,6 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 octet;
int msg_index, attr_index, offset = 0, length = tvb_reported_length(tvb);
CHECK_DISPLAY_AS_DATA(proto_gvrp, tvb, pinfo, tree);
pinfo->current_proto = "GVRP";
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "GVRP");
@ -343,4 +339,6 @@ proto_register_gvrp(void)
* used by GVRP */
proto_register_field_array(proto_gvrp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("gvrp", dissect_gvrp, proto_gvrp);
}

View File

@ -1,33 +0,0 @@
/* packet-gvrp.h
* Declarations of routines for GVRP (GARP VLAN Registration Protocol)
* dissection
* Copyright 2000, Kevin Shi <techishi@ms22.hinet.net>
*
* $Id: packet-gvrp.h,v 1.1 2000/11/30 09:31:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PACKET_GVRP_H__
#define __PACKET_GVRP_H__
void dissect_gvrp(tvbuff_t *, packet_info *, proto_tree *);
#endif /* packet-gvrp.h */