diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-22 00:20:29 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-22 00:20:29 +0000 |
commit | 79e1fdb9e56339d8d7e8d9df090dc0386cf4131e (patch) | |
tree | 35171754ad82def133bb42df8e8c630cd917c7e3 /packet-lapd.c | |
parent | d9718a693d2ee60f6e9b018313efb4905b5a2509 (diff) |
Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="
statements.
Move the setting of the Protocol column in the Appletalk ARP and IPX
dissectors before anything is fetched from the packet, and also clear
the Info column at that point in those and some other dissectors, so
that if an exception is thrown, the columns don't reflect the previous
protocol.
Fix the registration of the IPX RIP dissector to use the right protocol
ID.
svn path=/trunk/; revision=2928
Diffstat (limited to 'packet-lapd.c')
-rw-r--r-- | packet-lapd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/packet-lapd.c b/packet-lapd.c index 0808d62aeb..aa83d0c00c 100644 --- a/packet-lapd.c +++ b/packet-lapd.c @@ -2,7 +2,7 @@ * Routines for LAPD frame disassembly * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-lapd.c,v 1.19 2001/01/09 06:31:38 guy Exp $ + * $Id: packet-lapd.c,v 1.20 2001/01/22 00:20:29 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -93,12 +93,10 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gboolean is_response; tvbuff_t *next_tvb; - CHECK_DISPLAY_AS_DATA(proto_lapd, tvb, pinfo, tree); - - pinfo->current_proto = "LAPD"; - if (check_col(pinfo->fd, COL_PROTOCOL)) col_set_str(pinfo->fd, COL_PROTOCOL, "LAPD"); + if (check_col(pinfo->fd, COL_INFO)) + col_clear(pinfo->fd, COL_INFO); address = tvb_get_ntohs(tvb, 0); cr = address & LAPD_CR; @@ -120,7 +118,6 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->fd, COL_RES_DL_SRC, "Network"); } - if (tree) { ti = proto_tree_add_item(tree, proto_lapd, tvb, 0, 3, FALSE); lapd_tree = proto_item_add_subtree(ti, ett_lapd); @@ -165,7 +162,7 @@ proto_register_lapd(void) static hf_register_info hf[] = { { &hf_lapd_address, { "Address Field", "lapd.address", FT_UINT16, BASE_HEX, NULL, 0x0, - "" }}, + "Address" }}, { &hf_lapd_sapi, { "SAPI", "lapd.sapi", FT_UINT16, BASE_DEC, VALS(lapd_sapi_vals), LAPD_SAPI, @@ -189,7 +186,7 @@ proto_register_lapd(void) { &hf_lapd_control, { "Control Field", "lapd.control", FT_UINT16, BASE_HEX, NULL, 0x0, - "" }}, + "Control field" }}, }; static gint *ett[] = { &ett_lapd, |