/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* FC port information.
*/
typedef struct fc_port_info {
/*
* FC transfer info (somewhat analogous to iscsiinfo_t)
* Represents data transfer details.
*/
typedef struct fc_xferinfo {
/*
* conninfo translators
*/
/*
* Translator for conninfo, translating from the local port.
*/
ci_local = P->port_pwwn_str[0] ?
P->port_pwwn_str : "<unknown>";
ci_remote = "<unknown>";
ci_protocol = "fc";
};
/*
* Translator for conninfo, translating from the local port implementation.
*/
ci_remote = "<unknown>";
ci_protocol = "fc";
};
/*
* Translator for conninfo, translating from fct cmd struct.
*/
(C->cmd_port->port_pwwn_str[0] ?
"<unknown>");
(C->cmd_rp->rp_pwwn_str[0] ?
"<unknown>");
ci_protocol = "fc";
};
/*
* fc_port_info_t translators.
*/
/*
* Translator for fc_port_info_t, translating from the local port.
*/
/* node WWN */
fcp_node_wwn = P->port_nwwn_str[0] ?
P->port_nwwn_str : "<unknown>";
/* node symbolic name */
/* port symbolic name */
P->port_sym_port_name : "<unknown>";
/* port hard address */
};
/*
* Translator for fc_port_info_t, translating from the local port impl.
*/
/* node WWN */
fcp_node_wwn = (P->iport_port ?
(P->iport_port->port_nwwn_str[0] ?
P->iport_port->port_nwwn_str :
"<unknown>") :
"<bad iport_port ptr>");
(P->iport_port ?
(P->iport_port->port_sym_node_name ?
"<bad iport_port ptr>");
(P->iport_port ?
(P->iport_port->port_sym_port_name ?
"<bad iport_port ptr>");
(P->iport_port ?
P->iport_port->port_hard_address : 0);
};
/*
* Translator for fc_port_info, translating from the remote port impl
*/
/* node WWN */
fcp_node_wwn = P->irp_rp ?
(P->irp_rp->rp_nwwn_str[0] ?
"<unknown>";
/* node symbolic name */
/* port symbolic name */
/* port hard address */
};
/*
* Translator for fc_xferinfo, translating from stmf_data_buf_t.
*/
fcx_len = B->db_data_size;
fcx_offset = B->db_relative_offset;
};