1) delete unused parameter from IScsiCHAPOnRspReceived ()

2)Correct one parameter mistake in IScsiFormCallback ()
3)Add OPTIONAL  in IScsiDriverBindingStop ()
4)delete unused parameter from IScsiCheckOpParams ()
5) fix 30+ [in  out]  issues


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7021 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ywu21 2008-12-14 12:25:48 +00:00
parent 999acf5ac9
commit c5de0d5599
15 changed files with 206 additions and 215 deletions

View File

@ -118,7 +118,6 @@ IScsiCHAPAuthTarget (
negotiation stage.
@param[in] Conn The iSCSI connection.
@param[in] Transit The transit flag of the latest iSCSI Login Response.
@retval EFI_SUCCESS The Login Response passed the CHAP validation.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@ -127,8 +126,7 @@ IScsiCHAPAuthTarget (
**/
EFI_STATUS
IScsiCHAPOnRspReceived (
IN ISCSI_CONNECTION *Conn,
IN BOOLEAN Transit
IN ISCSI_CONNECTION *Conn
)
{
EFI_STATUS Status;
@ -307,7 +305,7 @@ ON_EXIT:
during the security negotiation stage in the iSCSI connection login.
@param[in] Conn The iSCSI connection.
@param[in] Pdu The PDU to send out.
@param[in, out] Pdu The PDU to send out.
@retval EFI_SUCCESS All check passed and the phase-related CHAP
authentication info is filled into the iSCSI PDU.
@ -317,7 +315,7 @@ ON_EXIT:
EFI_STATUS
IScsiCHAPToSendReq (
IN ISCSI_CONNECTION *Conn,
IN NET_BUF *Pdu
IN OUT NET_BUF *Pdu
)
{
EFI_STATUS Status;

View File

@ -83,7 +83,6 @@ typedef struct _ISCSI_CHAP_AUTH_DATA {
negotiation stage.
@param[in] Conn The iSCSI connection.
@param[in] Transit The transit flag of the latest iSCSI Login Response.
@retval EFI_SUCCESS The Login Response passed the CHAP validation.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@ -92,16 +91,14 @@ typedef struct _ISCSI_CHAP_AUTH_DATA {
**/
EFI_STATUS
IScsiCHAPOnRspReceived (
IN ISCSI_CONNECTION *Conn,
IN BOOLEAN Transit
IN ISCSI_CONNECTION *Conn
);
/**
This function fills the CHAP authentication information into the login PDU
during the security negotiation stage in the iSCSI connection login.
@param[in] Conn The iSCSI connection.
@param[in] Pdu The PDU to send out.
@param[in, out] Pdu The PDU to send out.
@retval EFI_SUCCESS All check passed and the phase-related CHAP
authentication info is filled into the iSCSI PDU.
@ -111,7 +108,7 @@ IScsiCHAPOnRspReceived (
EFI_STATUS
IScsiCHAPToSendReq (
IN ISCSI_CONNECTION *Conn,
IN NET_BUF *Pdu
IN OUT NET_BUF *Pdu
);
#endif

View File

@ -227,12 +227,12 @@ IScsiGetConfigFormEntryByIndex (
Convert the iSCSI configuration data into the IFR data.
@param[in] ConfigFormEntry The iSCSI configuration form entry.
@param[in] IfrNvData The IFR nv data.
@param[out] IfrNvData The IFR nv data.
**/
VOID
IScsiConvertDeviceConfigDataToIfrNvData (
IN ISCSI_CONFIG_FORM_ENTRY *ConfigFormEntry,
IN ISCSI_CONFIG_IFR_NVDATA *IfrNvData
OUT ISCSI_CONFIG_IFR_NVDATA *IfrNvData
)
{
ISCSI_SESSION_CONFIG_NVDATA *SessionConfigData;
@ -466,7 +466,7 @@ EFI_STATUS
EFIAPI
IScsiFormCallback (
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
IN EFI_BROWSER_ACTION Action,
IN EFI_BROWSER_ACTION *Action,
IN EFI_QUESTION_ID QuestionId,
IN UINT8 Type,
IN EFI_IFR_TYPE_VALUE *Value,

View File

@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param[in] RootPath The RootPath.
@param[in] Length Length of the RootPath option payload.
@param[in] ConfigNvData The iSCSI session configuration data read from nonvolatile device.
@param[in, out] ConfigNvData The iSCSI session configuration data read from nonvolatile device.
@retval EFI_SUCCESS All required information is extracted from the RootPath option.
@retval EFI_NOT_FOUND The RootPath is not an iSCSI RootPath.
@ -30,7 +30,7 @@ EFI_STATUS
IScsiDhcpExtractRootPath (
IN CHAR8 *RootPath,
IN UINT8 Length,
IN ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData
IN OUT ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData
)
{
EFI_STATUS Status;
@ -247,7 +247,7 @@ IScsiDhcpSelectOffer (
Parse the DHCP ACK to get the address configuration and DNS information.
@param[in] Dhcp4 The DHCP4 protocol.
@param[in] ConfigData The session configuration data.
@param[in, out] ConfigData The session configuration data.
@retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
@retval EFI_NO_MAPPING DHCP failed to acquire address and other information.
@ -257,7 +257,7 @@ IScsiDhcpSelectOffer (
EFI_STATUS
IScsiParseDhcpAck (
IN EFI_DHCP4_PROTOCOL *Dhcp4,
IN ISCSI_SESSION_CONFIG_DATA *ConfigData
IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
)
{
EFI_STATUS Status;
@ -339,7 +339,7 @@ IScsiParseDhcpAck (
@param[in] Image The handle of the driver image.
@param[in] Controller The handle of the controller;
@param[in] ConfigData The session configuration data.
@param[in, out] ConfigData The session configuration data.
@retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@ -349,7 +349,7 @@ EFI_STATUS
IScsiDoDhcp (
IN EFI_HANDLE Image,
IN EFI_HANDLE Controller,
IN ISCSI_SESSION_CONFIG_DATA *ConfigData
IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
)
{
EFI_HANDLE Dhcp4Handle;

View File

@ -45,7 +45,7 @@ typedef struct _ISCSI_ROOT_PATH_FIELD {
@param[in] Image The handle of the driver image.
@param[in] Controller The handle of the controller;
@param[in] ConfigData The session configuration data.
@param[in, out] ConfigData The session configuration data.
@retval EFI_SUCCESS The DNS information is got from the DHCP ACK.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@ -55,7 +55,7 @@ EFI_STATUS
IScsiDoDhcp (
IN EFI_HANDLE Image,
IN EFI_HANDLE Controller,
IN ISCSI_SESSION_CONFIG_DATA *ConfigData
IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
);
#endif

View File

@ -249,7 +249,7 @@ IScsiDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
)
{
EFI_HANDLE IScsiController;

View File

@ -149,7 +149,7 @@ IScsiDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
);
//

View File

@ -17,11 +17,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Initialize the header of the iSCSI Boot Firmware Table.
@param[in] Header The header of the iSCSI Boot Firmware Table.
@param[out] Header The header of the iSCSI Boot Firmware Table.
**/
VOID
IScsiInitIbfTableHeader (
IN EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER *Header
OUT EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER *Header
)
{
ZeroMem (Header, sizeof (EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER));

View File

@ -298,7 +298,7 @@ IScsiAsciiStrToIp (
Index = 0;
while (*Str) {
while (*Str != 0) {
if (Index > 3) {
return EFI_INVALID_PARAMETER;

View File

@ -19,13 +19,13 @@ UINT32 mDataSegPad = 0;
/**
Attach the iSCSI connection to the iSCSI session.
@param[in] Session The iSCSI session.
@param[in] Conn The iSCSI connection.
@param[in, out] Session The iSCSI session.
@param[in, out] Conn The iSCSI connection.
**/
VOID
IScsiAttatchConnection (
IN ISCSI_SESSION *Session,
IN ISCSI_CONNECTION *Conn
IN OUT ISCSI_SESSION *Session,
IN OUT ISCSI_CONNECTION *Conn
)
{
InsertTailList (&Session->Conns, &Conn->Link);
@ -36,11 +36,11 @@ IScsiAttatchConnection (
/**
Detach the iSCSI connection from the session it belongs to.
@param[in] Conn The iSCSI connection.
@param[in, out] Conn The iSCSI connection.
**/
VOID
IScsiDetatchConnection (
IN ISCSI_CONNECTION *Conn
IN OUT ISCSI_CONNECTION *Conn
)
{
RemoveEntryList (&Conn->Link);
@ -51,7 +51,7 @@ IScsiDetatchConnection (
/**
Check the sequence number according to RFC3720.
@param[in] ExpSN The currently expected sequence number.
@param[in, out] ExpSN The currently expected sequence number.
@param[in] NewSN The sequence number to check.
@retval EFI_SUCCESS The check passed and the ExpSN is increased.
@ -60,7 +60,7 @@ IScsiDetatchConnection (
**/
EFI_STATUS
IScsiCheckSN (
IN UINT32 *ExpSN,
IN OUT UINT32 *ExpSN,
IN UINT32 NewSN
)
{
@ -85,13 +85,13 @@ IScsiCheckSN (
/**
Update the sequence numbers for the iSCSI command.
@param[in] Session The iSCSI session.
@param[in, out] Session The iSCSI session.
@param[in] MaxCmdSN Maximum CmdSN from the target.
@param[in] ExpCmdSN Next expected CmdSN from the target.
**/
VOID
IScsiUpdateCmdSN (
IN ISCSI_SESSION *Session,
IN OUT ISCSI_SESSION *Session,
IN UINT32 MaxCmdSN,
IN UINT32 ExpCmdSN
)
@ -112,7 +112,7 @@ IScsiUpdateCmdSN (
/**
This function does the iSCSI connection login.
@param[in] Conn The iSCSI connection to login.
@param[in, out] Conn The iSCSI connection to login.
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
@retval EFI_TIMEOUT Timeout happened during the login procedure.
@ -120,7 +120,7 @@ IScsiUpdateCmdSN (
**/
EFI_STATUS
IScsiConnLogin (
IN ISCSI_CONNECTION *Conn
IN OUT ISCSI_CONNECTION *Conn
)
{
EFI_STATUS Status;
@ -164,11 +164,11 @@ IScsiConnLogin (
/**
Reset the iSCSI connection.
@param[in] Conn The iSCSI connection to reset.
@param[in, out] Conn The iSCSI connection to reset.
**/
VOID
IScsiConnReset (
IN ISCSI_CONNECTION *Conn
IN OUT ISCSI_CONNECTION *Conn
)
{
Tcp4IoReset (&Conn->Tcp4Io);
@ -398,7 +398,7 @@ IScsiReceiveLoginRsp (
The DataSegmentLength and the actual size of the net buffer containing this PDU will be
updated.
@param[in] Pdu The iSCSI PDU whose data segment the key-value pair will
@param[in, out] Pdu The iSCSI PDU whose data segment the key-value pair will
be added to.
@param[in] Key The key name string.
@param[in] Value The value string.
@ -410,7 +410,7 @@ IScsiReceiveLoginRsp (
**/
EFI_STATUS
IScsiAddKeyValuePair (
IN NET_BUF *Pdu,
IN OUT NET_BUF *Pdu,
IN CHAR8 *Key,
IN CHAR8 *Value
)
@ -469,14 +469,14 @@ IScsiAddKeyValuePair (
/**
Prepare the iSCSI login request to be sent according to the current login status.
@param[in] Conn The connection in the iSCSI login phase.
@param[in, out] Conn The connection in the iSCSI login phase.
@return The pointer to the net buffer containing the iSCSI login request built.
@retval Others Other errors as indicated.
**/
NET_BUF *
IScsiPrepareLoginReq (
IN ISCSI_CONNECTION *Conn
IN OUT ISCSI_CONNECTION *Conn
)
{
ISCSI_SESSION *Session;
@ -561,8 +561,8 @@ IScsiPrepareLoginReq (
/**
Process the iSCSI Login Response.
@param[in] Conn The connection on which the iSCSI login response is received.
@param[in] Pdu The iSCSI login response PDU.
@param[in, out] Conn The connection on which the iSCSI login response is received.
@param[in, out] Pdu The iSCSI login response PDU.
@retval EFI_SUCCESS The iSCSI login response PDU is processed and all check are passed.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@ -571,8 +571,8 @@ IScsiPrepareLoginReq (
**/
EFI_STATUS
IScsiProcessLoginRsp (
IN ISCSI_CONNECTION *Conn,
IN NET_BUF *Pdu
IN OUT ISCSI_CONNECTION *Conn,
IN OUT NET_BUF *Pdu
)
{
EFI_STATUS Status;
@ -722,14 +722,14 @@ IScsiProcessLoginRsp (
//
// In security negotiation stage, let CHAP module handle it.
//
Status = IScsiCHAPOnRspReceived (Conn, Transit);
Status = IScsiCHAPOnRspReceived (Conn);
break;
case ISCSI_LOGIN_OPERATIONAL_NEGOTIATION:
//
// Response received with negotiation resonse on iSCSI parameters, check them.
//
Status = IScsiCheckOpParams (Conn, Transit);
Status = IScsiCheckOpParams (Conn);
break;
default:
@ -768,7 +768,7 @@ IScsiProcessLoginRsp (
Updated the target information according the data received in the iSCSI
login response with an target redirection status.
@param[in] Session The iSCSI session.
@param[in, out] Session The iSCSI session.
@param[in] Data The data segment which should contain the
TargetAddress key-value list.
@param[in] Len Length of the data.
@ -780,7 +780,7 @@ IScsiProcessLoginRsp (
**/
EFI_STATUS
IScsiUpdateTargetAddress (
IN ISCSI_SESSION *Session,
IN OUT ISCSI_SESSION *Session,
IN CHAR8 *Data,
IN UINT32 Len
)
@ -1091,8 +1091,7 @@ ON_EXIT:
/**
Check and get the result of the prameter negotiation.
@param[in] Conn The connection in iSCSI login.
@param[in] Transit Whether need transit.
@param[in, out] Conn The connection in iSCSI login.
@retval EFI_SUCCESS The parmeter check is passed and negotiation is finished.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@ -1100,8 +1099,7 @@ ON_EXIT:
**/
EFI_STATUS
IScsiCheckOpParams (
IN ISCSI_CONNECTION *Conn,
IN BOOLEAN Transit
IN OUT ISCSI_CONNECTION *Conn
)
{
EFI_STATUS Status;
@ -1347,14 +1345,14 @@ ON_ERROR:
Fill the oprational prameters.
@param[in] Conn The connection in iSCSI login.
@param[in] Pdu The iSCSI login request PDU to fill the parameters.
@param[in, out] Pdu The iSCSI login request PDU to fill the parameters.
@retval EFI_SUCCESS The parmeters are filled into the iSCSI login request PDU.
**/
EFI_STATUS
IScsiFillOpParams (
IN ISCSI_CONNECTION *Conn,
IN NET_BUF *Pdu
IN OUT NET_BUF *Pdu
)
{
ISCSI_SESSION *Session;
@ -1410,7 +1408,7 @@ IScsiFillOpParams (
/**
Pad the iSCSI AHS or data segment to an integer number of 4 byte words.
@param[in] Pdu The iSCSI pdu which contains segments to pad.
@param[in, out] Pdu The iSCSI pdu which contains segments to pad.
@param[in] Len The length of the last semgnet in the PDU.
@retval EFI_SUCCESS The segment is padded or no need to pad it.
@ -1419,7 +1417,7 @@ IScsiFillOpParams (
**/
EFI_STATUS
IScsiPadSegment (
IN NET_BUF *Pdu,
IN OUT NET_BUF *Pdu,
IN UINT32 Len
)
{
@ -1511,14 +1509,14 @@ ON_ERROR:
Get the value string by the key name from the key-value list. If found,
the key-value entry will be removed from the list.
@param[in] KeyValueList The key-value list.
@param[in, out] KeyValueList The key-value list.
@param[in] Key The key name to find.
@return The value string.
**/
CHAR8 *
IScsiGetValueByKeyFromList (
IN LIST_ENTRY *KeyValueList,
IN OUT LIST_ENTRY *KeyValueList,
IN CHAR8 *Key
)
{
@ -1569,7 +1567,7 @@ IScsiFreeKeyValueList (
/**
Normalize the iSCSI name according to RFC.
@param[in] Name The iSCSI name.
@param[in, out] Name The iSCSI name.
@param[in] Len length of the iSCSI name.
@retval EFI_SUCCESS The iSCSI name is valid and normalized.
@ -1577,7 +1575,7 @@ IScsiFreeKeyValueList (
**/
EFI_STATUS
IScsiNormalizeName (
IN CHAR8 *Name,
IN OUT CHAR8 *Name,
IN UINTN Len
)
{
@ -2621,14 +2619,14 @@ ON_EXIT:
/**
Reinstate the session on some error.
@param[in] Private The iSCSI driver data.
@param[in, out] Private The iSCSI driver data.
@retval EFI_SUCCES The session is reinstated from some error.
@retval Other Reinstatement failed.
**/
EFI_STATUS
IScsiSessionReinstatement (
IN ISCSI_DRIVER_DATA *Private
IN OUT ISCSI_DRIVER_DATA *Private
)
{
ISCSI_SESSION *Session;
@ -2706,13 +2704,13 @@ IScsiSessionInit (
Abort the iSCSI session, that is, reset all the connection and free the
resources.
@param[in] Session The iSCSI session.
@param[in, out] Session The iSCSI session.
@retval EFI_SUCCES The session is aborted.
**/
EFI_STATUS
IScsiSessionAbort (
IN ISCSI_SESSION *Session
IN OUT ISCSI_SESSION *Session
)
{
ISCSI_DRIVER_DATA *Private;

View File

@ -631,29 +631,29 @@ typedef struct _ISCSI_KEY_VALUE_PAIR {
/**
Attach the iSCSI connection to the iSCSI session.
@param[in] Session The iSCSI session.
@param[in] Conn The iSCSI connection.
@param[in, out] Session The iSCSI session.
@param[in, out] Conn The iSCSI connection.
**/
VOID
IScsiAttatchConnection (
IN ISCSI_SESSION *Session,
IN ISCSI_CONNECTION *Conn
IN OUT ISCSI_SESSION *Session,
IN OUT ISCSI_CONNECTION *Conn
);
/**
Detach the iSCSI connection from the session it belongs to.
@param[in] Conn The iSCSI connection.
@param[in, out] Conn The iSCSI connection.
**/
VOID
IScsiDetatchConnection (
IN ISCSI_CONNECTION *Conn
IN OUT ISCSI_CONNECTION *Conn
);
/**
This function does the iSCSI connection login.
@param[in] Conn The iSCSI connection to login.
@param[in, out] Conn The iSCSI connection to login.
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
@retval EFI_TIMEOUT Timeout happened during the login procedure.
@ -661,7 +661,7 @@ IScsiDetatchConnection (
**/
EFI_STATUS
IScsiConnLogin (
IN ISCSI_CONNECTION *Conn
IN OUT ISCSI_CONNECTION *Conn
);
/**
@ -736,7 +736,7 @@ IScsiReceiveLoginRsp (
The DataSegmentLength and the actual size of the net buffer containing this PDU will be
updated.
@param[in] Pdu The iSCSI PDU whose data segment the key-value pair will
@param[in, out] Pdu The iSCSI PDU whose data segment the key-value pair will
be added to.
@param[in] Key The key name string.
@param[in] Value The value string.
@ -748,7 +748,7 @@ IScsiReceiveLoginRsp (
**/
EFI_STATUS
IScsiAddKeyValuePair (
IN NET_BUF *Pdu,
IN OUT NET_BUF *Pdu,
IN CHAR8 *Key,
IN CHAR8 *Value
);
@ -756,21 +756,21 @@ IScsiAddKeyValuePair (
/**
Prepare the iSCSI login request to be sent according to the current login status.
@param[in] Conn The connection in the iSCSI login phase.
@param[in, out] Conn The connection in the iSCSI login phase.
@return The pointer to the net buffer containing the iSCSI login request built.
@retval Others Other errors as indicated.
**/
NET_BUF *
IScsiPrepareLoginReq (
IN ISCSI_CONNECTION *Conn
IN OUT ISCSI_CONNECTION *Conn
);
/**
Process the iSCSI Login Response.
@param[in] Conn The connection on which the iSCSI login response is received.
@param[in] Pdu The iSCSI login response PDU.
@param[in, out] Conn The connection on which the iSCSI login response is received.
@param[in, out] Pdu The iSCSI login response PDU.
@retval EFI_SUCCESS The iSCSI login response PDU is processed and all check are passed.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@ -779,15 +779,15 @@ IScsiPrepareLoginReq (
**/
EFI_STATUS
IScsiProcessLoginRsp (
IN ISCSI_CONNECTION *Conn,
IN NET_BUF *Pdu
IN OUT ISCSI_CONNECTION *Conn,
IN OUT NET_BUF *Pdu
);
/**
Updated the target information according the data received in the iSCSI
login response with an target redirection status.
@param[in] Session The iSCSI session.
@param[in, out] Session The iSCSI session.
@param[in] Data The data segment which should contain the
TargetAddress key-value list.
@param[in] Len Length of the data.
@ -799,7 +799,7 @@ IScsiProcessLoginRsp (
**/
EFI_STATUS
IScsiUpdateTargetAddress (
IN ISCSI_SESSION *Session,
IN OUT ISCSI_SESSION *Session,
IN CHAR8 *Data,
IN UINT32 Len
);
@ -846,8 +846,7 @@ IScsiReceivePdu (
/**
Check and get the result of the prameter negotiation.
@param[in] Conn The connection in iSCSI login.
@param[in] Transit Whether need transit.
@param[in, out] Conn The connection in iSCSI login.
@retval EFI_SUCCESS The parmeter check is passed and negotiation is finished.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@ -855,28 +854,27 @@ IScsiReceivePdu (
**/
EFI_STATUS
IScsiCheckOpParams (
IN ISCSI_CONNECTION *Conn,
IN BOOLEAN Transit
IN OUT ISCSI_CONNECTION *Conn
);
/**
Fill the oprational prameters.
@param[in] Conn The connection in iSCSI login.
@param[in] Pdu The iSCSI login request PDU to fill the parameters.
@param[in, out] Pdu The iSCSI login request PDU to fill the parameters.
@retval EFI_SUCCESS The parmeters are filled into the iSCSI login request PDU.
**/
EFI_STATUS
IScsiFillOpParams (
IN ISCSI_CONNECTION *Conn,
IN NET_BUF *Pdu
IN OUT NET_BUF *Pdu
);
/**
Pad the iSCSI AHS or data segment to an integer number of 4 byte words.
@param[in] Pdu The iSCSI pdu which contains segments to pad.
@param[in, out] Pdu The iSCSI pdu which contains segments to pad.
@param[in] Len The length of the last semgnet in the PDU.
@retval EFI_SUCCESS The segment is padded or no need to pad it.
@ -885,7 +883,7 @@ IScsiFillOpParams (
**/
EFI_STATUS
IScsiPadSegment (
IN NET_BUF *Pdu,
IN OUT NET_BUF *Pdu,
IN UINT32 Len
);
@ -908,14 +906,14 @@ IScsiBuildKeyValueList (
Get the value string by the key name from the key-value list. If found,
the key-value entry will be removed from the list.
@param[in] KeyValueList The key-value list.
@param[in, out] KeyValueList The key-value list.
@param[in] Key The key name to find.
@return The value string.
**/
CHAR8 *
IScsiGetValueByKeyFromList (
IN LIST_ENTRY *KeyValueList,
IN OUT LIST_ENTRY *KeyValueList,
IN CHAR8 *Key
);
@ -932,7 +930,7 @@ IScsiFreeKeyValueList (
/**
Normalize the iSCSI name according to RFC.
@param[in] Name The iSCSI name.
@param[in, out] Name The iSCSI name.
@param[in] Len length of the iSCSI name.
@retval EFI_SUCCESS The iSCSI name is valid and normalized.
@ -940,7 +938,7 @@ IScsiFreeKeyValueList (
**/
EFI_STATUS
IScsiNormalizeName (
IN CHAR8 *Name,
IN OUT CHAR8 *Name,
IN UINTN Len
);
@ -955,7 +953,7 @@ IScsiNormalizeName (
@retval EFI_SUCCES The SCSI command is executed and the result is updated to
the Packet.
@retval EFI_DEVICE_ERROR Other errors as indicated.
@retval EFI_DEVICE_ERROR Session state was not as required.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Other errors as indicated.
**/
@ -970,14 +968,14 @@ IScsiExecuteScsiCommand (
/**
Reinstate the session on some error.
@param[in] Private The iSCSI driver data.
@param[in, out] Private The iSCSI driver data.
@retval EFI_SUCCES The session is reinstated from some error.
@retval Other Reinstatement failed.
**/
EFI_STATUS
IScsiSessionReinstatement (
IN ISCSI_DRIVER_DATA *Private
IN OUT ISCSI_DRIVER_DATA *Private
);
/**
@ -996,13 +994,13 @@ IScsiSessionInit (
Abort the iSCSI session, that is, reset all the connection and free the
resources.
@param[in] Session The iSCSI session.
@param[in, out] Session The iSCSI session.
@retval EFI_SUCCES The session is aborted.
**/
EFI_STATUS
IScsiSessionAbort (
IN ISCSI_SESSION *Session
IN OUT ISCSI_SESSION *Session
);
#endif

View File

@ -267,7 +267,7 @@ Tcp4IoDestroySocket (
/**
Connect to the other endpoint of the TCP socket.
@param[in] Tcp4Io The Tcp4Io wrapping the TCP socket.
@param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket.
@param[in] Timeout The time to wait for connection done.
@retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully.
@ -276,7 +276,7 @@ Tcp4IoDestroySocket (
**/
EFI_STATUS
Tcp4IoConnect (
IN TCP4_IO *Tcp4Io,
IN OUT TCP4_IO *Tcp4Io,
IN EFI_EVENT Timeout
)
{
@ -306,11 +306,11 @@ Tcp4IoConnect (
/**
Reset the socket.
@param[in] Tcp4Io The Tcp4Io wrapping the TCP socket.
@param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket.
**/
VOID
Tcp4IoReset (
IN TCP4_IO *Tcp4Io
IN OUT TCP4_IO *Tcp4Io
)
{
EFI_STATUS Status;

View File

@ -77,7 +77,7 @@ Tcp4IoDestroySocket (
/**
Connect to the other endpoint of the TCP socket.
@param[in] Tcp4Io The Tcp4Io wrapping the TCP socket.
@param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket.
@param[in] Timeout The time to wait for connection done.
@retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully.
@ -86,18 +86,18 @@ Tcp4IoDestroySocket (
**/
EFI_STATUS
Tcp4IoConnect (
IN TCP4_IO *Tcp4Io,
IN OUT TCP4_IO *Tcp4Io,
IN EFI_EVENT Timeout
);
/**
Reset the socket.
@param[in] Tcp4Io The Tcp4Io wrapping the TCP socket.
@param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket.
**/
VOID
Tcp4IoReset (
IN TCP4_IO *Tcp4Io
IN OUT TCP4_IO *Tcp4Io
);
/**

View File

@ -89,9 +89,9 @@ CONST UINT8 Md5HashPadding[] =
**/
UINT32
Tf1 (
UINT32 A,
UINT32 B,
UINT32 C
IN UINT32 A,
IN UINT32 B,
IN UINT32 C
)
{
return (A & B) | (~A & C);
@ -109,9 +109,9 @@ Tf1 (
**/
UINT32
Tf2 (
UINT32 A,
UINT32 B,
UINT32 C
IN UINT32 A,
IN UINT32 B,
IN UINT32 C
)
{
return (A & C) | (B & ~C);
@ -129,9 +129,9 @@ Tf2 (
**/
UINT32
Tf3 (
UINT32 A,
UINT32 B,
UINT32 C
IN UINT32 A,
IN UINT32 B,
IN UINT32 C
)
{
return A ^ B ^ C;
@ -149,9 +149,9 @@ Tf3 (
**/
UINT32
Tf4 (
UINT32 A,
UINT32 B,
UINT32 C
IN UINT32 A,
IN UINT32 B,
IN UINT32 C
)
{
return B ^ (A | ~C);
@ -175,11 +175,11 @@ CONST MD5_TRANSFORM_FUNC Md5_F[] = {
/**
Perform the MD5 transform on 64 bytes data segment.
@param[in] Md5Ctx It includes the data segment for Md5 transform.
@param[in, out] Md5Ctx It includes the data segment for Md5 transform.
**/
VOID
MD5Transform (
IN MD5_CTX *Md5Ctx
IN OUT MD5_CTX *Md5Ctx
)
{
UINT32 Index1;
@ -224,14 +224,14 @@ MD5Transform (
All of Md5 code generated for the sequential 64-bytes data segaments are be
accumulated in MD5Final() function.
@param[in] Md5Ctx The data structure of storing the original data
@param[in, out] Md5Ctx The data structure of storing the original data
segment and the final result.
@param[in] Data The data wanted to be transformed.
@param[in] DataLen The length of data.
**/
VOID
MD5UpdateBlock (
IN MD5_CTX *Md5Ctx,
IN OUT MD5_CTX *Md5Ctx,
IN CONST UINT8 *Data,
IN UINTN DataLen
)
@ -254,13 +254,13 @@ MD5UpdateBlock (
/**
Initialize four 32-bits chaining variables and use them to do the Md5 transform.
@param[in] Md5Ctx The data structure of Md5.
@param[out] Md5Ctx The data structure of Md5.
@retval EFI_SUCCESS Initialization is ok.
**/
EFI_STATUS
MD5Init (
IN MD5_CTX *Md5Ctx
OUT MD5_CTX *Md5Ctx
)
{
ZeroMem (Md5Ctx, sizeof (*Md5Ctx));
@ -279,7 +279,7 @@ MD5Init (
/**
the external interface of Md5 algorithm
@param[in] Md5Ctx The data structure of storing the original data
@param[in, out] Md5Ctx The data structure of storing the original data
segment and the final result.
@param[in] Data The data wanted to be transformed.
@param[in] DataLen The length of data.
@ -289,7 +289,7 @@ MD5Init (
**/
EFI_STATUS
MD5Update (
IN MD5_CTX *Md5Ctx,
IN OUT MD5_CTX *Md5Ctx,
IN VOID *Data,
IN UINTN DataLen
)
@ -307,7 +307,7 @@ MD5Update (
Accumulate the MD5 value of every data segment and generate the finial
result according to MD5 algorithm.
@param[in] Md5Ctx The data structure of storing the original data
@param[in, out] Md5Ctx The data structure of storing the original data
segment and the final result.
@param[out] HashVal The final 128-bits output.
@ -316,7 +316,7 @@ MD5Update (
**/
EFI_STATUS
MD5Final (
IN MD5_CTX *Md5Ctx,
IN OUT MD5_CTX *Md5Ctx,
OUT UINT8 *HashVal
)
{

View File

@ -32,19 +32,19 @@ typedef struct _MD5_CTX {
/**
Initialize four 32-bits chaining variables and use them to do the Md5 transform.
@param[in] Md5Ctx The data structure of Md5.
@param[out] Md5Ctx The data structure of Md5.
@retval EFI_SUCCESS Initialization is ok.
**/
EFI_STATUS
MD5Init (
IN MD5_CTX *Md5Ctx
OUT MD5_CTX *Md5Ctx
);
/**
the external interface of Md5 algorithm
@param[in] Md5Ctx The data structure of storing the original data
@param[in, out] Md5Ctx The data structure of storing the original data
segment and the final result.
@param[in] Data The data wanted to be transformed.
@param[in] DataLen The length of data.
@ -54,7 +54,7 @@ MD5Init (
**/
EFI_STATUS
MD5Update (
IN MD5_CTX *Md5Ctx,
IN OUT MD5_CTX *Md5Ctx,
IN VOID *Data,
IN UINTN DataLen
);
@ -63,7 +63,7 @@ MD5Update (
Accumulate the MD5 value of every data segment and generate the finial
result according to MD5 algorithm.
@param[in] Md5Ctx The data structure of storing the original data
@param[in, out] Md5Ctx The data structure of storing the original data
segment and the final result.
@param[out] HashVal The final 128-bits output.
@ -72,7 +72,7 @@ MD5Update (
**/
EFI_STATUS
MD5Final (
IN MD5_CTX *Md5Ctx,
IN OUT MD5_CTX *Md5Ctx,
OUT UINT8 *HashVal
);