[isns] re-indent the AddAttribute() function

hopefully, this will make my further patches easier to review

Change-Id: If9fe4aa03c08dd38eccae3d4a0accdcbb5d62111
Reviewed-on: https://code.wireshark.org/review/10681
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
This commit is contained in:
Martin Kaiser 2015-09-28 22:44:42 +02:00
parent 5a39cf8ec9
commit 3e481a002a
1 changed files with 314 additions and 314 deletions

View File

@ -1017,322 +1017,322 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
switch( tag )
{
case ISNS_ATTR_TAG_DELIMITER:
dissect_isns_attr_none(tvb, offset, tree, hf_isns_delimiter, tag, len);
break;
case ISNS_ATTR_TAG_ENTITY_IDENTIFIER:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_entity_identifier, tag, len);
break;
case ISNS_ATTR_TAG_ENTITY_PROTOCOL:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_protocol, tag, len, function_id);
break;
case ISNS_ATTR_TAG_MGMT_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_mgmt_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_TIMESTAMP:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_timestamp, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PROTOCOL_VERSION_RANGE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_REGISTRATION_PERIOD:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_registration_period, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ENTITY_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ENTITY_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ENTITY_ISAKMP_PHASE_1:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_ENTITY_CERTIFICATE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_PORTAL_IP_ADDRESS:
switch(len){
case 64:
proto_tree_add_expert(tree, pinfo, &ei_isns_portal_ip_addr, tvb, offset, -1);
case 16:
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_portal_ip_addr, tag, 16);
case ISNS_ATTR_TAG_DELIMITER:
dissect_isns_attr_none(tvb, offset, tree, hf_isns_delimiter, tag, len);
break;
default:
THROW(ReportedBoundsError);
}
break;
case ISNS_ATTR_TAG_PORTAL_PORT:
dissect_isns_attr_port(tvb, offset, tree, hf_isns_portal_port, tag, len, ISNS_OTHER_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_SYMBOLIC_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_portal_symbolic_name, tag, len);
break;
case ISNS_ATTR_TAG_ESI_INTERVAL:
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_esi_interval, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ESI_PORT:
dissect_isns_attr_port(tvb, offset, tree, hf_isns_esi_port, tag, len, ISNS_ESI_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_INDEX:
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_SCN_PORT:
dissect_isns_attr_port(tvb, offset, tree, hf_isns_scn_port, tag, len, ISNS_SCN_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_NEXT_INDEX:
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORTAL_SECURITY_BITMAP:
dissect_isns_attr_portal_security_bitmap(tvb, offset, tree, hf_isns_psb, tag, len);
break;
case ISNS_ATTR_TAG_PORTAL_ISAKMP_PHASE_1:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_PORTAL_ISAKMP_PHASE_2:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_PORTAL_CERTIFICATE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_NODE_TYPE:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_iscsi_node_type(tvb, offset, tree, hf_isns_iscsi_node_type, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_ALIAS:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_alias, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_SCN_BITMAP:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_scn_bitmap(tvb, offset, tree, hf_isns_scn_bitmap, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_NODE_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_WWNN_TOKEN:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_wwnn_token, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ISCSI_NODE_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ISCSI_AUTH_METHOD:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_auth_method, tag, len);
break;
case ISNS_ATTR_TAG_PG_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_pg_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_PG_PORTAL_IP_ADDR:
switch(len){
case 64:
proto_tree_add_expert_format(tree, pinfo, &ei_isns_portal_ip_addr, tvb, offset, -1,
"Broken iSNS implementation. The PG_PORTAL_IP_ADDRESS tag should be 16 bytes in length");
/* Fall Through */
case 16:
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_pg_portal_ip_addr, tag, 16);
case ISNS_ATTR_TAG_ENTITY_IDENTIFIER:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_entity_identifier, tag, len);
break;
default:
THROW(ReportedBoundsError);
}
break;
case ISNS_ATTR_TAG_PG_PORTAL_PORT:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_port(tvb, offset, tree, hf_isns_pg_portal_port, tag, len, ISNS_OTHER_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_GROUP_TAG:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_group_tag, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORTAL_GROUP_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORTAL_GROUP_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_FC_PORT_NAME_WWPN:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_port_name_wwpn, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORT_ID:
if(len != 3) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_port_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_FC_PORT_TYPE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
0x0000 Unidentified/Null Entry
0x0001 Fibre Channel N_Port
0x0002 Fibre Channel NL_Port
0x0003 Fibre Channel F/NL_Port
0x0081 Fibre Channel F_Port
0x0082 Fibre Channel FL_Port
0x0084 Fibre Channel E_Port
0xFF12 iFCP Port
*/
case ISNS_ATTR_TAG_SYMBOLIC_PORT_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_port_name, tag, len);
break;
case ISNS_ATTR_TAG_FABRIC_PORT_NAME:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fabric_port_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_HARD_ADDRESS:
if(len != 3) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_hard_address, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORT_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_port_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_CLASS_OF_SERVICE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
bit 29 Fibre Channel Class 2 Supported
bit 28 Fibre Channel Class 3 Supported
*/
case ISNS_ATTR_TAG_FC4_TYPES:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_FC4_DESCRIPTOR:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_fc4_descriptor, tag, len);
break;
case ISNS_ATTR_TAG_FC4_FEATURES:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_IFCP_SCN_BITMAP:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
bit 24 INITIATOR AND SELF INFORMATION ONLY
bit 25 TARGET AND SELF INFORMATION ONLY
bit 26 MANAGEMENT REGISTRATION/SCN
bit 27 OBJECT REMOVED
bit 28 OBJECT ADDED
bit 29 OBJECT UPDATED
bit 30 DD/DDS MEMBER REMOVED (Mgmt Reg/SCN only)
bit 31 (Lsb) DD/DDS MEMBER ADDED (Mgmt Reg/SCN only)
*/
case ISNS_ATTR_TAG_PORT_ROLE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
bit 29 Control
bit 30 FCP Initiator
bit 31 (Lsb) FCP Target
*/
case ISNS_ATTR_TAG_PERMANENT_PORT_NAME:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_permanent_port_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_FC4_TYPE_CODE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/* 8bit type code in byte0 */
case ISNS_ATTR_TAG_FC_NODE_NAME_WWNN:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_node_name_wwnn, tag, len, function_id);
break;
case ISNS_ATTR_TAG_SYMBOLIC_NODE_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_node_name, tag, len);
break;
case ISNS_ATTR_TAG_NODE_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_node_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_NODE_IPA:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_ipa, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PROXY_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_proxy_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_SWITCH_NAME:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_switch_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PREFERRED_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_preferred_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ASSIGNED_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_assigned_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_VIRTUAL_FABRIC_ID:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_virtual_fabric_id, tag, len);
break;
case ISNS_ATTR_TAG_VENDOR_OUI:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_vendor_oui, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_SET_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_SET_SYMBOLIC_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_set_symbolic_name, tag, len);
break;
case ISNS_ATTR_TAG_DD_SET_STATUS:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_DD_SET_NEXT_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_next_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_SYMBOLIC_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_symbolic_name, tag, len);
break;
case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_iscsi_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_member_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_DD_MEMBER_FC_PORT_NAME:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_fc_port_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_portal_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_dd_member_portal_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_PORT:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_port(tvb, offset, tree, hf_isns_dd_member_portal_port,
tag, len, ISNS_OTHER_PORT, pinfo);
break;
case ISNS_ATTR_TAG_DD_FEATURES:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_DD_ID_NEXT_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id_next_id, tag, len, function_id);
break;
default:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
case ISNS_ATTR_TAG_ENTITY_PROTOCOL:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_protocol, tag, len, function_id);
break;
case ISNS_ATTR_TAG_MGMT_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_mgmt_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_TIMESTAMP:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_timestamp, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PROTOCOL_VERSION_RANGE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_REGISTRATION_PERIOD:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_registration_period, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ENTITY_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ENTITY_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ENTITY_ISAKMP_PHASE_1:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_ENTITY_CERTIFICATE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_PORTAL_IP_ADDRESS:
switch(len){
case 64:
proto_tree_add_expert(tree, pinfo, &ei_isns_portal_ip_addr, tvb, offset, -1);
case 16:
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_portal_ip_addr, tag, 16);
break;
default:
THROW(ReportedBoundsError);
}
break;
case ISNS_ATTR_TAG_PORTAL_PORT:
dissect_isns_attr_port(tvb, offset, tree, hf_isns_portal_port, tag, len, ISNS_OTHER_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_SYMBOLIC_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_portal_symbolic_name, tag, len);
break;
case ISNS_ATTR_TAG_ESI_INTERVAL:
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_esi_interval, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ESI_PORT:
dissect_isns_attr_port(tvb, offset, tree, hf_isns_esi_port, tag, len, ISNS_ESI_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_INDEX:
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_SCN_PORT:
dissect_isns_attr_port(tvb, offset, tree, hf_isns_scn_port, tag, len, ISNS_SCN_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_NEXT_INDEX:
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORTAL_SECURITY_BITMAP:
dissect_isns_attr_portal_security_bitmap(tvb, offset, tree, hf_isns_psb, tag, len);
break;
case ISNS_ATTR_TAG_PORTAL_ISAKMP_PHASE_1:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_PORTAL_ISAKMP_PHASE_2:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_PORTAL_CERTIFICATE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_NODE_TYPE:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_iscsi_node_type(tvb, offset, tree, hf_isns_iscsi_node_type, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_ALIAS:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_alias, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_SCN_BITMAP:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_scn_bitmap(tvb, offset, tree, hf_isns_scn_bitmap, tag, len);
break;
case ISNS_ATTR_TAG_ISCSI_NODE_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_WWNN_TOKEN:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_wwnn_token, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ISCSI_NODE_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ISCSI_AUTH_METHOD:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_auth_method, tag, len);
break;
case ISNS_ATTR_TAG_PG_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_pg_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_PG_PORTAL_IP_ADDR:
switch(len){
case 64:
proto_tree_add_expert_format(tree, pinfo, &ei_isns_portal_ip_addr, tvb, offset, -1,
"Broken iSNS implementation. The PG_PORTAL_IP_ADDRESS tag should be 16 bytes in length");
/* Fall Through */
case 16:
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_pg_portal_ip_addr, tag, 16);
break;
default:
THROW(ReportedBoundsError);
}
break;
case ISNS_ATTR_TAG_PG_PORTAL_PORT:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_port(tvb, offset, tree, hf_isns_pg_portal_port, tag, len, ISNS_OTHER_PORT, pinfo);
break;
case ISNS_ATTR_TAG_PORTAL_GROUP_TAG:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_group_tag, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORTAL_GROUP_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORTAL_GROUP_NEXT_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_next_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_FC_PORT_NAME_WWPN:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_port_name_wwpn, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORT_ID:
if(len != 3) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_port_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_FC_PORT_TYPE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
0x0000 Unidentified/Null Entry
0x0001 Fibre Channel N_Port
0x0002 Fibre Channel NL_Port
0x0003 Fibre Channel F/NL_Port
0x0081 Fibre Channel F_Port
0x0082 Fibre Channel FL_Port
0x0084 Fibre Channel E_Port
0xFF12 iFCP Port
*/
case ISNS_ATTR_TAG_SYMBOLIC_PORT_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_port_name, tag, len);
break;
case ISNS_ATTR_TAG_FABRIC_PORT_NAME:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fabric_port_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_HARD_ADDRESS:
if(len != 3) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_hard_address, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PORT_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_port_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_CLASS_OF_SERVICE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
bit 29 Fibre Channel Class 2 Supported
bit 28 Fibre Channel Class 3 Supported
*/
case ISNS_ATTR_TAG_FC4_TYPES:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_FC4_DESCRIPTOR:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_fc4_descriptor, tag, len);
break;
case ISNS_ATTR_TAG_FC4_FEATURES:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_IFCP_SCN_BITMAP:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
bit 24 INITIATOR AND SELF INFORMATION ONLY
bit 25 TARGET AND SELF INFORMATION ONLY
bit 26 MANAGEMENT REGISTRATION/SCN
bit 27 OBJECT REMOVED
bit 28 OBJECT ADDED
bit 29 OBJECT UPDATED
bit 30 DD/DDS MEMBER REMOVED (Mgmt Reg/SCN only)
bit 31 (Lsb) DD/DDS MEMBER ADDED (Mgmt Reg/SCN only)
*/
case ISNS_ATTR_TAG_PORT_ROLE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/*
bit 29 Control
bit 30 FCP Initiator
bit 31 (Lsb) FCP Target
*/
case ISNS_ATTR_TAG_PERMANENT_PORT_NAME:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_permanent_port_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_FC4_TYPE_CODE:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
/* 8bit type code in byte0 */
case ISNS_ATTR_TAG_FC_NODE_NAME_WWNN:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_node_name_wwnn, tag, len, function_id);
break;
case ISNS_ATTR_TAG_SYMBOLIC_NODE_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_node_name, tag, len);
break;
case ISNS_ATTR_TAG_NODE_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_node_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_NODE_IPA:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_ipa, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PROXY_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_proxy_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_SWITCH_NAME:
if(len != 8) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_switch_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_PREFERRED_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_preferred_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_ASSIGNED_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_assigned_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_VIRTUAL_FABRIC_ID:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_virtual_fabric_id, tag, len);
break;
case ISNS_ATTR_TAG_VENDOR_OUI:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_vendor_oui, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_SET_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_SET_SYMBOLIC_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_set_symbolic_name, tag, len);
break;
case ISNS_ATTR_TAG_DD_SET_STATUS:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_DD_SET_NEXT_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_next_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_SYMBOLIC_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_symbolic_name, tag, len);
break;
case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_iscsi_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_NAME:
dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_member_iscsi_name, tag, len);
break;
case ISNS_ATTR_TAG_DD_MEMBER_FC_PORT_NAME:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_fc_port_name, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_INDEX:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_portal_index, tag, len, function_id);
break;
case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_IP_ADDRESS:
if(len != 16) THROW(ReportedBoundsError);
dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_dd_member_portal_ip_addr, tag, len);
break;
case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_PORT:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_port(tvb, offset, tree, hf_isns_dd_member_portal_port,
tag, len, ISNS_OTHER_PORT, pinfo);
break;
case ISNS_ATTR_TAG_DD_FEATURES:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
break;
case ISNS_ATTR_TAG_DD_ID_NEXT_ID:
if(len != 4) THROW(ReportedBoundsError);
dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id_next_id, tag, len, function_id);
break;
default:
dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
}