fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * A device handle describes the characterics of a device
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Node. Each device handle also contains information
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * on the serveral different ports it is discovered on.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Classification of Name Server Objects
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * +-----------------------------------+---------------------------+
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | Device (node) Specific | Port Specific |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * +-----------------------------------+---------------------------+
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | Node Name (NN) | Port type (PT) |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | Symbolic Node Name Length | Port Id (ID) |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | Symbloic Node Name(SNN) | Symbolic Port Name length |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | Initial Process associator(IPA) | Symbolic Port Name (SPN) |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | | Class of Service (CS) |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | | fc4 types (FT) |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | | IP Address (IP) |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * +-----------------------------------+---------------------------+
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The above classification causes some inconvenience in not having
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the ability to directly copy all the nameserver objects into a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * contiguous piece of memory. But we'll live with it.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CT_REV 0x01 /* Common Transport revision */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* FCS types */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FCS subtypes for Directory Service
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCSSUB_DS_NAME_SERVER 0x02 /* Zoned Name Server */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCSSUB_DS_IPADDR_SERVER 0x03 /* IP Address Server */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FCS subtypes for Management Service
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCSSUB_MS_CONFIG_SERVER 0x01 /* Fabric Config Server */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCSSUB_MS_UNZONED_NAME_SERVER 0x02 /* Unzoned Name Server */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCSSUB_MS_ZONE_SERVER 0x03 /* Fabric Zone Server */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FCS subtypes for Time Service
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCSSUB_TS_TIME_SERVER 0x01 /* Time Server */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FCS subtypes for Alias Service
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCSSUB_AS_ALIAS_SERVER 0x01 /* Alias Server */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FCS subtypes for Key Service
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCSSUB_KS_KEY_SERVER 0x00 /* Key Distribution Server */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* FC-CT response codes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* FS_RJT Reason Codes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FSRJT_BADCMD 0x01 /* Invalid command code */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FSRJT_BADVER 0x02 /* Invalid version level */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FSRJT_PROTOCOLERR 0x07 /* Protocol error */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FSRJT_CMDFAILED 0x08 /* Unable to perform command */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FSRJT_UNSUPP 0x0b /* Command not supported */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FSRJT_VENDOR 0xff /* vendor unique error */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Name Service Command Codes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GCS_ID 0x0114 /* Get Class Of service */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GNN_IP 0x0153 /* Get Node name for IP */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GID_FT 0x0171 /* Get port Id for FC-4 type */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GID_PT 0x01A1 /* Get port Id for type */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Name service reject explanation codes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_NONE 0x00 /* No additional explanation */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_PORTNOTREG 0x01 /* Port ID not registered */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_PWWNNOTREG 0x02 /* Port Name not registered */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_NWWNNOTREG 0x03 /* Node Name not registered */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_CoSNOTREG 0x04 /* Class of Service no registered */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_IPNOTREG 0x05 /* IP Address not registered */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_IPANOTREG 0x06 /* Initial Proc. Assoc not reg. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_FC4NOTREG 0x07 /* FC$ types not registered */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_SPNNOTREG 0x08 /* Symbolic port name not registered */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_SNNNOTREG 0x09 /* Symbolic node name not registered */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_TYPENOTREG 0x0a /* Port type not registered */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NSRJTX_BADPORTID 0x11 /* Unacceptable port ID */
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang/* Management Service Command Codes */
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#define MS_GIEL 0x0101 /* Get Interconnect Element List */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_IS_CMD_A_QUERY(cmd) ((cmd) >= NS_GA_NXT && (cmd) <= NS_GID_PT)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_IS_CMD_A_REG(cmd) ((cmd) >= NS_RPN_ID && (cmd) <= NS_DA_ID)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * SCR registration function codes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Register port/node name request payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 'x' means either P (port) or N (node)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Register Class of service request payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Register FC-4 TYPEs request payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t rfc_types[32]; /* bit map of ULP types */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Register symbolic port name request payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * What follows here is the actual name
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * which is allocated on the fly during
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * packet allocation.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Register port type request payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Register IP address request payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Register Initial Process Associator request payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Register Symbolic Node Name request payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * What follows here is the actual name
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * which is allocated on the fly during
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * packet allocation.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Remove all request payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_porttype_t gan_type_id; /* type and id next */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if !defined(__lint)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ns_resp_gpn_id))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", rxn_id))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ns_req_gpn_id))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ns_resp_gid_pn))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ns_req_gid_pn))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ns_resp_gan))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ns_req_gan))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ns_req_gid_pt))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ns_req_gpt_id))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ns_resp_gpt_id))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", remall))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", snn))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ipa))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", rip))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", rpt))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", spn))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", rfc_type))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", rcos))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* __lint */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SYS_FIBRE_CHANNEL_IMPL_FCGS2_H */