]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | EFI_ISCSI_INITIATOR_NAME_PROTOCOL as defined in UEFI 2.0.\r | |
630b4187 | 3 | It provides the ability to get and set the iSCSI Initiator Name. \r |
d1f95000 | 4 | \r |
4f077902 | 5 | Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r |
9df063a0 | 6 | This program and the accompanying materials \r |
d1f95000 | 7 | are licensed and made available under the terms and conditions of the BSD License \r |
8 | which accompanies this distribution. The full text of the license may be found at \r | |
9 | http://opensource.org/licenses/bsd-license.php \r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
13 | \r | |
d1f95000 | 14 | **/\r |
15 | \r | |
16 | #ifndef __ISCSI_INITIATOR_NAME_H__\r | |
17 | #define __ISCSI_INITIATOR_NAME_H__\r | |
18 | \r | |
19 | #define EFI_ISCSI_INITIATOR_NAME_PROTOCOL_GUID \\r | |
20 | { \\r | |
21 | 0x59324945, 0xec44, 0x4c0d, {0xb1, 0xcd, 0x9d, 0xb1, 0x39, 0xdf, 0x7, 0xc } \\r | |
22 | }\r | |
23 | \r | |
24 | typedef struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL EFI_ISCSI_INITIATOR_NAME_PROTOCOL;\r | |
25 | \r | |
26 | /**\r | |
27 | Retrieves the current set value of iSCSI Initiator Name.\r | |
28 | \r | |
29 | @param This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.\r | |
30 | @param BufferSize Size of the buffer in bytes pointed to by Buffer / Actual size of the\r | |
31 | variable data buffer.\r | |
4f077902 SZ |
32 | @param Buffer Pointer to the buffer for data to be read. The data is a null-terminated UTF-8 encoded string.\r |
33 | The maximum length is 223 characters, including the null-terminator.\r | |
d1f95000 | 34 | \r |
35 | @retval EFI_SUCCESS Data was successfully retrieved into the provided buffer and the\r | |
36 | BufferSize was sufficient to handle the iSCSI initiator name\r | |
37 | @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result.\r | |
38 | @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.\r | |
39 | @retval EFI_DEVICE_ERROR The iSCSI initiator name could not be retrieved due to a hardware error.\r | |
40 | \r | |
41 | **/\r | |
42 | typedef \r | |
43 | EFI_STATUS\r | |
8b13229b | 44 | (EFIAPI *EFI_ISCSI_INITIATOR_NAME_GET)(\r |
d1f95000 | 45 | IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,\r |
46 | IN OUT UINTN *BufferSize,\r | |
47 | OUT VOID *Buffer\r | |
ed66e1bc | 48 | );\r |
d1f95000 | 49 | \r |
50 | \r | |
51 | \r | |
52 | /**\r | |
53 | Sets the iSCSI Initiator Name.\r | |
54 | \r | |
55 | @param This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.\r | |
56 | @param BufferSize Size of the buffer in bytes pointed to by Buffer.\r | |
4f077902 SZ |
57 | @param Buffer Pointer to the buffer for data to be written. The data is a null-terminated UTF-8 encoded string.\r |
58 | The maximum length is 223 characters, including the null-terminator.\r | |
d1f95000 | 59 | \r |
60 | @retval EFI_SUCCESS Data was successfully stored by the protocol.\r | |
61 | @retval EFI_UNSUPPORTED Platform policies do not allow for data to be written.\r | |
62 | @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL, or BufferSize exceeds the maximum allowed limit.\r | |
63 | @retval EFI_DEVICE_ERROR The data could not be stored due to a hardware error.\r | |
64 | @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.\r | |
65 | @retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720\r | |
66 | (and other related protocols)\r | |
67 | \r | |
68 | **/\r | |
69 | typedef EFI_STATUS\r | |
8b13229b | 70 | (EFIAPI *EFI_ISCSI_INITIATOR_NAME_SET)(\r |
d1f95000 | 71 | IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,\r |
72 | IN OUT UINTN *BufferSize,\r | |
73 | IN VOID *Buffer\r | |
ed66e1bc | 74 | ); \r |
d1f95000 | 75 | \r |
44717a39 | 76 | ///\r |
77 | /// iSCSI Initiator Name Protocol for setting and obtaining the iSCSI Initiator Name. \r | |
78 | ///\r | |
d1f95000 | 79 | struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL {\r |
80 | EFI_ISCSI_INITIATOR_NAME_GET Get;\r | |
81 | EFI_ISCSI_INITIATOR_NAME_SET Set;\r | |
82 | };\r | |
83 | \r | |
84 | extern EFI_GUID gEfiIScsiInitiatorNameProtocolGuid;\r | |
85 | \r | |
86 | #endif\r | |
87 | \r |