diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-12-10 02:49:31 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-12-10 02:49:31 +0000 |
commit | 9711eebb5b374fa6cec2d19a0147c2d6a9b53908 (patch) | |
tree | 451e95a651248460b50b4a02eb155ba07ae0b03d /packet-ipfc.c | |
parent | 92d90f4f28aecff5b11e1b9712e6eea2bf50c8e4 (diff) |
Move the handling of the Network_Header for full FC frames into the FC
dissector, and have the LLC dissector register itself as the dissector
for IP-over-FC frames, as the payload is just an LLC 802.2 header plus
payload for the protocol specified by that header.
In the dissector for IP-over-FC as a Wiretap link-layer type, have its
top-level item be a protocol item rather than a text item, and don't
register it as the dissector for IP-over-FC frames from the FC dissector
- it assumes what it's handed includes the Network_Header, but for full
FC frames, the FC dissector has already consumed the Network_Header.
Move the definitions of the value_string tables out of the header file;
most of them are used only in one file, so define them in that file, and
for "fc_fc4_val", define it in "packet-fc.c", make it not static, and
declare it in "packet-fc.h".
Use FALSE, rather than 0, as the last argument to
"proto_tree_add_item()" calls that add a big-endian value.
Fix one "proto_tree_add_uint()" call that was supposed to be a
"proto_tree_add_item()" call.
Use "%u", not "%d", to display unsigned values.
svn path=/trunk/; revision=6773
Diffstat (limited to 'packet-ipfc.c')
-rw-r--r-- | packet-ipfc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packet-ipfc.c b/packet-ipfc.c index f4d83b9b8c..91d39dc79b 100644 --- a/packet-ipfc.c +++ b/packet-ipfc.c @@ -1,8 +1,10 @@ /* packet-ipfc.c - * Routines for Decoding FC header for IP/FC + * Routines for Decoding Network_Header for IP-over-FC when we only + * capture the frame starting at the Network_Header (as opposed to + * when we have the full FC frame). * Copyright 2001, Dinesh G Dutt <ddutt@cisco.com> * - * $Id: packet-ipfc.c,v 1.4 2002/12/08 22:35:30 guy Exp $ + * $Id: packet-ipfc.c,v 1.5 2002/12/10 02:49:31 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -74,8 +76,8 @@ dissect_ipfc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "IP/FC"); if (tree) { - ti = proto_tree_add_text (tree, tvb, offset, 16, - "Network Header"); + ti = proto_tree_add_protocol_format (tree, proto_ipfc, tvb, offset, 16, + "IP Over FC Network_Header"); ipfc_tree = proto_item_add_subtree (ti, ett_ipfc); proto_tree_add_string (ipfc_tree, hf_ipfc_network_da, tvb, offset, 8, @@ -101,10 +103,10 @@ proto_register_ipfc (void) /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { { &hf_ipfc_network_da, - {"Network DA", "ipfc.nethdr.da", FT_STRING, BASE_HEX, NULL, + {"Network DA", "ipfc.nh.da", FT_STRING, BASE_HEX, NULL, 0x0, "", HFILL}}, { &hf_ipfc_network_sa, - {"Network SA", "ipfc.nethdr.sa", FT_STRING, BASE_HEX, NULL, + {"Network SA", "ipfc.nh.sa", FT_STRING, BASE_HEX, NULL, 0x0, "", HFILL}}, }; @@ -131,7 +133,6 @@ proto_reg_handoff_ipfc (void) dissector_handle_t ipfc_handle; ipfc_handle = create_dissector_handle (dissect_ipfc, proto_ipfc); - dissector_add("fc.ftype", FC_FTYPE_IP, ipfc_handle); dissector_add("wtap_encap", WTAP_ENCAP_IP_OVER_FC, ipfc_handle); llc_handle = find_dissector ("llc"); |