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. negotiation stage.
@param[in] Conn The iSCSI connection. @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_SUCCESS The Login Response passed the CHAP validation.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@ -127,8 +126,7 @@ IScsiCHAPAuthTarget (
**/ **/
EFI_STATUS EFI_STATUS
IScsiCHAPOnRspReceived ( IScsiCHAPOnRspReceived (
IN ISCSI_CONNECTION *Conn, IN ISCSI_CONNECTION *Conn
IN BOOLEAN Transit
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
@ -306,8 +304,8 @@ ON_EXIT:
This function fills the CHAP authentication information into the login PDU This function fills the CHAP authentication information into the login PDU
during the security negotiation stage in the iSCSI connection login. during the security negotiation stage in the iSCSI connection login.
@param[in] Conn The iSCSI connection. @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 @retval EFI_SUCCESS All check passed and the phase-related CHAP
authentication info is filled into the iSCSI PDU. authentication info is filled into the iSCSI PDU.
@ -316,8 +314,8 @@ ON_EXIT:
**/ **/
EFI_STATUS EFI_STATUS
IScsiCHAPToSendReq ( IScsiCHAPToSendReq (
IN ISCSI_CONNECTION *Conn, IN ISCSI_CONNECTION *Conn,
IN NET_BUF *Pdu IN OUT NET_BUF *Pdu
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;

View File

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

View File

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

View File

@ -17,9 +17,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/** /**
Extract the Root Path option and get the required target information. Extract the Root Path option and get the required target information.
@param[in] RootPath The RootPath. @param[in] RootPath The RootPath.
@param[in] Length Length of the RootPath option payload. @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_SUCCESS All required information is extracted from the RootPath option.
@retval EFI_NOT_FOUND The RootPath is not an iSCSI RootPath. @retval EFI_NOT_FOUND The RootPath is not an iSCSI RootPath.
@ -28,9 +28,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
EFI_STATUS EFI_STATUS
IScsiDhcpExtractRootPath ( IScsiDhcpExtractRootPath (
IN CHAR8 *RootPath, IN CHAR8 *RootPath,
IN UINT8 Length, IN UINT8 Length,
IN ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData IN OUT ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
@ -246,8 +246,8 @@ IScsiDhcpSelectOffer (
/** /**
Parse the DHCP ACK to get the address configuration and DNS information. Parse the DHCP ACK to get the address configuration and DNS information.
@param[in] Dhcp4 The DHCP4 protocol. @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_SUCCESS The DNS information is got from the DHCP ACK.
@retval EFI_NO_MAPPING DHCP failed to acquire address and other information. @retval EFI_NO_MAPPING DHCP failed to acquire address and other information.
@ -256,8 +256,8 @@ IScsiDhcpSelectOffer (
**/ **/
EFI_STATUS EFI_STATUS
IScsiParseDhcpAck ( IScsiParseDhcpAck (
IN EFI_DHCP4_PROTOCOL *Dhcp4, IN EFI_DHCP4_PROTOCOL *Dhcp4,
IN ISCSI_SESSION_CONFIG_DATA *ConfigData IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
@ -337,9 +337,9 @@ IScsiParseDhcpAck (
/** /**
Parse the DHCP ACK to get the address configuration and DNS information. Parse the DHCP ACK to get the address configuration and DNS information.
@param[in] Image The handle of the driver image. @param[in] Image The handle of the driver image.
@param[in] Controller The handle of the controller; @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_SUCCESS The DNS information is got from the DHCP ACK.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@ -347,9 +347,9 @@ IScsiParseDhcpAck (
**/ **/
EFI_STATUS EFI_STATUS
IScsiDoDhcp ( IScsiDoDhcp (
IN EFI_HANDLE Image, IN EFI_HANDLE Image,
IN EFI_HANDLE Controller, IN EFI_HANDLE Controller,
IN ISCSI_SESSION_CONFIG_DATA *ConfigData IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
) )
{ {
EFI_HANDLE Dhcp4Handle; EFI_HANDLE Dhcp4Handle;

View File

@ -43,9 +43,9 @@ typedef struct _ISCSI_ROOT_PATH_FIELD {
/** /**
Parse the DHCP ACK to get the address configuration and DNS information. Parse the DHCP ACK to get the address configuration and DNS information.
@param[in] Image The handle of the driver image. @param[in] Image The handle of the driver image.
@param[in] Controller The handle of the controller; @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_SUCCESS The DNS information is got from the DHCP ACK.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@ -53,9 +53,9 @@ typedef struct _ISCSI_ROOT_PATH_FIELD {
**/ **/
EFI_STATUS EFI_STATUS
IScsiDoDhcp ( IScsiDoDhcp (
IN EFI_HANDLE Image, IN EFI_HANDLE Image,
IN EFI_HANDLE Controller, IN EFI_HANDLE Controller,
IN ISCSI_SESSION_CONFIG_DATA *ConfigData IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
); );
#endif #endif

View File

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

View File

@ -149,7 +149,7 @@ IScsiDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ControllerHandle,
IN UINTN NumberOfChildren, 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. 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 VOID
IScsiInitIbfTableHeader ( 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)); ZeroMem (Header, sizeof (EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER));

View File

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

View File

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

View File

@ -631,29 +631,29 @@ typedef struct _ISCSI_KEY_VALUE_PAIR {
/** /**
Attach the iSCSI connection to the iSCSI session. Attach the iSCSI connection to the iSCSI session.
@param[in] Session The iSCSI session. @param[in, out] Session The iSCSI session.
@param[in] Conn The iSCSI connection. @param[in, out] Conn The iSCSI connection.
**/ **/
VOID VOID
IScsiAttatchConnection ( IScsiAttatchConnection (
IN ISCSI_SESSION *Session, IN OUT ISCSI_SESSION *Session,
IN ISCSI_CONNECTION *Conn IN OUT ISCSI_CONNECTION *Conn
); );
/** /**
Detach the iSCSI connection from the session it belongs to. Detach the iSCSI connection from the session it belongs to.
@param[in] Conn The iSCSI connection. @param[in, out] Conn The iSCSI connection.
**/ **/
VOID VOID
IScsiDetatchConnection ( IScsiDetatchConnection (
IN ISCSI_CONNECTION *Conn IN OUT ISCSI_CONNECTION *Conn
); );
/** /**
This function does the iSCSI connection login. 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_SUCCESS The iSCSI connection is logged into the iSCSI target.
@retval EFI_TIMEOUT Timeout happened during the login procedure. @retval EFI_TIMEOUT Timeout happened during the login procedure.
@ -661,7 +661,7 @@ IScsiDetatchConnection (
**/ **/
EFI_STATUS EFI_STATUS
IScsiConnLogin ( IScsiConnLogin (
IN ISCSI_CONNECTION *Conn IN OUT ISCSI_CONNECTION *Conn
); );
/** /**
@ -736,10 +736,10 @@ IScsiReceiveLoginRsp (
The DataSegmentLength and the actual size of the net buffer containing this PDU will be The DataSegmentLength and the actual size of the net buffer containing this PDU will be
updated. 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. be added to.
@param[in] Key The key name string. @param[in] Key The key name string.
@param[in] Value The value string. @param[in] Value The value string.
@retval EFI_SUCCESS The key-valu pair is added to the PDU's datasegment and @retval EFI_SUCCESS The key-valu pair is added to the PDU's datasegment and
the correspondence length fields are updated. the correspondence length fields are updated.
@ -748,7 +748,7 @@ IScsiReceiveLoginRsp (
**/ **/
EFI_STATUS EFI_STATUS
IScsiAddKeyValuePair ( IScsiAddKeyValuePair (
IN NET_BUF *Pdu, IN OUT NET_BUF *Pdu,
IN CHAR8 *Key, IN CHAR8 *Key,
IN CHAR8 *Value IN CHAR8 *Value
); );
@ -756,21 +756,21 @@ IScsiAddKeyValuePair (
/** /**
Prepare the iSCSI login request to be sent according to the current login status. 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. @return The pointer to the net buffer containing the iSCSI login request built.
@retval Others Other errors as indicated. @retval Others Other errors as indicated.
**/ **/
NET_BUF * NET_BUF *
IScsiPrepareLoginReq ( IScsiPrepareLoginReq (
IN ISCSI_CONNECTION *Conn IN OUT ISCSI_CONNECTION *Conn
); );
/** /**
Process the iSCSI Login Response. Process the iSCSI Login Response.
@param[in] Conn The connection on which the iSCSI login response is received. @param[in, out] Conn The connection on which the iSCSI login response is received.
@param[in] Pdu The iSCSI login response PDU. @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_SUCCESS The iSCSI login response PDU is processed and all check are passed.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened. @retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@ -779,18 +779,18 @@ IScsiPrepareLoginReq (
**/ **/
EFI_STATUS EFI_STATUS
IScsiProcessLoginRsp ( IScsiProcessLoginRsp (
IN ISCSI_CONNECTION *Conn, IN OUT ISCSI_CONNECTION *Conn,
IN NET_BUF *Pdu IN OUT NET_BUF *Pdu
); );
/** /**
Updated the target information according the data received in the iSCSI Updated the target information according the data received in the iSCSI
login response with an target redirection status. 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 @param[in] Data The data segment which should contain the
TargetAddress key-value list. TargetAddress key-value list.
@param[in] Len Length of the data. @param[in] Len Length of the data.
@retval EFI_SUCCESS The target address is updated. @retval EFI_SUCCESS The target address is updated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@ -799,9 +799,9 @@ IScsiProcessLoginRsp (
**/ **/
EFI_STATUS EFI_STATUS
IScsiUpdateTargetAddress ( IScsiUpdateTargetAddress (
IN ISCSI_SESSION *Session, IN OUT ISCSI_SESSION *Session,
IN CHAR8 *Data, IN CHAR8 *Data,
IN UINT32 Len IN UINT32 Len
); );
/** /**
@ -846,8 +846,7 @@ IScsiReceivePdu (
/** /**
Check and get the result of the prameter negotiation. Check and get the result of the prameter negotiation.
@param[in] Conn The connection in iSCSI login. @param[in, out] Conn The connection in iSCSI login.
@param[in] Transit Whether need transit.
@retval EFI_SUCCESS The parmeter check is passed and negotiation is finished. @retval EFI_SUCCESS The parmeter check is passed and negotiation is finished.
@retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened. @retval EFI_PROTOCOL_ERROR Some kind of iSCSI protocol error happened.
@ -855,29 +854,28 @@ IScsiReceivePdu (
**/ **/
EFI_STATUS EFI_STATUS
IScsiCheckOpParams ( IScsiCheckOpParams (
IN ISCSI_CONNECTION *Conn, IN OUT ISCSI_CONNECTION *Conn
IN BOOLEAN Transit
); );
/** /**
Fill the oprational prameters. Fill the oprational prameters.
@param[in] Conn The connection in iSCSI login. @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. @retval EFI_SUCCESS The parmeters are filled into the iSCSI login request PDU.
**/ **/
EFI_STATUS EFI_STATUS
IScsiFillOpParams ( IScsiFillOpParams (
IN ISCSI_CONNECTION *Conn, 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. 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. @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. @retval EFI_SUCCESS The segment is padded or no need to pad it.
@retval EFI_OUT_OF_RESOURCES There is not enough remaining free space to add the @retval EFI_OUT_OF_RESOURCES There is not enough remaining free space to add the
@ -885,8 +883,8 @@ IScsiFillOpParams (
**/ **/
EFI_STATUS EFI_STATUS
IScsiPadSegment ( IScsiPadSegment (
IN NET_BUF *Pdu, IN OUT NET_BUF *Pdu,
IN UINT32 Len IN UINT32 Len
); );
/** /**
@ -908,14 +906,14 @@ IScsiBuildKeyValueList (
Get the value string by the key name from the key-value list. If found, 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. 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. @param[in] Key The key name to find.
@return The value string. @return The value string.
**/ **/
CHAR8 * CHAR8 *
IScsiGetValueByKeyFromList ( IScsiGetValueByKeyFromList (
IN LIST_ENTRY *KeyValueList, IN OUT LIST_ENTRY *KeyValueList,
IN CHAR8 *Key IN CHAR8 *Key
); );
@ -932,16 +930,16 @@ IScsiFreeKeyValueList (
/** /**
Normalize the iSCSI name according to RFC. 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. @param[in] Len length of the iSCSI name.
@retval EFI_SUCCESS The iSCSI name is valid and normalized. @retval EFI_SUCCESS The iSCSI name is valid and normalized.
@retval EFI_PROTOCOL_ERROR The iSCSI name is mal-formatted or not in the IQN format. @retval EFI_PROTOCOL_ERROR The iSCSI name is mal-formatted or not in the IQN format.
**/ **/
EFI_STATUS EFI_STATUS
IScsiNormalizeName ( IScsiNormalizeName (
IN CHAR8 *Name, IN OUT CHAR8 *Name,
IN UINTN Len IN UINTN Len
); );
/** /**
@ -955,7 +953,7 @@ IScsiNormalizeName (
@retval EFI_SUCCES The SCSI command is executed and the result is updated to @retval EFI_SUCCES The SCSI command is executed and the result is updated to
the Packet. 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 EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval Others Other errors as indicated. @retval Others Other errors as indicated.
**/ **/
@ -970,14 +968,14 @@ IScsiExecuteScsiCommand (
/** /**
Reinstate the session on some error. 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 EFI_SUCCES The session is reinstated from some error.
@retval Other Reinstatement failed. @retval Other Reinstatement failed.
**/ **/
EFI_STATUS EFI_STATUS
IScsiSessionReinstatement ( 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 Abort the iSCSI session, that is, reset all the connection and free the
resources. resources.
@param[in] Session The iSCSI session. @param[in, out] Session The iSCSI session.
@retval EFI_SUCCES The session is aborted. @retval EFI_SUCCES The session is aborted.
**/ **/
EFI_STATUS EFI_STATUS
IScsiSessionAbort ( IScsiSessionAbort (
IN ISCSI_SESSION *Session IN OUT ISCSI_SESSION *Session
); );
#endif #endif

View File

@ -267,8 +267,8 @@ Tcp4IoDestroySocket (
/** /**
Connect to the other endpoint of the TCP socket. 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. @param[in] Timeout The time to wait for connection done.
@retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully.
@retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period. @retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period.
@ -276,8 +276,8 @@ Tcp4IoDestroySocket (
**/ **/
EFI_STATUS EFI_STATUS
Tcp4IoConnect ( Tcp4IoConnect (
IN TCP4_IO *Tcp4Io, IN OUT TCP4_IO *Tcp4Io,
IN EFI_EVENT Timeout IN EFI_EVENT Timeout
) )
{ {
EFI_TCP4_PROTOCOL *Tcp4; EFI_TCP4_PROTOCOL *Tcp4;
@ -306,11 +306,11 @@ Tcp4IoConnect (
/** /**
Reset the socket. Reset the socket.
@param[in] Tcp4Io The Tcp4Io wrapping the TCP socket. @param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket.
**/ **/
VOID VOID
Tcp4IoReset ( Tcp4IoReset (
IN TCP4_IO *Tcp4Io IN OUT TCP4_IO *Tcp4Io
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;

View File

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

View File

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

View File

@ -32,48 +32,48 @@ typedef struct _MD5_CTX {
/** /**
Initialize four 32-bits chaining variables and use them to do the Md5 transform. 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. @retval EFI_SUCCESS Initialization is ok.
**/ **/
EFI_STATUS EFI_STATUS
MD5Init ( MD5Init (
IN MD5_CTX *Md5Ctx OUT MD5_CTX *Md5Ctx
); );
/** /**
the external interface of Md5 algorithm 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. segment and the final result.
@param[in] Data The data wanted to be transformed. @param[in] Data The data wanted to be transformed.
@param[in] DataLen The length of data. @param[in] DataLen The length of data.
@retval EFI_SUCCESS The transform is ok. @retval EFI_SUCCESS The transform is ok.
@retval Others Other errors as indicated. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
MD5Update ( MD5Update (
IN MD5_CTX *Md5Ctx, IN OUT MD5_CTX *Md5Ctx,
IN VOID *Data, IN VOID *Data,
IN UINTN DataLen IN UINTN DataLen
); );
/** /**
Accumulate the MD5 value of every data segment and generate the finial Accumulate the MD5 value of every data segment and generate the finial
result according to MD5 algorithm. 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. segment and the final result.
@param[out] HashVal The final 128-bits output. @param[out] HashVal The final 128-bits output.
@retval EFI_SUCCESS The transform is ok. @retval EFI_SUCCESS The transform is ok.
@retval Others Other errors as indicated. @retval Others Other errors as indicated.
**/ **/
EFI_STATUS EFI_STATUS
MD5Final ( MD5Final (
IN MD5_CTX *Md5Ctx, IN OUT MD5_CTX *Md5Ctx,
OUT UINT8 *HashVal OUT UINT8 *HashVal
); );
#endif #endif