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