Some redundant library classes and GUIDs have been removed in inf, .c and .h files. https://bugzilla.tianocore.org/show_bug.cgi?id=1044 https://bugzilla.tianocore.org/show_bug.cgi?id=1045 https://bugzilla.tianocore.org/show_bug.cgi?id=1047 https://bugzilla.tianocore.org/show_bug.cgi?id=1049 https://bugzilla.tianocore.org/show_bug.cgi?id=1051 https://bugzilla.tianocore.org/show_bug.cgi?id=1052 https://bugzilla.tianocore.org/show_bug.cgi?id=1053 https://bugzilla.tianocore.org/show_bug.cgi?id=1054 https://bugzilla.tianocore.org/show_bug.cgi?id=1055 https://bugzilla.tianocore.org/show_bug.cgi?id=1056 https://bugzilla.tianocore.org/show_bug.cgi?id=1017 https://bugzilla.tianocore.org/show_bug.cgi?id=1035 https://bugzilla.tianocore.org/show_bug.cgi?id=1033 https://bugzilla.tianocore.org/show_bug.cgi?id=1012 https://bugzilla.tianocore.org/show_bug.cgi?id=1011 https://bugzilla.tianocore.org/show_bug.cgi?id=1062 v2: 1. Correct copyright year. 2. Fix alignment issue in AcpiPlatformDxe.inf. 3. Add DevicePathLib which is removed before in I2cHostDxe.inf. 4. Update NvmExpressPei.inf, NvmExpressPei.h, IScsiDxe.inf, IScsiDxe.inf, IScsiDxe.h, DxeMain.inf, DxeMain.h, PiSmmCore.inf and PiSmmCore.h for https://bugzilla.tianocore.org/show_bug.cgi?id=1062. v3: 1. Add https://bugzilla.tianocore.org/show_bug.cgi?id=1062 to the link list. 2. Remove DevicePathLib from I2cHostDxe.inf. 3. Update NvmExpressPei.inf, NvmExpressPei.h, UfsPciHcDxe.inf, UfsPciHcDxe.h, I2cHostDxe.inf, AtaBusDxe.inf, IScsiDxe.inf, IScsiDxe.h, DxeMain.inf, DxeMain.h, PiSmmCore.inf and PiSmmCore.h for https://bugzilla.tianocore.org/show_bug.cgi?id=1062. (Forget to add UfsPciHcDxe.inf, UfsPciHcDxe.h, AtaBusDxe.inf, and I2cHostDxe.inf previously.) Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
169 lines
4.5 KiB
C
169 lines
4.5 KiB
C
/** @file
|
|
The header file of IScsiImpl.c.
|
|
|
|
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
|
This program and the accompanying materials
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
**/
|
|
|
|
#ifndef _ISCSI_IMPL_H_
|
|
#define _ISCSI_IMPL_H_
|
|
|
|
#include <Uefi.h>
|
|
|
|
#include <IndustryStandard/Dhcp.h>
|
|
|
|
#include <Library/BaseMemoryLib.h>
|
|
#include <Library/MemoryAllocationLib.h>
|
|
#include <Library/NetLib.h>
|
|
#include <Library/PrintLib.h>
|
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
|
|
|
#include <Guid/EventGroup.h>
|
|
|
|
#include "IScsiCommon.h"
|
|
#include "IScsiDriver.h"
|
|
#include "IScsiInitiatorName.h"
|
|
#include "ComponentName.h"
|
|
#include "IScsiConfigNVDataStruc.h"
|
|
#include "IScsiExtScsiPassThru.h"
|
|
#include "IScsiProto.h"
|
|
#include "IScsiMisc.h"
|
|
#include "IScsiCHAP.h"
|
|
#include "IScsiConfig.h"
|
|
#include "IScsiDhcp.h"
|
|
#include "IScsiTcp4Io.h"
|
|
#include "IScsiIbft.h"
|
|
|
|
|
|
#define ISCSI_SESSION_SIGNATURE SIGNATURE_32 ('I', 'S', 'S', 'N')
|
|
|
|
struct _ISCSI_SESSION {
|
|
UINT32 Signature;
|
|
|
|
ISCSI_SESSION_CONFIG_DATA ConfigData;
|
|
ISCSI_CHAP_AUTH_DATA AuthData;
|
|
|
|
CHAR8 InitiatorName[ISCSI_NAME_MAX_SIZE];
|
|
UINTN InitiatorNameLength;
|
|
UINT8 State;
|
|
|
|
UINT8 Isid[6];
|
|
UINT16 Tsih;
|
|
|
|
UINT32 CmdSN;
|
|
UINT32 ExpCmdSN;
|
|
UINT32 MaxCmdSN;
|
|
|
|
UINT32 InitiatorTaskTag;
|
|
UINT16 NextCid;
|
|
|
|
LIST_ENTRY Conns;
|
|
UINT32 NumConns;
|
|
|
|
LIST_ENTRY TcbList;
|
|
|
|
//
|
|
// session-wide parameters
|
|
//
|
|
UINT16 TargetPortalGroupTag;
|
|
UINT32 MaxConnections;
|
|
BOOLEAN InitialR2T;
|
|
BOOLEAN ImmediateData;
|
|
UINT32 MaxBurstLength;
|
|
UINT32 FirstBurstLength;
|
|
UINT32 DefaultTime2Wait;
|
|
UINT32 DefaultTime2Retain;
|
|
UINT16 MaxOutstandingR2T;
|
|
BOOLEAN DataPDUInOrder;
|
|
BOOLEAN DataSequenceInOrder;
|
|
UINT8 ErrorRecoveryLevel;
|
|
};
|
|
|
|
#define ISCSI_CONNECTION_SIGNATURE SIGNATURE_32 ('I', 'S', 'C', 'N')
|
|
|
|
struct _ISCSI_CONNECTION {
|
|
UINT32 Signature;
|
|
LIST_ENTRY Link;
|
|
|
|
EFI_EVENT TimeoutEvent;
|
|
|
|
ISCSI_SESSION *Session;
|
|
|
|
UINT8 State;
|
|
UINT8 CurrentStage;
|
|
UINT8 NextStage;
|
|
|
|
UINT8 CHAPStep;
|
|
|
|
BOOLEAN PartialReqSent;
|
|
BOOLEAN PartialRspRcvd;
|
|
|
|
BOOLEAN TransitInitiated;
|
|
|
|
UINT16 Cid;
|
|
UINT32 ExpStatSN;
|
|
|
|
//
|
|
// queues...
|
|
//
|
|
NET_BUF_QUEUE RspQue;
|
|
|
|
TCP4_IO Tcp4Io;
|
|
|
|
//
|
|
// connection-only parameters
|
|
//
|
|
UINT32 MaxRecvDataSegmentLength;
|
|
ISCSI_DIGEST_TYPE HeaderDigest;
|
|
ISCSI_DIGEST_TYPE DataDigest;
|
|
};
|
|
|
|
#define ISCSI_DRIVER_DATA_SIGNATURE SIGNATURE_32 ('I', 'S', 'D', 'A')
|
|
|
|
#define ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU(PassThru) \
|
|
CR ( \
|
|
PassThru, \
|
|
ISCSI_DRIVER_DATA, \
|
|
IScsiExtScsiPassThru, \
|
|
ISCSI_DRIVER_DATA_SIGNATURE \
|
|
)
|
|
#define ISCSI_DRIVER_DATA_FROM_IDENTIFIER(Identifier) \
|
|
CR ( \
|
|
Identifier, \
|
|
ISCSI_DRIVER_DATA, \
|
|
IScsiIdentifier, \
|
|
ISCSI_DRIVER_DATA_SIGNATURE \
|
|
)
|
|
#define ISCSI_DRIVER_DATA_FROM_SESSION(s) \
|
|
CR ( \
|
|
s, \
|
|
ISCSI_DRIVER_DATA, \
|
|
Session, \
|
|
ISCSI_DRIVER_DATA_SIGNATURE \
|
|
)
|
|
|
|
struct _ISCSI_DRIVER_DATA {
|
|
UINT32 Signature;
|
|
EFI_HANDLE Image;
|
|
EFI_HANDLE Controller;
|
|
ISCSI_PRIVATE_PROTOCOL IScsiIdentifier;
|
|
EFI_HANDLE ChildHandle;
|
|
EFI_EVENT ExitBootServiceEvent;
|
|
|
|
EFI_EXT_SCSI_PASS_THRU_PROTOCOL IScsiExtScsiPassThru;
|
|
EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
|
|
EFI_HANDLE ExtScsiPassThruHandle;
|
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
|
|
|
ISCSI_SESSION Session;
|
|
};
|
|
|
|
#endif
|