• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   The header file for EFI iSCSI Initiator Name Protocol.
3 
4 Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
5 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_INITIATOR_NAME_H_
16 #define _ISCSI_INITIATOR_NAME_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 /**
27   Retrieves the current set value of iSCSI Initiator Name.
28 
29   @param[in]       This       Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
30   @param[in, out]  BufferSize Size of the buffer in bytes pointed to by Buffer / Actual size of the
31                               variable data buffer.
32   @param[out]      Buffer     Pointer to the buffer for data to be read.
33 
34   @retval EFI_SUCCESS           Data was successfully retrieved into the provided buffer and the
35                                 BufferSize was sufficient to handle the iSCSI initiator name.
36   @retval EFI_BUFFER_TOO_SMALL  BufferSize is too small for the result.
37   @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.
38   @retval EFI_DEVICE_ERROR      The iSCSI initiator name could not be retrieved due to a hardware error.
39   @retval Others                Other errors as indicated.
40 **/
41 EFI_STATUS
42 EFIAPI
43 IScsiGetInitiatorName (
44   IN     EFI_ISCSI_INITIATOR_NAME_PROTOCOL  *This,
45   IN OUT UINTN                              *BufferSize,
46   OUT    VOID                               *Buffer
47   );
48 
49 /**
50   Sets the iSCSI Initiator Name.
51 
52   @param[in]       This       Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
53   @param[in, out]  BufferSize Size of the buffer in bytes pointed to by Buffer.
54   @param[in]       Buffer     Pointer to the buffer for data to be written.
55 
56   @retval EFI_SUCCESS           Data was successfully stored by the protocol.
57   @retval EFI_UNSUPPORTED       Platform policies do not allow for data to be written.
58                                 Currently not implemented.
59   @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL, or BufferSize exceeds the maximum allowed limit.
60   @retval EFI_DEVICE_ERROR      The data could not be stored due to a hardware error.
61   @retval EFI_OUT_OF_RESOURCES  Not enough storage is available to hold the data.
62   @retval EFI_PROTOCOL_ERROR    Input iSCSI initiator name does not adhere to RFC 3720
63                                 (and other related protocols).
64   @retval Others                Other errors as indicated.
65 **/
66 EFI_STATUS
67 EFIAPI
68 IScsiSetInitiatorName (
69   IN     EFI_ISCSI_INITIATOR_NAME_PROTOCOL  *This,
70   IN OUT UINTN                              *BufferSize,
71   IN     VOID                               *Buffer
72   );
73 
74 #endif
75