summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c')
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c73
1 files changed, 34 insertions, 39 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c
index 4dca145318..0dcb9a8796 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.c
@@ -1,6 +1,7 @@
-/*++
+/** @file
+ Challenge-Handshake Authentication Protocol (CHAP) Configuration
-Copyright (c) 2004 - 2007, Intel Corporation
+Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -15,7 +16,9 @@ Module Name:
Abstract:
---*/
+ This file is for CHAP configuration
+
+**/
#include "IScsiImpl.h"
#include "Md5.h"
@@ -92,30 +95,26 @@ IScsiCHAPAuthTarget (
return Status;
}
-EFI_STATUS
-IScsiCHAPOnRspReceived (
- IN ISCSI_CONNECTION *Conn,
- IN BOOLEAN Transit
- )
-/*++
-
-Routine Description:
-
+/**
This function checks the received iSCSI Login Response during the security
negotiation stage.
-Arguments:
+ @param Conn[in] The iSCSI connection.
- Conn - The iSCSI connection.
- Transit - The transit flag of the latest iSCSI Login Response.
+ @param Transit[in] The transit flag of the latest iSCSI Login Response.
-Returns:
+ @retval EFI_SUCCESS The Login Response passed the CHAP validation.
- EFI_SUCCESS - The Login Response passed the CHAP validation.
- EFI_OUT_OF_RESOURCES - Failed to allocate memory.
- EFI_PROTOCOL_ERROR - Some kind of protocol error happend.
+ @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
---*/
+ @retval EFI_PROTOCOL_ERROR Some kind of protocol error happend.
+
+**/
+EFI_STATUS
+IScsiCHAPOnRspReceived (
+ IN ISCSI_CONNECTION *Conn,
+ IN BOOLEAN Transit
+ )
{
EFI_STATUS Status;
ISCSI_SESSION *Session;
@@ -288,31 +287,27 @@ ON_EXIT:
return Status;
}
-EFI_STATUS
-IScsiCHAPToSendReq (
- IN ISCSI_CONNECTION *Conn,
- IN NET_BUF *Pdu
- )
-/*++
-
-Routine Description:
-
+/**
This function fills the CHAP authentication information into the login PDU
during the security negotiation stage in the iSCSI connection login.
-
-Arguments:
- Conn - The iSCSI connection.
- Pdu - The PDU to send out.
+ @param Conn[in] The iSCSI connection.
-Returns:
+ @param Pdu[in] The PDU to send out.
- EFI_SUCCESS - All check passed and the phase-related CHAP authentication
- info is filled into the iSCSI PDU.
- EFI_OUT_OF_RESOURCES - Failed to allocate memory.
- EFI_PROTOCOL_ERROR - Some kind of protocol error happend.
+ @retval EFI_SUCCESS All check passed and the phase-related CHAP
+ authentication info is filled into the iSCSI PDU.
---*/
+ @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
+
+ @retval EFI_PROTOCOL_ERROR Some kind of protocol error happend.
+
+**/
+EFI_STATUS
+IScsiCHAPToSendReq (
+ IN ISCSI_CONNECTION *Conn,
+ IN NET_BUF *Pdu
+ )
{
EFI_STATUS Status;
ISCSI_SESSION *Session;