]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | EFI_ISCSI_INITIATOR_NAME_PROTOCOL as defined in UEFI 2.0.\r | |
3 | It provides the ability to get and set the iSCSI Initiator Name.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
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 | |
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 | |
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 | |
36 | typedef\r | |
37 | EFI_STATUS\r | |
38 | (EFIAPI *EFI_ISCSI_INITIATOR_NAME_GET)(\r | |
39 | IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,\r | |
40 | IN OUT UINTN *BufferSize,\r | |
41 | OUT VOID *Buffer\r | |
42 | );\r | |
43 | \r | |
44 | \r | |
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 | |
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 | |
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 | |
64 | (EFIAPI *EFI_ISCSI_INITIATOR_NAME_SET)(\r | |
65 | IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,\r | |
66 | IN OUT UINTN *BufferSize,\r | |
67 | IN VOID *Buffer\r | |
68 | );\r | |
69 | \r | |
70 | ///\r | |
71 | /// iSCSI Initiator Name Protocol for setting and obtaining the iSCSI Initiator Name.\r | |
72 | ///\r | |
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 |