/*
* 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.
*/
#ifndef _FCOE_COMMON_H_
#define _FCOE_COMMON_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
/*
* Interface return value
*/
#define FCOE_SUCCESS 0
/*
* FCOE port speed
*/
/*
* FC Frame header size: 24 bytes
*/
/*
* FLOGI
*/
/*
* 24 byte FC frame header
* For all data structures that have endian problems, we will use only
* one type: uint8_t. We need associate the data structure pointer with
* one buffer directly.
*/
typedef struct fcoe_fc_frame_header {
/*
*/
struct fcoe_port;
typedef struct fcoe_frame {
void *frm_netb;
/*
* frm_hdr will be cleared by fcoe explicitly
*/
/*
* fcoe client need clear FC payload explicitly,
*/
void *frm_fcoe_private;
void *frm_client_private;
} fcoe_frame_t;
/*
* FCOE HBA
*/
typedef struct fcoe_port {
void *eport_fcoe_private;
void *eport_client_private;
} fcoe_port_t;
/*
* FCOE only supports two kinds of topology: direct P2P, fabric P2P.
*/
/*
* FCoE version control
*/
typedef enum fcoe_ver
{
} fcoe_ver_e;
extern const fcoe_ver_e fcoe_ver_now;
typedef struct fcoe_client {
void *ect_client_port_struct;
/*
* Define common-used conversion or calculation macros
*/
{ \
}
{ \
}
{ \
}
{ \
}
{ \
}
/*
* Get FC frame header's element
*/
/*
* Set FC frame header's element
*/
/*
* frame header checking
*/
/*
* should be called through vectors in struct fcoe_port.
* FCOE client call this to register one port to FCOE, FCOE need initialize
* and return the corresponding fcoe_port.
*/
/*
* FC payload size
*/
typedef struct fcoe_fcp_cmnd {
/*
* least 3 bits
*/
/*
* Magnagement flags
*/
/*
*/
typedef struct fcoe_fcp_rsp {
/*
* see SAM-4
*/
/*
* Followed by sense data when available
*/
typedef struct fcoe_fcp_xfer_rdy {
/*
* FCOE project global functions
*/
#if !defined(__FUNCTION__)
#endif
/*
*/
/*
*/
typedef void (*TQ_FUNC_P)(void *);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _FCOE_COMMON_H_ */