fc_appif.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _FC_APPIF_H
#define _FC_APPIF_H
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(_BIT_FIELDS_LTOH) && !defined(_BIT_FIELDS_HTOL)
#endif /* _BIT_FIELDS_LTOH */
/*
* Local port topology definitions
*
* but use is not limited to fp_topology. These are also understood by ULPs.
*/
#define FC_TOP_UNKNOWN 0
#define FC_TOP_PRIVATE_LOOP 1
#define FC_TOP_PUBLIC_LOOP 2
#define FC_TOP_FABRIC 3
#define FC_TOP_PT_PT 4
#define FC_TOP_NO_NS 5
/*
* Macros used with the preceeding topology #defines.
* but use is not limited to fp_topology. These are also understood by ULPs.
*/
#define FC_TOP_EXTERNAL(t) FC_IS_TOP_SWITCH(t)
#define FC_IS_TOP_SWITCH(t) (((t) == FC_TOP_FABRIC) ||\
((t) == FC_TOP_PUBLIC_LOOP))
/*
* fc_remote_port state (map_state) definitions.
*
* Used with the pd_state field in the fc_remote_port_t struct.
*/
#define PORT_DEVICE_INVALID 0 /* State when created or login failed */
/*
* Firmware, FCode revision field lengths
*/
#define FC_FCODE_REV_SIZE 25
#define FC_FW_REV_SIZE 25
typedef struct ct_header {
#if defined(_BIT_FIELDS_LTOH)
ct_options : 8,
ct_fcssubtype : 8,
ct_fcstype : 8;
ct_cmdrsp : 16;
ct_expln : 8,
ct_reason : 8,
ct_reserved2 : 8;
#else
#endif /* _BIT_FIELDS_LTOH */
/* World Wide Name format */
typedef union la_wwn {
#if defined(_BIT_FIELDS_LTOH)
struct {
nport_id : 12,
naa_id : 4;
}w;
#else
struct {
nport_id : 12,
wwn_hi : 16;
}w;
#endif /* _BIT_FIELDS_LTOH */
} la_wwn_t;
/*
* Values for naa_id
*/
#define NAA_ID_IEEE 1
#define NAA_ID_IEEE_EXTENDED 2
#ifndef FC_WWN_SIZE
#define FC_WWN_SIZE (sizeof (la_wwn_t))
#endif /* FC_WWN_SIZE */
typedef struct service_param {
} svc_param_t;
typedef struct common_service {
} com_svc_t;
typedef struct ls_code {
#if defined(_BIT_FIELDS_LTOH)
ls_code : 8;
#else
mbz : 24;
#endif /* _BIT_FIELDS_LTOH */
} ls_code_t;
/* Login Payload. */
typedef struct la_els_logi {
typedef struct fc_ns_cmd {
void *ns_fctl_private; /* Transport private */
} fc_ns_cmd_t;
#if defined(_SYSCALL32)
#pragma pack(4)
#endif
typedef struct la_els_logi32 {
typedef struct fc_ns_cmd32 {
void *ns_fctl_private; /* Transport private */
#pragma pack()
#endif
#endif /* _SYSCALL32 */
/* Link Error Parameters in the RLS Accept payload */
typedef struct fc_rls_acc_params {
} fc_rls_acc_t;
/* RLS Payload. */
typedef struct la_els_rls {
} la_els_rls_t;
/* RLS accept payload */
typedef struct la_els_rls_acc {
typedef struct fc_rnid_params {
} fc_rnid_t;
/* RNID get data format flag */
#define FCIO_CFLAGS_RNID_GET_GENERAL_TOPOLOGY 0xDF
#define FCIO_CFLAGS_RNID_GET_VENDOR_SPECIFIC 0xE0
/* RNID maximum data length - common data(16) + specific data(252) */
#define FCIO_RNID_MAX_DATA_LEN 268
/* RNID Payload. */
typedef struct la_els_rnid {
/*
* ELS RNID header
* - cmn_len can be 0 or 16 - if it is 0 then specific data starts at
* offset 8 else specific data starts at offset 24 in the RNID els response
*/
typedef struct fc_rnid_hdr {
typedef struct la_els_rnid_acc {
typedef struct la_npiv_create_entry {
#if !defined(__lint)
#endif /* __lint */
#ifdef __cplusplus
}
#endif
#endif /* _FC_APPIF_H */