]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | EFI_ISCSI_INITIATOR_NAME_PROTOCOL as defined in UEFI 2.0.\r | |
9095d37b | 3 | It provides the ability to get and set the iSCSI Initiator Name.\r |
d1f95000 | 4 | \r |
9095d37b | 5 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
d1f95000 | 7 | \r |
d1f95000 | 8 | **/\r |
9 | \r | |
10 | #ifndef __ISCSI_INITIATOR_NAME_H__\r | |
11 | #define __ISCSI_INITIATOR_NAME_H__\r | |
12 | \r | |
13 | #define EFI_ISCSI_INITIATOR_NAME_PROTOCOL_GUID \\r | |
14 | { \\r | |
15 | 0x59324945, 0xec44, 0x4c0d, {0xb1, 0xcd, 0x9d, 0xb1, 0x39, 0xdf, 0x7, 0xc } \\r | |
16 | }\r | |
17 | \r | |
18 | typedef struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL EFI_ISCSI_INITIATOR_NAME_PROTOCOL;\r | |
19 | \r | |
20 | /**\r | |
21 | Retrieves the current set value of iSCSI Initiator Name.\r | |
22 | \r | |
23 | @param This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.\r | |
24 | @param BufferSize Size of the buffer in bytes pointed to by Buffer / Actual size of the\r | |
25 | variable data buffer.\r | |
4f077902 SZ |
26 | @param Buffer Pointer to the buffer for data to be read. The data is a null-terminated UTF-8 encoded string.\r |
27 | The maximum length is 223 characters, including the null-terminator.\r | |
d1f95000 | 28 | \r |
29 | @retval EFI_SUCCESS Data was successfully retrieved into the provided buffer and the\r | |
30 | BufferSize was sufficient to handle the iSCSI initiator name\r | |
31 | @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result.\r | |
32 | @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.\r | |
33 | @retval EFI_DEVICE_ERROR The iSCSI initiator name could not be retrieved due to a hardware error.\r | |
34 | \r | |
35 | **/\r | |
9095d37b | 36 | typedef\r |
d1f95000 | 37 | EFI_STATUS\r |
8b13229b | 38 | (EFIAPI *EFI_ISCSI_INITIATOR_NAME_GET)(\r |
d1f95000 | 39 | IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,\r |
40 | IN OUT UINTN *BufferSize,\r | |
41 | OUT VOID *Buffer\r | |
ed66e1bc | 42 | );\r |
d1f95000 | 43 | \r |
d1f95000 | 44 | /**\r |
45 | Sets the iSCSI Initiator Name.\r | |
46 | \r | |
47 | @param This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.\r | |
48 | @param BufferSize Size of the buffer in bytes pointed to by Buffer.\r | |
4f077902 SZ |
49 | @param Buffer Pointer to the buffer for data to be written. The data is a null-terminated UTF-8 encoded string.\r |
50 | The maximum length is 223 characters, including the null-terminator.\r | |
d1f95000 | 51 | \r |
52 | @retval EFI_SUCCESS Data was successfully stored by the protocol.\r | |
53 | @retval EFI_UNSUPPORTED Platform policies do not allow for data to be written.\r | |
54 | @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL, or BufferSize exceeds the maximum allowed limit.\r | |
55 | @retval EFI_DEVICE_ERROR The data could not be stored due to a hardware error.\r | |
56 | @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.\r | |
57 | @retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720\r | |
58 | (and other related protocols)\r | |
59 | \r | |
60 | **/\r | |
61 | typedef EFI_STATUS\r | |
8b13229b | 62 | (EFIAPI *EFI_ISCSI_INITIATOR_NAME_SET)(\r |
d1f95000 | 63 | IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,\r |
64 | IN OUT UINTN *BufferSize,\r | |
65 | IN VOID *Buffer\r | |
9095d37b | 66 | );\r |
d1f95000 | 67 | \r |
44717a39 | 68 | ///\r |
9095d37b | 69 | /// iSCSI Initiator Name Protocol for setting and obtaining the iSCSI Initiator Name.\r |
44717a39 | 70 | ///\r |
d1f95000 | 71 | struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL {\r |
2f88bd3a MK |
72 | EFI_ISCSI_INITIATOR_NAME_GET Get;\r |
73 | EFI_ISCSI_INITIATOR_NAME_SET Set;\r | |
d1f95000 | 74 | };\r |
75 | \r | |
2f88bd3a | 76 | extern EFI_GUID gEfiIScsiInitiatorNameProtocolGuid;\r |
d1f95000 | 77 | \r |
78 | #endif\r |