diff options
author | ywu21 <ywu21@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-14 12:25:48 +0000 |
---|---|---|
committer | ywu21 <ywu21@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-14 12:25:48 +0000 |
commit | c5de0d5599d8833c511d8668583ee2d4fe5643fc (patch) | |
tree | 49efaea4a2ce5d16f9abe1cbe24773cf9c41b0ea /MdeModulePkg/Universal/Network | |
parent | 999acf5ac908a782cec851b5678224a9cf6f71fc (diff) | |
download | edk2-c5de0d5599d8833c511d8668583ee2d4fe5643fc.tar.gz edk2-c5de0d5599d8833c511d8668583ee2d4fe5643fc.tar.bz2 edk2-c5de0d5599d8833c511d8668583ee2d4fe5643fc.zip |
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
Diffstat (limited to 'MdeModulePkg/Universal/Network')
15 files changed, 206 insertions, 215 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c index 4df7123b54..6ee32f4861 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c @@ -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;
@@ -306,8 +304,8 @@ ON_EXIT: 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] Conn The iSCSI connection.
+ @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.
@@ -316,8 +314,8 @@ ON_EXIT: **/
EFI_STATUS
IScsiCHAPToSendReq (
- IN ISCSI_CONNECTION *Conn,
- IN NET_BUF *Pdu
+ IN ISCSI_CONNECTION *Conn,
+ IN OUT NET_BUF *Pdu
)
{
EFI_STATUS Status;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h index ca8338d504..2bae18fc33 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h @@ -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] Conn The iSCSI connection.
+ @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.
@@ -110,8 +107,8 @@ IScsiCHAPOnRspReceived ( **/
EFI_STATUS
IScsiCHAPToSendReq (
- IN ISCSI_CONNECTION *Conn,
- IN NET_BUF *Pdu
+ IN ISCSI_CONNECTION *Conn,
+ IN OUT NET_BUF *Pdu
);
#endif
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c index 5b6c3bcee3..4b20dc73c1 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c @@ -226,13 +226,13 @@ 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[in] ConfigFormEntry The iSCSI configuration form entry.
+ @param[out] IfrNvData The IFR nv data.
**/
VOID
IScsiConvertDeviceConfigDataToIfrNvData (
- IN ISCSI_CONFIG_FORM_ENTRY *ConfigFormEntry,
- IN ISCSI_CONFIG_IFR_NVDATA *IfrNvData
+ IN ISCSI_CONFIG_FORM_ENTRY *ConfigFormEntry,
+ 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,
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c index 85b5dbf745..1a0dbbe10c 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c @@ -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.
- @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] RootPath The RootPath.
+ @param[in] Length Length of the RootPath option payload.
+ @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.
@@ -28,9 +28,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
EFI_STATUS
IScsiDhcpExtractRootPath (
- IN CHAR8 *RootPath,
- IN UINT8 Length,
- IN ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData
+ IN CHAR8 *RootPath,
+ IN UINT8 Length,
+ IN OUT ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData
)
{
EFI_STATUS Status;
@@ -246,8 +246,8 @@ 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] Dhcp4 The DHCP4 protocol.
+ @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.
@@ -256,8 +256,8 @@ IScsiDhcpSelectOffer ( **/
EFI_STATUS
IScsiParseDhcpAck (
- IN EFI_DHCP4_PROTOCOL *Dhcp4,
- IN ISCSI_SESSION_CONFIG_DATA *ConfigData
+ IN EFI_DHCP4_PROTOCOL *Dhcp4,
+ IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
)
{
EFI_STATUS Status;
@@ -337,9 +337,9 @@ IScsiParseDhcpAck ( /**
Parse the DHCP ACK to get the address configuration and DNS information.
- @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] Image The handle of the driver image.
+ @param[in] Controller The handle of the controller;
+ @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.
@@ -347,9 +347,9 @@ IScsiParseDhcpAck ( **/
EFI_STATUS
IScsiDoDhcp (
- IN EFI_HANDLE Image,
- IN EFI_HANDLE Controller,
- IN ISCSI_SESSION_CONFIG_DATA *ConfigData
+ IN EFI_HANDLE Image,
+ IN EFI_HANDLE Controller,
+ IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
)
{
EFI_HANDLE Dhcp4Handle;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h index af55c13dae..fd1fbe46ca 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h @@ -43,9 +43,9 @@ typedef struct _ISCSI_ROOT_PATH_FIELD { /**
Parse the DHCP ACK to get the address configuration and DNS information.
- @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] Image The handle of the driver image.
+ @param[in] Controller The handle of the controller;
+ @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.
@@ -53,9 +53,9 @@ typedef struct _ISCSI_ROOT_PATH_FIELD { **/
EFI_STATUS
IScsiDoDhcp (
- IN EFI_HANDLE Image,
- IN EFI_HANDLE Controller,
- IN ISCSI_SESSION_CONFIG_DATA *ConfigData
+ IN EFI_HANDLE Image,
+ IN EFI_HANDLE Controller,
+ IN OUT ISCSI_SESSION_CONFIG_DATA *ConfigData
);
#endif
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c index 2f776aa224..dd4068be6e 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c @@ -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;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h index 369f159120..810462454d 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h @@ -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
);
//
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c index ff8c96eafe..83824331ba 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c @@ -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));
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c index 7a77b2a04d..dc9c7a7af1 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c @@ -298,7 +298,7 @@ IScsiAsciiStrToIp ( Index = 0;
- while (*Str) {
+ while (*Str != 0) {
if (Index > 3) {
return EFI_INVALID_PARAMETER;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c index f3ed2b780e..06b60da9b1 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c @@ -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,8 +51,8 @@ IScsiDetatchConnection ( /**
Check the sequence number according to RFC3720.
- @param[in] ExpSN The currently expected sequence number.
- @param[in] NewSN The sequence number to check.
+ @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.
@retval EFI_NOT_READY Response was sent due to a retransmission request.
@@ -60,8 +60,8 @@ IScsiDetatchConnection ( **/
EFI_STATUS
IScsiCheckSN (
- IN UINT32 *ExpSN,
- IN UINT32 NewSN
+ IN OUT UINT32 *ExpSN,
+ IN UINT32 NewSN
)
{
if (!ISCSI_SEQ_EQ (NewSN, *ExpSN)) {
@@ -85,15 +85,15 @@ IScsiCheckSN ( /**
Update the sequence numbers for the iSCSI command.
- @param[in] Session The iSCSI session.
- @param[in] MaxCmdSN Maximum CmdSN from the target.
- @param[in] ExpCmdSN Next expected CmdSN from the target.
+ @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 UINT32 MaxCmdSN,
- IN UINT32 ExpCmdSN
+ IN OUT ISCSI_SESSION *Session,
+ IN UINT32 MaxCmdSN,
+ IN UINT32 ExpCmdSN
)
{
if (ISCSI_SEQ_LT (MaxCmdSN, ExpCmdSN - 1)) {
@@ -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,10 +398,10 @@ 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.
+ @param[in] Key The key name string.
+ @param[in] Value The value string.
@retval EFI_SUCCESS The key-valu pair is added to the PDU's datasegment and
the correspondence length fields are updated.
@@ -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,10 +768,10 @@ 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] Data The data segment which should contain the
- TargetAddress key-value list.
- @param[in] Len Length of the data.
+ @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.
@retval EFI_SUCCESS The target address is updated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -780,9 +780,9 @@ IScsiProcessLoginRsp ( **/
EFI_STATUS
IScsiUpdateTargetAddress (
- IN ISCSI_SESSION *Session,
- IN CHAR8 *Data,
- IN UINT32 Len
+ IN OUT ISCSI_SESSION *Session,
+ IN CHAR8 *Data,
+ IN UINT32 Len
)
{
LIST_ENTRY *KeyValueList;
@@ -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;
@@ -1346,15 +1344,15 @@ 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] Conn The connection in iSCSI login.
+ @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,8 +1408,8 @@ 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] Len The length of the last semgnet in the PDU.
+ @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.
@retval EFI_OUT_OF_RESOURCES There is not enough remaining free space to add the
@@ -1419,8 +1417,8 @@ IScsiFillOpParams ( **/
EFI_STATUS
IScsiPadSegment (
- IN NET_BUF *Pdu,
- IN UINT32 Len
+ IN OUT NET_BUF *Pdu,
+ IN UINT32 Len
)
{
UINT32 PadLen;
@@ -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] Key The key name to find.
+ @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,16 +1567,16 @@ IScsiFreeKeyValueList ( /**
Normalize the iSCSI name according to RFC.
- @param[in] Name The iSCSI name.
- @param[in] Len length of 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.
@retval EFI_PROTOCOL_ERROR The iSCSI name is mal-formatted or not in the IQN format.
**/
EFI_STATUS
IScsiNormalizeName (
- IN CHAR8 *Name,
- IN UINTN Len
+ IN OUT CHAR8 *Name,
+ IN UINTN Len
)
{
UINTN Index;
@@ -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;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h index 870e6ded44..acbfd37144 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h @@ -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,10 +736,10 @@ 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.
+ @param[in] Key The key name string.
+ @param[in] Value The value string.
@retval EFI_SUCCESS The key-valu pair is added to the PDU's datasegment and
the correspondence length fields are updated.
@@ -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,18 +779,18 @@ 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] Data The data segment which should contain the
- TargetAddress key-value list.
- @param[in] Len Length of the data.
+ @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.
@retval EFI_SUCCESS The target address is updated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -799,9 +799,9 @@ IScsiProcessLoginRsp ( **/
EFI_STATUS
IScsiUpdateTargetAddress (
- IN ISCSI_SESSION *Session,
- IN CHAR8 *Data,
- IN UINT32 Len
+ 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,29 +854,28 @@ 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] Conn The connection in iSCSI login.
+ @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] Len The length of the last semgnet in the PDU.
+ @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.
@retval EFI_OUT_OF_RESOURCES There is not enough remaining free space to add the
@@ -885,8 +883,8 @@ IScsiFillOpParams ( **/
EFI_STATUS
IScsiPadSegment (
- IN NET_BUF *Pdu,
- IN UINT32 Len
+ 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] Key The key name to find.
+ @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,16 +930,16 @@ IScsiFreeKeyValueList ( /**
Normalize the iSCSI name according to RFC.
- @param[in] Name The iSCSI name.
- @param[in] Len length of 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.
@retval EFI_PROTOCOL_ERROR The iSCSI name is mal-formatted or not in the IQN format.
**/
EFI_STATUS
IScsiNormalizeName (
- IN CHAR8 *Name,
- IN UINTN Len
+ 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
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c index 96d990f7fe..2278fe7937 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c @@ -267,8 +267,8 @@ Tcp4IoDestroySocket ( /**
Connect to the other endpoint of the TCP socket.
- @param[in] Tcp4Io The Tcp4Io wrapping the TCP socket.
- @param[in] Timeout The time to wait for connection done.
+ @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.
@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
Tcp4IoConnect (
- IN TCP4_IO *Tcp4Io,
- IN EFI_EVENT Timeout
+ IN OUT TCP4_IO *Tcp4Io,
+ IN EFI_EVENT Timeout
)
{
EFI_TCP4_PROTOCOL *Tcp4;
@@ -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;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h index 1cc051c58a..42f62f5d4a 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h @@ -77,8 +77,8 @@ Tcp4IoDestroySocket ( /**
Connect to the other endpoint of the TCP socket.
- @param[in] Tcp4Io The Tcp4Io wrapping the TCP socket.
- @param[in] Timeout The time to wait for connection done.
+ @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.
@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
Tcp4IoConnect (
- IN TCP4_IO *Tcp4Io,
- IN EFI_EVENT Timeout
+ 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
);
/**
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c index fae10d268f..462d1b7d2d 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c @@ -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
- segment and the final result.
- @param[in] Data The data wanted to be transformed.
- @param[in] DataLen The length of 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,19 +279,19 @@ MD5Init ( /**
the external interface of Md5 algorithm
- @param[in] 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.
+ @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.
@retval EFI_SUCCESS The transform is ok.
@retval Others Other errors as indicated.
**/
EFI_STATUS
MD5Update (
- IN MD5_CTX *Md5Ctx,
- IN VOID *Data,
- IN UINTN DataLen
+ IN OUT MD5_CTX *Md5Ctx,
+ IN VOID *Data,
+ IN UINTN DataLen
)
{
if (EFI_ERROR (Md5Ctx->Status)) {
@@ -307,17 +307,17 @@ 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
- segment and the final result.
- @param[out] HashVal The final 128-bits output.
+ @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.
@retval EFI_SUCCESS The transform is ok.
@retval Others Other errors as indicated.
**/
EFI_STATUS
MD5Final (
- IN MD5_CTX *Md5Ctx,
- OUT UINT8 *HashVal
+ IN OUT MD5_CTX *Md5Ctx,
+ OUT UINT8 *HashVal
)
{
UINTN PadLength;
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h index 18accea7d5..4198e200dc 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h @@ -32,48 +32,48 @@ 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
- segment and the final result.
- @param[in] Data The data wanted to be transformed.
- @param[in] DataLen The length of 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.
@retval EFI_SUCCESS The transform is ok.
@retval Others Other errors as indicated.
**/
EFI_STATUS
MD5Update (
- IN MD5_CTX *Md5Ctx,
- IN VOID *Data,
- IN UINTN DataLen
+ IN OUT MD5_CTX *Md5Ctx,
+ IN VOID *Data,
+ IN UINTN DataLen
);
/**
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
- segment and the final result.
- @param[out] HashVal The final 128-bits output.
+ @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.
@retval EFI_SUCCESS The transform is ok.
@retval Others Other errors as indicated.
**/
EFI_STATUS
MD5Final (
- IN MD5_CTX *Md5Ctx,
- OUT UINT8 *HashVal
+ IN OUT MD5_CTX *Md5Ctx,
+ OUT UINT8 *HashVal
);
#endif
|