diff options
Diffstat (limited to 'epan/dissectors/packet-fcfcs.c')
-rw-r--r-- | epan/dissectors/packet-fcfcs.c | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/epan/dissectors/packet-fcfcs.c b/epan/dissectors/packet-fcfcs.c index 9376e01bec..3f8457ca3f 100644 --- a/epan/dissectors/packet-fcfcs.c +++ b/epan/dissectors/packet-fcfcs.c @@ -21,61 +21,63 @@ void proto_register_fcfcs(void); void proto_reg_handoff_fcfcs(void); +static dissector_handle_t fcs_handle; + /* * See the FC-GS3 specification. */ /* Initialize the protocol and registered fields */ -static int proto_fcfcs = -1; -static int hf_fcs_opcode = -1; -static int hf_fcs_iename = -1; -static int hf_fcs_ietype = -1; -static int hf_fcs_iedomainid = -1; -static int hf_fcs_mgmtid = -1; -static int hf_fcs_fabricname = -1; -static int hf_fcs_mgmtaddr = -1; -static int hf_fcs_lname = -1; -static int hf_fcs_vendorname = -1; -static int hf_fcs_modelname = -1; -static int hf_fcs_portname = -1; -static int hf_fcs_portmodtype = -1; -static int hf_fcs_porttxtype = -1; -static int hf_fcs_porttype = -1; -static int hf_fcs_physportnum = -1; -static int hf_fcs_portflags = -1; -static int hf_fcs_portstate = -1; -static int hf_fcs_platformname_len = -1; -static int hf_fcs_platformname = -1; -static int hf_fcs_platformnname = -1; -static int hf_fcs_platformtype = -1; -static int hf_fcs_platformaddr = -1; -static int hf_fcs_reason = -1; -static int hf_fcs_rjtdetail = -1; -static int hf_fcs_vendor = -1; -static int hf_fcs_numcap = -1; -static int hf_fcs_mgmt_subtype = -1; -static int hf_fcs_unsmask = -1; -static int hf_fcs_vnd_capmask = -1; -static int hf_fcs_fcsmask = -1; -static int hf_fcs_maxres_size = -1; -static int hf_fcs_releasecode = -1; +static int proto_fcfcs; +static int hf_fcs_opcode; +static int hf_fcs_iename; +static int hf_fcs_ietype; +static int hf_fcs_iedomainid; +static int hf_fcs_mgmtid; +static int hf_fcs_fabricname; +static int hf_fcs_mgmtaddr; +static int hf_fcs_lname; +static int hf_fcs_vendorname; +static int hf_fcs_modelname; +static int hf_fcs_portname; +static int hf_fcs_portmodtype; +static int hf_fcs_porttxtype; +static int hf_fcs_porttype; +static int hf_fcs_physportnum; +static int hf_fcs_portflags; +static int hf_fcs_portstate; +static int hf_fcs_platformname_len; +static int hf_fcs_platformname; +static int hf_fcs_platformnname; +static int hf_fcs_platformtype; +static int hf_fcs_platformaddr; +static int hf_fcs_reason; +static int hf_fcs_rjtdetail; +static int hf_fcs_vendor; +static int hf_fcs_numcap; +static int hf_fcs_mgmt_subtype; +static int hf_fcs_unsmask; +static int hf_fcs_vnd_capmask; +static int hf_fcs_fcsmask; +static int hf_fcs_maxres_size; +static int hf_fcs_releasecode; /* Generated from convert_proto_tree_add_text.pl */ -static int hf_fcfcs_num_ie_entries = -1; -static int hf_fcfcs_num_mgmt_addresses = -1; -static int hf_fcfcs_list_length = -1; -static int hf_fcfcs_vendor_specific_information = -1; -static int hf_fcfcs_num_port_entries = -1; -static int hf_fcfcs_num_attached_port_entries = -1; -static int hf_fcfcs_num_platform_node_name_entries = -1; -static int hf_fcfcs_num_mgmt_address_entries = -1; -static int hf_fcfcs_num_platform_name_entries = -1; +static int hf_fcfcs_num_ie_entries; +static int hf_fcfcs_num_mgmt_addresses; +static int hf_fcfcs_list_length; +static int hf_fcfcs_vendor_specific_information; +static int hf_fcfcs_num_port_entries; +static int hf_fcfcs_num_attached_port_entries; +static int hf_fcfcs_num_platform_node_name_entries; +static int hf_fcfcs_num_mgmt_address_entries; +static int hf_fcfcs_num_platform_name_entries; /* Generated from convert_proto_tree_add_text.pl */ -static expert_field ei_fcfcs_no_record_of_exchange = EI_INIT; +static expert_field ei_fcfcs_no_record_of_exchange; /* Initialize the subtree pointers */ -static gint ett_fcfcs = -1; +static gint ett_fcfcs; typedef struct _fcfcs_conv_key { guint32 conv_idx; @@ -242,17 +244,17 @@ dissect_fcfcs_gieil (tvbuff_t *tvb, proto_tree *tree, gboolean isreq) prevlen = 0; len = tvb_strsize(tvb, offset+4); proto_tree_add_item (tree, hf_fcs_vendorname, tvb, offset+4, - len, ENC_ASCII|ENC_NA); + len, ENC_ASCII); prevlen += len; len = tvb_strsize(tvb, offset+4+prevlen); proto_tree_add_item (tree, hf_fcs_modelname, tvb, offset+4+prevlen, - len, ENC_ASCII|ENC_NA); + len, ENC_ASCII); prevlen += len; len = tvb_strsize(tvb, offset+4+prevlen); proto_tree_add_item (tree, hf_fcs_releasecode, tvb, - offset+4+prevlen, len, ENC_ASCII|ENC_NA); + offset+4+prevlen, len, ENC_ASCII); prevlen += len; offset += (4+prevlen); while (tot_len > prevlen) { @@ -701,11 +703,11 @@ dissect_fcfcs (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) if ((opcode != FCCT_MSG_ACC) && (opcode != FCCT_MSG_RJT)) { conversation = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, - fchdr->rxid, NO_PORT2); + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, + fchdr->rxid, NO_PORT_B); if (!conversation) { conversation = conversation_new (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT2); } @@ -735,8 +737,8 @@ dissect_fcfcs (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) else { /* Opcode is ACC or RJT */ conversation = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, - fchdr->rxid, NO_PORT2); + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, + fchdr->rxid, NO_PORT_B); isreq = 0; if (!conversation) { if (opcode == FCCT_MSG_ACC) { @@ -949,8 +951,8 @@ proto_register_fcfcs (void) {"Platform Node Name", "fcs.platform.nodename", FT_FCWWN, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_platformtype, - {"Platform Type", "fcs.platform.type", FT_UINT8, BASE_HEX, - VALS (fc_fcs_plat_type_val), 0x0, NULL, HFILL}}, + {"Platform Type", "fcs.platform.type", FT_UINT32, BASE_HEX, + VALS(fc_fcs_plat_type_val), 0x0, NULL, HFILL}}, { &hf_fcs_platformaddr, {"Management Address", "fcs.platform.mgmtaddr", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, @@ -1016,15 +1018,13 @@ proto_register_fcfcs (void) expert_register_field_array(expert_fcfcs, ei, array_length(ei)); fcfcs_req_hash = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), fcfcs_hash, fcfcs_equal); + + fcs_handle = register_dissector("fcs", dissect_fcfcs, proto_fcfcs); } void proto_reg_handoff_fcfcs (void) { - dissector_handle_t fcs_handle; - - fcs_handle = create_dissector_handle (dissect_fcfcs, proto_fcfcs); - dissector_add_uint("fcct.server", FCCT_GSRVR_FCS, fcs_handle); } |