]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/IScsiInitiatorName.h
ed6b5e09aaf7a8dc1e57f6891f018a6dda14e06b
[mirror_edk2.git] / MdePkg / Include / Protocol / IScsiInitiatorName.h
1 /** @file
2 EFI_ISCSI_INITIATOR_NAME_PROTOCOL as defined in UEFI 2.0.
3 It rovides the ability to get and set the iSCSI Initiator Name.
4
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __ISCSI_INITIATOR_NAME_H__
17 #define __ISCSI_INITIATOR_NAME_H__
18
19 #define EFI_ISCSI_INITIATOR_NAME_PROTOCOL_GUID \
20 { \
21 0x59324945, 0xec44, 0x4c0d, {0xb1, 0xcd, 0x9d, 0xb1, 0x39, 0xdf, 0x7, 0xc } \
22 }
23
24 typedef struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL EFI_ISCSI_INITIATOR_NAME_PROTOCOL;
25
26 /**
27 Retrieves the current set value of iSCSI Initiator Name.
28
29 @param This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
30 @param BufferSize Size of the buffer in bytes pointed to by Buffer / Actual size of the
31 variable data buffer.
32 @param 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
40 **/
41 typedef
42 EFI_STATUS
43 (EFIAPI *EFI_ISCSI_INITIATOR_NAME_GET) (
44 IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
45 IN OUT UINTN *BufferSize,
46 OUT VOID *Buffer
47 )
48 ;
49
50
51
52 /**
53 Sets the iSCSI Initiator Name.
54
55 @param This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
56 @param BufferSize Size of the buffer in bytes pointed to by Buffer.
57 @param Buffer Pointer to the buffer for data to be written.
58
59 @retval EFI_SUCCESS Data was successfully stored by the protocol.
60 @retval EFI_UNSUPPORTED Platform policies do not allow for data to be written.
61 @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL, or BufferSize exceeds the maximum allowed limit.
62 @retval EFI_DEVICE_ERROR The data could not be stored due to a hardware error.
63 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
64 @retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720
65 (and other related protocols)
66
67 **/
68 typedef EFI_STATUS
69 (EFIAPI *EFI_ISCSI_INITIATOR_NAME_SET) (
70 IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
71 IN OUT UINTN *BufferSize,
72 IN VOID *Buffer
73 )
74 ;
75
76 struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL {
77 EFI_ISCSI_INITIATOR_NAME_GET Get;
78 EFI_ISCSI_INITIATOR_NAME_SET Set;
79 };
80
81 extern EFI_GUID gEfiIScsiInitiatorNameProtocolGuid;
82
83 #endif
84
85
86
87
88
89
90