forked from osmocom/wireshark
Update to FC to store the source and destination id in a guint
to make it easier to add matching and response times later. svn path=/trunk/; revision=7916
This commit is contained in:
parent
8830208060
commit
9e18043830
|
@ -1,7 +1,7 @@
|
|||
/* to_str.c
|
||||
* Routines for utilities to convert various other types to strings.
|
||||
*
|
||||
* $Id: to_str.c,v 1.25 2003/02/12 00:44:04 guy Exp $
|
||||
* $Id: to_str.c,v 1.26 2003/06/23 09:15:08 sahlberg Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -575,12 +575,22 @@ rel_time_to_secs_str(nstime_t *rel_time)
|
|||
return cur;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
fc_to_str(const guint8 *ad)
|
||||
{
|
||||
return bytestring_to_str (ad, 3, '.');
|
||||
}
|
||||
|
||||
/* convert the fc id stored in the three high order bytes of a guint32 into a
|
||||
fc id string*/
|
||||
gchar *
|
||||
fc32_to_str(const guint32 ad32)
|
||||
{
|
||||
const guint8 *ad=(guint8 *)&ad32;
|
||||
return bytestring_to_str (ad, 3, '.');
|
||||
}
|
||||
|
||||
/* FC Network Header Network Address Authority Identifiers */
|
||||
|
||||
#define FC_NH_NAA_IEEE 1 /* IEEE 802.1a */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* to_str.h
|
||||
* Definitions for utilities to convert various other types to strings.
|
||||
*
|
||||
* $Id: to_str.h,v 1.14 2003/02/12 00:44:04 guy Exp $
|
||||
* $Id: to_str.h,v 1.15 2003/06/23 09:15:08 sahlberg Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -49,6 +49,7 @@ extern gchar* ether_to_str(const guint8 *);
|
|||
extern gchar* ip_to_str(const guint8 *);
|
||||
extern void ip_to_str_buf(const guint8 *, gchar *);
|
||||
extern gchar* fc_to_str(const guint8 *);
|
||||
extern gchar* fc32_to_str(guint32);
|
||||
extern gchar* fcwwn_to_str (const guint8 *);
|
||||
extern char* ip6_to_str(const struct e_in6_addr *);
|
||||
extern gchar* ipx_addr_to_str(guint32, const guint8 *);
|
||||
|
|
23
packet-fc.c
23
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.6 2003/06/23 08:45:08 sahlberg Exp $
|
||||
* $Id: packet-fc.c,v 1.7 2003/06/23 09:15:08 sahlberg Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -454,7 +454,10 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint16 seqcnt;
|
||||
guint8 ftype;
|
||||
gboolean is_ack;
|
||||
|
||||
|
||||
guint32 s_id;
|
||||
guint32 d_id;
|
||||
|
||||
/* Make entries in Protocol column and Info column on summary display */
|
||||
if (check_col(pinfo->cinfo, COL_PROTOCOL))
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FC");
|
||||
|
@ -524,22 +527,20 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
proto_tree_add_uint_hidden (fc_tree, hf_fc_ftype, tvb, offset, 1,
|
||||
ftype);
|
||||
|
||||
d_id=tvb_get_letoh24(tvb, offset+1);
|
||||
proto_tree_add_string (fc_tree, hf_fc_did, tvb, offset+1, 3,
|
||||
fc_to_str ((guint8 *)tvb_get_ptr (tvb,
|
||||
offset+1, 3)));
|
||||
fc32_to_str (d_id));
|
||||
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)));
|
||||
fc32_to_str (d_id));
|
||||
|
||||
proto_tree_add_item (fc_tree, hf_fc_csctl, tvb, offset+4, 1, FALSE);
|
||||
|
||||
s_id=tvb_get_letoh24(tvb, offset+5);
|
||||
proto_tree_add_string (fc_tree, hf_fc_sid, tvb, offset+5, 3,
|
||||
fc_to_str ((guint8 *)tvb_get_ptr (tvb,
|
||||
offset+5, 3)));
|
||||
fc32_to_str (s_id));
|
||||
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)));
|
||||
|
||||
fc32_to_str (s_id));
|
||||
|
||||
if (ftype == FC_FTYPE_LINKCTL) {
|
||||
if (((r_ctl & 0x0F) == FC_LCTL_FBSYB) ||
|
||||
|
|
Loading…
Reference in New Issue