3 Copyright (c) 2004 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 #ifndef _ISCSI_DRIVER_H_
21 #define _ISCSI_DRIVER_H_
24 #include <Protocol/DevicePath.h>
25 #include <Protocol/LoadedImage.h>
26 #include <Library/UefiDriverEntryPoint.h>
27 #include <Library/UefiBootServicesTableLib.h>
28 #include <Library/UefiLib.h>
29 #include <Library/DevicePathLib.h>
30 #include <protocol/DriverBinding.h>
31 #include <protocol/ScsiPassThruExt.h>
32 #include <protocol/IScsiInitiatorName.h>
33 #include <protocol/Ip4Config.h>
34 #include <protocol/ComponentName.h>
35 #include <protocol/ComponentName2.h>
37 #define ISCSI_PRIVATE_GUID \
39 0xfa3cde4c, 0x87c2, 0x427d, 0xae, 0xde, 0x7d, 0xd0, 0x96, 0xc8, 0x8c, 0x58 \
42 #define ISCSI_INITIATOR_NAME_VAR_NAME L"I_NAME"
44 extern EFI_COMPONENT_NAME2_PROTOCOL gIScsiComponentName2
;
45 extern EFI_COMPONENT_NAME_PROTOCOL gIScsiComponentName
;
47 extern EFI_ISCSI_INITIATOR_NAME_PROTOCOL gIScsiInitiatorName
;
49 extern EFI_GUID mIScsiPrivateGuid
;
51 typedef struct _ISCSI_PRIVATE_PROTOCOL
{
53 } ISCSI_PRIVATE_PROTOCOL
;
56 // EFI Driver Binding Protocol for iSCSI driver.
60 IScsiDriverBindingSupported (
61 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
62 IN EFI_HANDLE ControllerHandle
,
63 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
68 IScsiDriverBindingStart (
69 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
70 IN EFI_HANDLE ControllerHandle
,
71 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
76 IScsiDriverBindingStop (
77 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
78 IN EFI_HANDLE ControllerHandle
,
79 IN UINTN NumberOfChildren
,
80 IN EFI_HANDLE
*ChildHandleBuffer
84 // EFI Component Name Protocol for iSCSI driver.
88 IScsiComponentNameGetDriverName (
89 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
91 OUT CHAR16
**DriverName
96 IScsiComponentNameGetControllerName (
97 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
98 IN EFI_HANDLE ControllerHandle
,
99 IN EFI_HANDLE ChildHandle OPTIONAL
,
101 OUT CHAR16
**ControllerName
105 // EFI iSCSI Initiator Name Protocol for iSCSI driver.
109 IScsiGetInitiatorName (
110 IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL
*This
,
111 IN OUT UINTN
*BufferSize
,
117 IScsiSetInitiatorName (
118 IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL
*This
,
119 IN OUT UINTN
*BufferSize
,