]>
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 |
9095d37b | 44 | \r |
d1f95000 | 45 | \r |
46 | /**\r | |
47 | Sets the iSCSI Initiator Name.\r | |
48 | \r | |
49 | @param This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.\r | |
50 | @param BufferSize Size of the buffer in bytes pointed to by Buffer.\r | |
4f077902 SZ |
51 | @param Buffer Pointer to the buffer for data to be written. The data is a null-terminated UTF-8 encoded string.\r |
52 | The maximum length is 223 characters, including the null-terminator.\r | |
d1f95000 | 53 | \r |
54 | @retval EFI_SUCCESS Data was successfully stored by the protocol.\r | |
55 | @retval EFI_UNSUPPORTED Platform policies do not allow for data to be written.\r | |
56 | @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL, or BufferSize exceeds the maximum allowed limit.\r | |
57 | @retval EFI_DEVICE_ERROR The data could not be stored due to a hardware error.\r | |
58 | @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.\r | |
59 | @retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720\r | |
60 | (and other related protocols)\r | |
61 | \r | |
62 | **/\r | |
63 | typedef EFI_STATUS\r | |
8b13229b | 64 | (EFIAPI *EFI_ISCSI_INITIATOR_NAME_SET)(\r |
d1f95000 | 65 | IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,\r |
66 | IN OUT UINTN *BufferSize,\r | |
67 | IN VOID *Buffer\r | |
9095d37b | 68 | );\r |
d1f95000 | 69 | \r |
44717a39 | 70 | ///\r |
9095d37b | 71 | /// iSCSI Initiator Name Protocol for setting and obtaining the iSCSI Initiator Name.\r |
44717a39 | 72 | ///\r |
d1f95000 | 73 | struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL {\r |
74 | EFI_ISCSI_INITIATOR_NAME_GET Get;\r | |
75 | EFI_ISCSI_INITIATOR_NAME_SET Set;\r | |
76 | };\r | |
77 | \r | |
78 | extern EFI_GUID gEfiIScsiInitiatorNameProtocolGuid;\r | |
79 | \r | |
80 | #endif\r | |
81 | \r |