diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-06-23 08:45:08 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-06-23 08:45:08 +0000 |
commit | 883020806010ced14cc7ecc9c6961bd9b861c19b (patch) | |
tree | 401bacb228d3e92a07d6f2bedb75ede852c4b7bc /packet-fc.c | |
parent | e0d4c9a309e0c421e7f220ab26d50dd27564ca00 (diff) |
Update to the FC dissector: add a hidden fc.id field that matches either
the source or destination address
so that "fc.id==01:02:03 && fc.id==01.02.04" will pick up all packets
between ..03 and ..04 regardless of which direction they go.
svn path=/trunk/; revision=7915
Diffstat (limited to 'packet-fc.c')
-rw-r--r-- | packet-fc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/packet-fc.c b/packet-fc.c index 68fe7f6244..40a07c63df 100644 --- a/packet-fc.c +++ b/packet-fc.c @@ -2,7 +2,7 @@ * Routines for Fibre Channel Decoding (FC Header, Link Ctl & Basic Link Svc) * Copyright 2001, Dinesh G Dutt <ddutt@cisco.com> * - * $Id: packet-fc.c,v 1.5 2003/03/05 07:41:23 guy Exp $ + * $Id: packet-fc.c,v 1.6 2003/06/23 08:45:08 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -77,6 +77,7 @@ static int hf_fc_rctl = -1; static int hf_fc_did = -1; static int hf_fc_csctl = -1; static int hf_fc_sid = -1; +static int hf_fc_id = -1; static int hf_fc_type = -1; static int hf_fc_fctl = -1; static int hf_fc_seqid = -1; @@ -526,11 +527,19 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_string (fc_tree, hf_fc_did, tvb, offset+1, 3, fc_to_str ((guint8 *)tvb_get_ptr (tvb, offset+1, 3))); + proto_tree_add_string_hidden (fc_tree, hf_fc_id, tvb, offset+1, 3, + fc_to_str ((guint8 *)tvb_get_ptr (tvb, + offset+1, 3))); + proto_tree_add_item (fc_tree, hf_fc_csctl, tvb, offset+4, 1, FALSE); proto_tree_add_string (fc_tree, hf_fc_sid, tvb, offset+5, 3, fc_to_str ((guint8 *)tvb_get_ptr (tvb, offset+5, 3))); + proto_tree_add_string_hidden (fc_tree, hf_fc_id, tvb, offset+5, 3, + fc_to_str ((guint8 *)tvb_get_ptr (tvb, + offset+5, 3))); + if (ftype == FC_FTYPE_LINKCTL) { if (((r_ctl & 0x0F) == FC_LCTL_FBSYB) || @@ -757,6 +766,9 @@ proto_register_fc(void) { &hf_fc_sid, {"Src Addr", "fc.s_id", FT_STRING, BASE_HEX, NULL, 0x0, "Source Address", HFILL}}, + { &hf_fc_id, + {"Addr", "fc.id", FT_STRING, BASE_HEX, NULL, 0x0, + "Source or Destination Address", HFILL}}, { &hf_fc_type, {"Type", "fc.type", FT_UINT8, BASE_HEX, VALS (fc_fc4_val), 0x0, "", HFILL}}, |