diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-05-27 07:27:21 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-05-27 07:27:21 +0000 |
commit | d0d8be41a4f2f518c34eaedeeec603d5fb66bcb0 (patch) | |
tree | 287d9a4873c3bfc79f4cd12c75fe42c06710c039 | |
parent | b188881da1592d08e3a75ae72de90c4c2fbcc93f (diff) |
Call the Q.931 dissector through a handle.
Update Gerald's e-mail address.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3462 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | packet-lapd.c | 13 | ||||
-rw-r--r-- | packet-q931.c | 8 | ||||
-rw-r--r-- | packet-q931.h | 6 |
3 files changed, 16 insertions, 11 deletions
diff --git a/packet-lapd.c b/packet-lapd.c index aa83d0c00c..b71c360e9d 100644 --- a/packet-lapd.c +++ b/packet-lapd.c @@ -2,10 +2,10 @@ * Routines for LAPD frame disassembly * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-lapd.c,v 1.20 2001/01/22 00:20:29 guy Exp $ + * $Id: packet-lapd.c,v 1.21 2001/05/27 07:27:21 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 * * @@ -59,6 +59,8 @@ static gint ett_lapd = -1; static gint ett_lapd_address = -1; static gint ett_lapd_control = -1; +static dissector_handle_t q931_handle; + /* * Bits in the address field. */ @@ -145,7 +147,7 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (sapi) { case LAPD_SAPI_Q931: - dissect_q931(next_tvb, pinfo, tree); + call_dissector(q931_handle, next_tvb, pinfo, tree); break; default: @@ -203,5 +205,10 @@ proto_register_lapd(void) void proto_reg_handoff_lapd(void) { + /* + * Get handle for the Q.931 dissector. + */ + q931_handle = find_dissector("q931"); + dissector_add("wtap_encap", WTAP_ENCAP_LAPD, dissect_lapd, proto_lapd); } diff --git a/packet-q931.c b/packet-q931.c index f8439cb364..17a24c2760 100644 --- a/packet-q931.c +++ b/packet-q931.c @@ -2,12 +2,12 @@ * Routines for Q.931 frame disassembly * Guy Harris <guy@alum.mit.edu> * - * $Id: packet-q931.c,v 1.28 2001/03/30 07:57:38 guy Exp $ + * $Id: packet-q931.c,v 1.29 2001/05/27 07:27:21 guy Exp $ * * Modified by Andreas Sikkema for possible use with H.323 * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 * * @@ -2606,10 +2606,9 @@ dissect_q931_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) return q931_dissector(tvb, pinfo, tree, TRUE); } -void +static void dissect_q931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - pinfo->current_proto = "Q.931"; q931_dissector(tvb, pinfo, tree, FALSE); } @@ -2643,6 +2642,7 @@ proto_register_q931(void) proto_register_field_array (proto_q931, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + register_dissector("q931", dissect_q931, proto_q931); } void diff --git a/packet-q931.h b/packet-q931.h index a553f95a53..46944bab22 100644 --- a/packet-q931.h +++ b/packet-q931.h @@ -2,10 +2,10 @@ * Declarations of exported routines for Q.931 and Q.2931 frame disassembly * Guy Harris <guy@alum.mit.edu> * - * $Id: packet-q931.h,v 1.4 2000/08/11 13:34:02 deniel Exp $ + * $Id: packet-q931.h,v 1.5 2001/05/27 07:27:21 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 * * @@ -27,8 +27,6 @@ #ifndef __PACKET_Q931_H__ #define __PACKET_Q931_H__ -void dissect_q931(tvbuff_t *, packet_info *, proto_tree *); - extern void dissect_q931_bearer_capability_ie(tvbuff_t *, int, int, proto_tree *); |