4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1995,1997-1998 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _SYS_FC4_LINKAPP_H
28 #define _SYS_FC4_LINKAPP_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
39 * This file contains the definitions for structures and macros
40 * for fiber channel link application payloads and data.
44 * Well Known Fiber Chaneel Addresses to reach the fabric for
48 #define FS_GENERAL_MULTICAST 0xfffff7
49 #define FS_WELL_KNOWN_MULTICAST 0xfffff8
50 #define FS_HUNT_GROUP 0xfffff9
51 #define FS_MANAGEMENT_SERVER 0xfffffa
52 #define FS_TIME_SERVER 0xfffffb
53 #define FS_NAME_SERVER 0xfffffc
54 #define FS_FABRIC_CONTROLLER 0xfffffd
55 #define FS_FABRIC_F_PORT 0xfffffe
56 #define FS_BROADCAST 0xffffff
59 * Link Application Opcodes.
62 #define LA_RJT 0x01000000
63 #define LA_ACC 0x02000000
64 #define LA_LOGI 0x03000000
65 #define LA_LOGO 0x04000000
66 #define LA_RLS 0x0d000000
67 #define LA_IDENT 0x20000000
69 /* Basic Accept Payload. */
70 typedef struct ba_acc
{
78 typedef struct ba_rjt
{
86 * Basic Reject Reason Codes.
88 #define RJT_INVALID_CMD 0x01
89 #define RJT_LOGICAL_ERR 0x03
90 #define RJT_LOGICAL_BUSY 0x05
91 #define RJT_PROTOCOL_ERR 0x07
92 #define RJT_UNABLE 0x09
93 #define RJT_UNSUPPORTED 0x0B
94 #define RJT_VENDOR 0xFF
97 * Basic Reject Explanation Codes
99 #define RJT_NOEXPLANATION 0x00
100 #define RJT_INVALID_OSID 0x01
101 #define RJT_INVALID_OXID_RXID 0x03
102 #define RJT_INVALID_SEQID 0x05
103 #define RJT_ABORT_INACTIVE_SEQ 0x07
104 #define RJT_UNABLE_TO_SUPPLY 0x09
107 * Service parameters.
109 typedef struct common_service
{
116 typedef struct service_param
{
120 /* World Wide Name formats */
121 typedef union la_wwn
{
125 uint_t nport_id
: 12;
134 #define NAA_ID_IEEE 1
135 #define NAA_ID_IEEE_EXTENDED 2
138 typedef struct la_logi
{
140 common_svc_t common_service
;
142 la_wwn_t nport_ww_name
;
143 la_wwn_t node_ww_name
;
150 #define SP_F_PORT_LOGIN 0x10
152 /* Read Link Error Status */
153 typedef struct la_rls
{
159 /* Read Link Error Status Reply */
160 typedef struct la_rls_reply
{
162 unsigned link_failure
;
163 unsigned loss_of_sync
;
164 unsigned loss_of_signal
;
166 unsigned invalid_transmission
;
167 unsigned invalid_crc
;
170 /* Logout payload. */
171 typedef struct la_logo
{
175 /* Logout reply payload. */
176 typedef la_logo_t la_logo_reply_t
;
178 /* Link Application Reject */
179 typedef struct la_rjt
{
188 * LA_RJT Reason Codes.
190 #define LA_RJT_INVALID 0x01
191 #define LA_RJT_LOGICAL_ERR 0x03
192 #define LA_RJT_LOGICAL_BUSY 0x05
193 #define LA_RJT_PROTOCOL_ERR 0x07
194 #define LA_RJT_UNABLE_TO_PERFORM 0x09
195 #define LA_RJT_NOT_SUPPORTED 0x0b
196 #define LA_RJT_VENDOR 0xff
199 * LA_RJT explanations
201 #define LA_RJT_NOEXPLANATION 0x00
202 #define LA_RJT_OPTIONS 0x01
203 #define LA_RJT_INITIATOR 0x03
204 #define LA_RJT_RECIPIENT 0x05
205 #define LA_RJT_DATA_FIELD_SIZE 0x07
206 #define LA_RJT_CONCURRENT 0x09
207 #define LA_RJT_CREDIT 0x0b
209 #define LA_RJT_INVALID_PORT_WWNAME 0x0d
210 #define LA_RJT_INVALID_NODE_WWNAME 0x0e
211 #define LA_RJT_INVALID_COMMON_SVC 0x0f
213 #define LA_RJT_INSUFFICENT 0x29
219 #endif /* !_SYS_FC4_LINKAPP_H */