xref: /illumos-gate/usr/src/uts/common/io/bnxe/577xx/include/iscsi_info.h (revision d14abf155341d55053c76eeec58b787a456b753b)
1 /*******************************************************************************
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  *
21  * Copyright 2014 QLogic Corporation
22  * The contents of this file are subject to the terms of the
23  * QLogic End User License (the "License").
24  * You may not use this file except in compliance with the License.
25  *
26  * You can obtain a copy of the License at
27  * http://www.qlogic.com/Resources/Documents/DriverDownloadHelp/
28  * QLogic_End_User_Software_License.txt
29  * See the License for the specific language governing permissions
30  * and limitations under the License.
31  *
32  *
33  *  FILE        :  I S C S I _ I N F O . H
34  *  AUTHOR      :  Kevin Tran
35  *
36  *  DESCRIPTION :  This file contains macro definitions for ISCSI shared
37  *                 information.
38  *
39  *  Revision History:
40  *    Kevin Tran         07/23/2004       Created
41  *
42  ******************************************************************************/
43 
44 #ifndef __ISCSI_INFO_H__
45 #define __ISCSI_INFO_H__
46 
47 typedef struct _iscsi_info_block_hdr_t
48 {
49 #define ISCSI_INFO_BLOCK_SIGNATURE 0x6b627369
50   u32_t signature;
51   u16_t length;
52   u8_t  checksum;
53   u8_t  boot_flags;
54     #define ISCSI_INFO_FLAGS_WINDOWS_HBA_BOOT  (1 << 0)
55     #define BOOT_INFO_FLAGS_UEFI_BOOT          (1 << 1)
56 } iscsi_info_block_hdr_t;
57 
58 #define UEFI_BOOT_SIGNATURE 0x0EF10EF1
59 
60 #define ISCSI_INFO_DATA_SIZE  1016
61 
62 typedef struct _iscsi_info_block_t
63 {
64   iscsi_info_block_hdr_t hdr ;
65   u8_t                   data[ISCSI_INFO_DATA_SIZE];
66 } iscsi_info_block_t;
67 
68 #define ISCSI_INFO_ID_TARGET_NAME     0x0
69 #define ISCSI_INFO_ID_TARGET_IP_ADDR  0x1
70 #define ISCSI_INFO_ID_TARGET_TCP_PORT 0x2
71 #define ISCSI_INFO_ID_INITIATOR_NAME  0x3
72 #define ISCSI_INFO_ID_IP_ADDRESS      0x4
73 #define ISCSI_INFO_ID_SUBNET_MASK     0x5
74 #define ISCSI_INFO_ID_DEFAULT_GATEWAY 0x6
75 #define ISCSI_INFO_ID_AUTHEN_MODE     0x7
76 #define ISCSI_INFO_ID_INIT_CHAP_ID    0x8
77 #define ISCSI_INFO_ID_INIT_CHAP_PW    0x9
78 #define ISCSI_INFO_ID_TARGET_CHAP_ID  0xa
79 #define ISCSI_INFO_ID_TARGET_CHAP_PW  0xb
80 #define ISCSI_INFO_ID_VLAN_ID         0xc
81 #define ISCSI_INFO_ID_PRIMARY_DNS     0xd
82 #define ISCSI_INFO_ID_SECONDARY_DNS   0xe
83 #define ISCSI_INFO_ID_INTF_MAC_ADDR   0xf
84 
85 #define ISCSI_INFO_ID_IP_ADDRESS2      0x10
86 #define ISCSI_INFO_ID_SUBNET_MASK2     0x11
87 #define ISCSI_INFO_ID_DEFAULT_GATEWAY2 0x12
88 #define ISCSI_INFO_ID_VLAN_ID2         0x13
89 #define ISCSI_INFO_ID_INTF_MAC_ADDR2   0x14
90 #define ISCSI_INFO_ID_PRIMARY_DNS2     0x15
91 #define ISCSI_INFO_ID_SECONDARY_DNS2   0x16
92 #define ISCSI_INFO_ID_DHCP_SERVER_IP_ADDR 0x17
93 #define ISCSI_INFO_ID_BOOT_INTF        0x18
94 #define ISCSI_INFO_ID_TARGET_LUN_NUM   0x19
95 #define ISCSI_INFO_ID_PRIMARY_INTF     0x1a
96 #define ISCSI_INFO_ID_PCI_FUNCTION_NUM 0x1b
97 #define ISCSI_INFO_ID_DHCP_SERVER_IP_ADDR2 0x1c
98 #define ISCSI_INFO_ID_TARGET_IP_ADDR2  0x1d
99 #define ISCSI_INFO_ID_TARGET_TCP_PORT2 0x1e
100 #define ISCSI_INFO_ID_BOOT_PARAMETERS  0x1f
101 #define ISCSI_INFO_ID_BOOT_PARAMETERS2 0x20
102 
103 #define ISCSI_INFO_ID_END             0xff
104 
105 #define ISCSI_INFO_BOOT_PARAMS_IPv6_RA   (1 << 0)
106 
107 typedef struct iscsi_info_hdr
108 {
109   u16_t id;
110   u16_t length;
111 }iscsi_info_hdr;
112 
113 typedef struct iscsi_info_entry
114 {
115   iscsi_info_hdr hdr;
116   u8_t data[1];
117 }iscsi_info_entry;
118 
119 #endif /* __ISCSI_INFO_H__ */
120