Call the Q.2931 dissector through a handle.

Update Gerald's e-mail address.

svn path=/trunk/; revision=3460
This commit is contained in:
Guy Harris 2001-05-27 07:15:26 +00:00
parent aa5d59b735
commit db6ad22e40
4 changed files with 26 additions and 45 deletions

View File

@ -1,7 +1,7 @@
# Makefile.am
# Automake file for Ethereal
#
# $Id: Makefile.am,v 1.326 2001/05/27 07:07:34 guy Exp $
# $Id: Makefile.am,v 1.327 2001/05/27 07:15:26 guy Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
@ -301,7 +301,6 @@ noinst_HEADERS = \
packet-osi-options.h \
packet-portmap.h \
packet-ppp.h \
packet-q2931.h \
packet-q931.h \
packet-raw.h \
packet-ripng.h \

View File

@ -2,10 +2,10 @@
* Routines for Q.2931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-q2931.c,v 1.15 2001/04/17 06:43:19 guy Exp $
* $Id: packet-q2931.c,v 1.16 2001/05/27 07:15:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998
*
*
@ -1970,7 +1970,7 @@ dissect_q2931_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree,
}
}
void
static void
dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int offset = 0;
@ -2132,4 +2132,6 @@ proto_register_q2931(void)
proto_q2931 = proto_register_protocol("Q.2931", "Q.2931", "q2931");
proto_register_field_array (proto_q2931, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("q2931", dissect_q2931, proto_q2931);
}

View File

@ -1,30 +0,0 @@
/* packet-q2931.h
*
* $Id: packet-q2931.h,v 1.3 2000/08/11 13:34:03 deniel 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_Q2931_H__
#define __PACKET_Q2931_H__
void dissect_q2931(tvbuff_t *, packet_info *, proto_tree *);
#endif

View File

@ -2,10 +2,10 @@
* Routines for SSCOP (Q.2110, Q.SAAL) frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-sscop.c,v 1.14 2001/05/27 04:50:51 guy Exp $
* $Id: packet-sscop.c,v 1.15 2001/05/27 07:15:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998
*
*
@ -36,12 +36,13 @@
#include <glib.h>
#include <string.h>
#include "packet.h"
#include "packet-q2931.h"
static int proto_sscop = -1;
static gint ett_sscop = -1;
static dissector_handle_t q2931_handle;
/*
* See
*
@ -304,7 +305,7 @@ dissect_sscop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
next_tvb = tvb_new_subset(tvb, 0, reported_length, reported_length);
if (pdu_type == SSCOP_SD)
dissect_q2931(next_tvb, pinfo, tree);
call_dissector(q2931_handle, next_tvb, pinfo, tree);
else
dissect_data(next_tvb, 0, pinfo, tree);
}
@ -315,10 +316,19 @@ dissect_sscop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_sscop(void)
{
static gint *ett[] = {
&ett_sscop,
};
proto_sscop = proto_register_protocol("SSCOP", "SSCOP", "sscop");
proto_register_subtree_array(ett, array_length(ett));
register_dissector("sscop", dissect_sscop, proto_sscop);
static gint *ett[] = {
&ett_sscop,
};
proto_sscop = proto_register_protocol("SSCOP", "SSCOP", "sscop");
proto_register_subtree_array(ett, array_length(ett));
register_dissector("sscop", dissect_sscop, proto_sscop);
}
void
proto_reg_handoff_sscop(void)
{
/*
* Get handle for the Q.2931 dissector.
*/
q2931_handle = find_dissector("q2931");
}