diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-01-16 18:37:56 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-01-16 18:37:56 +0000 |
commit | c04dd5fda9af1d2fdac3eb2d16b7e6de757558a9 (patch) | |
tree | f2ddb169bd77855f84a5a0f44b6b7585023cbd5c /epan | |
parent | b80813a45c6309757590bcfe452364f8dab8270f (diff) |
Use tvb_fc_to_str() and tvb_fcwwm_to_str().
svn path=/trunk/; revision=35557
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-fcfzs.c | 32 | ||||
-rw-r--r-- | epan/dissectors/packet-fcip.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-fcsp.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-fcswils.c | 33 | ||||
-rw-r--r-- | epan/dissectors/packet-fip.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-ipfc.c | 10 |
6 files changed, 34 insertions, 61 deletions
diff --git a/epan/dissectors/packet-fcfzs.c b/epan/dissectors/packet-fcfzs.c index 8606a59db3..391fd620d7 100644 --- a/epan/dissectors/packet-fcfzs.c +++ b/epan/dissectors/packet-fcfzs.c @@ -188,9 +188,7 @@ dissect_fcfzs_zoneset (tvbuff_t *tvb, proto_tree *tree, int offset) case FC_FZS_ZONEMBR_NWWN: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, offset+4, 8, - fcwwn_to_str (tvb_get_ptr (tvb, - offset+4, - 8))); + tvb_fcwwn_to_str (tvb, offset+4)); break; case FC_FZS_ZONEMBR_DP: proto_tree_add_string_format (tree, @@ -203,16 +201,12 @@ dissect_fcfzs_zoneset (tvbuff_t *tvb, proto_tree *tree, int offset) case FC_FZS_ZONEMBR_FCID: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, offset+4, 4, - fc_to_str (tvb_get_ptr (tvb, - offset+4, - 3))); + tvb_fc_to_str (tvb, offset+4)); break; case FC_FZS_ZONEMBR_PWWN_LUN: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, offset+4, 8, - fcwwn_to_str (tvb_get_ptr (tvb, - offset+4, - 8))); + tvb_fcwwn_to_str (tvb, offset+4)); proto_tree_add_item (tree, hf_fcfzs_mbrid_lun, tvb, offset+8, 8, 0); break; @@ -229,9 +223,7 @@ dissect_fcfzs_zoneset (tvbuff_t *tvb, proto_tree *tree, int offset) case FC_FZS_ZONEMBR_FCID_LUN: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, offset+4, 4, - fc_to_str (tvb_get_ptr (tvb, - offset+4, - 3))); + tvb_fc_to_str (tvb, offset+4)); proto_tree_add_item (tree, hf_fcfzs_mbrid_lun, tvb, offset+4, 8, 0); break; @@ -429,9 +421,7 @@ dissect_fcfzs_gzm (tvbuff_t *tvb, proto_tree *tree, guint8 isreq) case FC_FZS_ZONEMBR_NWWN: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, offset+4, 8, - fcwwn_to_str (tvb_get_ptr (tvb, - offset+4, - 8))); + tvb_fcwwn_to_str (tvb, offset+4)); break; case FC_FZS_ZONEMBR_DP: proto_tree_add_string_format (tree, @@ -444,9 +434,7 @@ dissect_fcfzs_gzm (tvbuff_t *tvb, proto_tree *tree, guint8 isreq) case FC_FZS_ZONEMBR_FCID: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, offset+4, 4, - fc_to_str (tvb_get_ptr (tvb, - offset+4, - 3))); + tvb_fc_to_str (tvb, offset+4)); break; default: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, @@ -566,9 +554,7 @@ dissect_fcfzs_arzm (tvbuff_t *tvb, proto_tree *tree, guint8 isreq) case FC_FZS_ZONEMBR_NWWN: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, offset+4, 8, - fcwwn_to_str (tvb_get_ptr (tvb, - offset+4, - 8))); + tvb_fcwwn_to_str (tvb, offset+4)); break; case FC_FZS_ZONEMBR_DP: proto_tree_add_string_format (tree, @@ -581,9 +567,7 @@ dissect_fcfzs_arzm (tvbuff_t *tvb, proto_tree *tree, guint8 isreq) case FC_FZS_ZONEMBR_FCID: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, offset+4, 4, - fc_to_str (tvb_get_ptr (tvb, - offset+4, - 3))); + tvb_fc_to_str (tvb, offset+4)); break; default: proto_tree_add_string (tree, hf_fcfzs_mbrid, tvb, diff --git a/epan/dissectors/packet-fcip.c b/epan/dissectors/packet-fcip.c index 2435877359..0923c6a075 100644 --- a/epan/dissectors/packet-fcip.c +++ b/epan/dissectors/packet-fcip.c @@ -351,7 +351,7 @@ dissect_fcip_sf (tvbuff_t *tvb, proto_tree *tree, gint offset) { if (tree) { proto_tree_add_string (tree, hf_fcip_src_wwn, tvb, offset, 8, - fcwwn_to_str (tvb_get_ptr (tvb, offset, 8))); + tvb_fcwwn_to_str (tvb, offset)); proto_tree_add_item (tree, hf_fcip_src_entity_id, tvb, offset+8, 8, ENC_NA); proto_tree_add_item (tree, hf_fcip_conn_nonce, tvb, offset+16, 8, @@ -360,7 +360,7 @@ dissect_fcip_sf (tvbuff_t *tvb, proto_tree *tree, gint offset) proto_tree_add_item (tree, hf_fcip_conn_flags, tvb, offset+24, 1, 0); proto_tree_add_item (tree, hf_fcip_conn_code, tvb, offset+26, 2, 0); proto_tree_add_string (tree, hf_fcip_dst_wwn, tvb, offset+30, 8, - fcwwn_to_str (tvb_get_ptr (tvb, offset+30, 8))); + tvb_fcwwn_to_str (tvb, offset+30)); proto_tree_add_item (tree, hf_fcip_katov, tvb, offset+38, 4, 0); } } diff --git a/epan/dissectors/packet-fcsp.c b/epan/dissectors/packet-fcsp.c index 2a70120869..342af7c729 100644 --- a/epan/dissectors/packet-fcsp.c +++ b/epan/dissectors/packet-fcsp.c @@ -250,9 +250,7 @@ static void dissect_fcsp_dhchap_challenge (tvbuff_t *tvb, proto_tree *tree) if (name_type == FC_AUTH_NAME_TYPE_WWN) { proto_tree_add_string (tree, hf_auth_responder_wwn, tvb, offset+4, - 8, - fcwwn_to_str (tvb_get_ptr (tvb, offset+4, - 8))); + 8, tvb_fcwwn_to_str (tvb, offset+4)); } else { proto_tree_add_item (tree, hf_auth_responder_name, tvb, offset+4, @@ -341,7 +339,7 @@ static void dissect_fcsp_auth_negotiate (tvbuff_t *tvb, proto_tree *tree) if (name_type == FC_AUTH_NAME_TYPE_WWN) { proto_tree_add_string (tree, hf_auth_initiator_wwn, tvb, offset+4, 8, - fcwwn_to_str (tvb_get_ptr (tvb, offset+4, 8))); + tvb_fcwwn_to_str (tvb, offset+4)); } else { proto_tree_add_item (tree, hf_auth_initiator_name, tvb, offset+4, diff --git a/epan/dissectors/packet-fcswils.c b/epan/dissectors/packet-fcswils.c index 60565f5465..a1cdee66d3 100644 --- a/epan/dissectors/packet-fcswils.c +++ b/epan/dissectors/packet-fcswils.c @@ -929,7 +929,7 @@ dissect_swils_efp (tvbuff_t *tvb, proto_tree *efp_tree, guint8 isreq _U_) case FC_SWILS_LRECTYPE_DOMAIN: proto_tree_add_item (lrec_tree, hf_swils_efp_dom_id, tvb, offset+1, 1, 0); proto_tree_add_string (lrec_tree, hf_swils_efp_switch_name, tvb, offset+8, 8, - fcwwn_to_str (tvb_get_ptr(tvb, offset+8, 8))); + tvb_fcwwn_to_str (tvb, offset+8)); break; case FC_SWILS_LRECTYPE_MCAST: @@ -949,7 +949,7 @@ dissect_swils_dia (tvbuff_t *tvb, proto_tree *dia_tree, guint8 isreq _U_) if (dia_tree) { proto_tree_add_string (dia_tree, hf_swils_dia_switch_name, tvb, offset+4, - 8, fcwwn_to_str (tvb_get_ptr (tvb, offset+4, 8))); + 8, tvb_fcwwn_to_str (tvb, offset+4)); } } @@ -965,7 +965,7 @@ dissect_swils_rdi (tvbuff_t *tvb, proto_tree *rdi_tree, guint8 isreq) proto_tree_add_item (rdi_tree, hf_swils_rdi_payload_len, tvb, offset+2, 2, 0); proto_tree_add_string (rdi_tree, hf_swils_rdi_req_sname, tvb, offset+4, - 8, fcwwn_to_str (tvb_get_ptr (tvb, offset+4, 8))); + 8, tvb_fcwwn_to_str (tvb, offset+4)); /* 12 is the length of the initial header and 4 is the size of each * domain request record. @@ -1033,7 +1033,7 @@ static void dissect_swils_fspf_ldrec (tvbuff_t *tvb, proto_tree *tree, int offset) { proto_tree_add_string (tree, hf_swils_ldrec_linkid, tvb, offset, 4, - fc_to_str (tvb_get_ptr (tvb, offset+1, 3))); + tvb_fc_to_str (tvb, offset+1)); proto_tree_add_item (tree, hf_swils_ldrec_out_pidx, tvb, offset+5, 3, 0); proto_tree_add_item (tree, hf_swils_ldrec_nbr_pidx, tvb, offset+9, 3, 0); proto_tree_add_item (tree, hf_swils_ldrec_link_type, tvb, offset+12, 1, 0); @@ -1176,8 +1176,7 @@ dissect_swils_rscn (tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq) proto_tree_add_item (rscn_tree, hf_swils_rscn_addrfmt, tvb, offset+4, 1, 0); proto_tree_add_string (rscn_tree, hf_swils_rscn_affectedport, tvb, - offset+5, 3, fc_to_str (tvb_get_ptr (tvb, - offset+5, 3))); + offset+5, 3, tvb_fc_to_str (tvb, offset+5)); proto_tree_add_item (rscn_tree, hf_swils_rscn_detectfn, tvb, offset+8, 4, 0); numrec = tvb_get_ntohl (tvb, offset+12); @@ -1198,11 +1197,11 @@ dissect_swils_rscn (tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq) proto_tree_add_item (dev_tree, hf_swils_rscn_portstate, tvb, offset, 1, 0); proto_tree_add_string (dev_tree, hf_swils_rscn_portid, tvb, offset+1, 3, - fc_to_str (tvb_get_ptr (tvb, offset+1, 3))); + tvb_fc_to_str (tvb, offset+1)); proto_tree_add_string (dev_tree, hf_swils_rscn_pwwn, tvb, offset+4, 8, - fcwwn_to_str (tvb_get_ptr (tvb, offset+4, 8))); + tvb_fcwwn_to_str (tvb, offset+4)); proto_tree_add_string (dev_tree, hf_swils_rscn_nwwn, tvb, offset+12, 8, - fcwwn_to_str (tvb_get_ptr (tvb, offset+12, 8))); + tvb_fcwwn_to_str (tvb, offset+12)); offset += 20; } } @@ -1242,9 +1241,7 @@ dissect_swils_zone_mbr (tvbuff_t *tvb, proto_tree *zmbr_tree, int offset) case FC_SWILS_ZONEMBR_WWN: proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb, offset+4, 8, - fcwwn_to_str (tvb_get_ptr (tvb, - offset+4, - 8))); + tvb_fcwwn_to_str (tvb, offset+4)); break; case FC_SWILS_ZONEMBR_DP: g_snprintf(dpbuf, sizeof(dpbuf), "0x%08x", tvb_get_ntohl (tvb, offset+4)); @@ -1254,9 +1251,7 @@ dissect_swils_zone_mbr (tvbuff_t *tvb, proto_tree *zmbr_tree, int offset) case FC_SWILS_ZONEMBR_FCID: proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb, offset+4, 4, - fc_to_str (tvb_get_ptr (tvb, - offset+5, - 3))); + tvb_fc_to_str (tvb, offset+5)); break; case FC_SWILS_ZONEMBR_ALIAS: str = zonenm_to_str (tvb, offset+4); @@ -1266,9 +1261,7 @@ dissect_swils_zone_mbr (tvbuff_t *tvb, proto_tree *zmbr_tree, int offset) case FC_SWILS_ZONEMBR_WWN_LUN: proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb, offset+4, 8, - fcwwn_to_str (tvb_get_ptr (tvb, - offset+4, - 8))); + tvb_fcwwn_to_str (tvb, offset+4)); proto_tree_add_item (zmbr_tree, hf_swils_zone_mbrid_lun, tvb, offset+12, 8, 0); break; @@ -1282,9 +1275,7 @@ dissect_swils_zone_mbr (tvbuff_t *tvb, proto_tree *zmbr_tree, int offset) case FC_SWILS_ZONEMBR_FCID_LUN: proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb, offset+4, 4, - fc_to_str (tvb_get_ptr (tvb, - offset+5, - 3))); + tvb_fc_to_str (tvb, offset+5)); proto_tree_add_item (zmbr_tree, hf_swils_zone_mbrid_lun, tvb, offset+8, 8, 0); break; diff --git a/epan/dissectors/packet-fip.c b/epan/dissectors/packet-fip.c index f746472b80..d83aa04323 100644 --- a/epan/dissectors/packet-fip.c +++ b/epan/dissectors/packet-fip.c @@ -461,7 +461,7 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case FIP_DT_MAP_OUI: subtree = proto_item_add_subtree(item, ett_fip_dt_map); fip_desc_type_len(subtree, desc_tvb); - text = fc_to_str(tvb_get_ptr(desc_tvb, 5, 3)); + text = tvb_fc_to_str(desc_tvb, 5); proto_tree_add_string(subtree, hf_fip_desc_map, desc_tvb, 5, 3, text); proto_item_append_text(item, "%s", text); @@ -469,7 +469,7 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case FIP_DT_NAME: subtree = proto_item_add_subtree(item, ett_fip_dt_name); fip_desc_type_len(subtree, desc_tvb); - text = fcwwn_to_str(tvb_get_ptr(desc_tvb, 4, 8)); + text = tvb_fcwwn_to_str(desc_tvb, 4); proto_tree_add_string(subtree, hf_fip_desc_name, desc_tvb, 4, 8, text); proto_item_append_text(item, "%s", text); @@ -479,10 +479,10 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) fip_desc_type_len(subtree, desc_tvb); proto_tree_add_item(subtree, hf_fip_desc_fab_vfid, desc_tvb, 2, 2, FALSE); - text = fc_to_str(tvb_get_ptr(desc_tvb, 5, 3)); + text = tvb_fc_to_str(desc_tvb, 5); proto_tree_add_string(subtree, hf_fip_desc_fab_map, desc_tvb, 5, 3, text); - text = fcwwn_to_str(tvb_get_ptr(desc_tvb, 8, 8)); + text = tvb_fcwwn_to_str(desc_tvb, 8); proto_tree_add_string(subtree, hf_fip_desc_fab_name, desc_tvb, 8, 8, text); proto_item_append_text(item, "%s", text); @@ -511,7 +511,7 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 2, 6, FALSE); proto_tree_add_item(subtree, hf_fip_desc_vn_fid, desc_tvb, 9, 3, FALSE); - text = fcwwn_to_str(tvb_get_ptr(desc_tvb, 12, 8)); + text = tvb_fcwwn_to_str(desc_tvb, 12); proto_tree_add_string(subtree, hf_fip_desc_vn_wwpn, desc_tvb, 12, 8, text); proto_item_append_text(item, "MAC %s FC_ID %6.6x", diff --git a/epan/dissectors/packet-ipfc.c b/epan/dissectors/packet-ipfc.c index e3b7f49bf5..08edffd006 100644 --- a/epan/dissectors/packet-ipfc.c +++ b/epan/dissectors/packet-ipfc.c @@ -15,12 +15,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -81,9 +81,9 @@ dissect_ipfc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ipfc_tree = proto_item_add_subtree (ti, ett_ipfc); proto_tree_add_string (ipfc_tree, hf_ipfc_network_da, tvb, offset, 8, - fcwwn_to_str (tvb_get_ptr (tvb, offset, 8))); + tvb_fcwwn_to_str (tvb, offset)); proto_tree_add_string (ipfc_tree, hf_ipfc_network_sa, tvb, offset+8, 8, - fcwwn_to_str (tvb_get_ptr (tvb, offset+8, 8))); + tvb_fcwwn_to_str (tvb, offset+8)); } next_tvb = tvb_new_subset_remaining (tvb, 16); @@ -98,7 +98,7 @@ dissect_ipfc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) void proto_register_ipfc (void) -{ +{ /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { |