]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/IScsiDxe/IScsiInitiatorName.h
for 202033
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiInitiatorName.h
1 /** @file
2 The header file of IScsi initiator name protocol.
3
4 Copyright (c) 2004 - 2008, Intel Corporation.<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _ISCSI_INITIATORNAME_H_
16 #define _ISCSI_INITIATORNAME_H_
17
18 #include <Protocol/IScsiInitiatorName.h>
19
20 extern EFI_ISCSI_INITIATOR_NAME_PROTOCOL gIScsiInitiatorName;
21
22 //
23 // EFI IScsi Initiator Name Protocol for IScsi driver.
24 //
25 /**
26 Retrieves the current set value of iSCSI Initiator Name.
27
28 @param This[in] Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
29
30 @param BufferSize[in][out] Size of the buffer in bytes pointed to by Buffer / Actual
31 size of the variable data buffer.
32
33 @param Buffer[out] Pointer to the buffer for data to be read.
34
35 @retval EFI_SUCCESS Data was successfully retrieved into the provided
36 buffer and the BufferSize was sufficient to handle the
37 iSCSI initiator name.
38 @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result. BufferSize will
39 be updated with the size required to complete the request.
40 Buffer will not be affected.
41
42 @retval EFI_INVALID_PARAMETER BufferSize is NULL. BufferSize and Buffer will not be
43 affected.
44
45 @retval EFI_INVALID_PARAMETER Buffer is NULL. BufferSize and Buffer will not be
46 affected.
47
48 @retval EFI_DEVICE_ERROR The iSCSI initiator name could not be retrieved due to
49 a hardware error.
50
51 **/
52 EFI_STATUS
53 EFIAPI
54 IScsiGetInitiatorName (
55 IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
56 IN OUT UINTN *BufferSize,
57 OUT VOID *Buffer
58 );
59
60 /**
61 Sets the iSCSI Initiator Name.
62
63 @param This[in] Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
64
65 @param BufferSize[in][out] Size of the buffer in bytes pointed to by Buffer.
66
67 @param Buffer[out] Pointer to the buffer for data to be written.
68
69 @retval EFI_SUCCESS Data was successfully stored by the protocol.
70
71 @retval EFI_UNSUPPORTED Platform policies do not allow for data to be written.
72
73 @retval EFI_INVALID_PARAMETER BufferSize exceeds the maximum allowed limit.
74 BufferSize will be updated with the maximum size
75 required to complete the request.
76
77 @retval EFI_INVALID_PARAMETER Buffersize is NULL. BufferSize and Buffer will not be
78 affected.
79
80 @retval EFI_INVALID_PARAMETER Buffer is NULL. BufferSize and Buffer will not be affected.
81
82 @retval EFI_DEVICE_ERROR The data could not be stored due to a hardware error.
83
84 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
85
86 @retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720.
87
88 **/
89 EFI_STATUS
90 EFIAPI
91 IScsiSetInitiatorName (
92 IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
93 IN OUT UINTN *BufferSize,
94 OUT VOID *Buffer
95 );
96
97 #endif