/*++
This file contains an 'Intel UEFI Application' and is
licensed for Intel CPUs and chipsets under the terms of your
license agreement with Intel or your vendor. This file may
be modified by the user, subject to additional terms of the
license agreement
--*/
/*++
Copyright (c) 2011 Intel Corporation. All rights reserved
This software and associated documentation (if any) is furnished
under a license and may only be used or copied in accordance
with the terms of the license. Except as permitted by such
license, no part of this software or documentation may be
reproduced, stored in a retrieval system, or transmitted in any
form or by any means without the express written consent of
Intel Corporation.
--*/
/** @file
Display the DHCP options
**/
#include <WebServer.h>
#include <Guid/DxeServices.h>
#include <pi/PiDxeCis.h>
#include <protocol/ServiceBinding.h>
/**
Respond with the DHCP options
@param [in] SocketFD The socket's file descriptor to add to the list.
@param [in] pPort The WSDT_PORT structure address
@param [out] pbDone Address to receive the request completion status
@retval EFI_SUCCESS The request was successfully processed
**/
)
{
// EFI_HANDLE Dhcp4Handle;
// EFI_SERVICE_BINDING_PROTOCOL * pService;
DBG_ENTER ( );
//
// Send the DHCP options
//
for ( ; ; ) {
//
// Send the page header
//
break;
}
//
// Build the header
//
"<h1>" );
break;
}
L"DHCP Options" );
break;
}
"</h1>\r\n" );
break;
}
//
// Attempt to locate DHCP clients
//
// &gEfiDhcp4ServiceBindingProtocolGuid,
NULL,
&pHandle );
"DHCP not in use" );
break;
}
}
else {
//
// Walk the list of handles
//
/*
//
// Get the DHCP service binding
//
Status = gBS->OpenProtocol ( *pHandle,
&gEfiDhcp4ServiceBindingProtocolGuid,
&pService,
NULL,
gImageHandle,
EFI_OPEN_PROTOCOL_GET_PROTOCOL );
if ( EFI_ERROR ( Status )) {
Status = HttpSendAnsiString ( SocketFD,
pPort,
"Failed to open gEfiDhcp4ServiceBindingProtocolGuid" );
break;
}
//
// Get the DHCP handle
//
Status = pService->CreateChild ( pService,
&Dhcp4Handle );
if ( EFI_ERROR ( Status )) {
Status = HttpSendAnsiString ( SocketFD,
pPort,
"Failed to create DHCP4 child" );
}
else {
*/
//
// Get the DHCP protocol
//
// Dhcp4Handle,
&pDhcp4,
NULL,
"Failed to open gEfiDhcp4ProtocolGuid" );
}
else {
//
// Get the DHCP packet
//
&Dhcp4Mode );
"Failed to get DHCP4 mode" );
}
else {
//
// Get the last packet
//
if ( NULL == pDhcp4Packet ) {
"No DHCP reply received!<br/>DHCP Mode:<br/>" );
break;
}
//
// Display the DHCP mode data
//
sizeof ( Dhcp4Mode ),
}
else {
//
// Display the DHCP packet
//
}
}
/*
}
//
// Done with the DHCP protocol
//
pService->DestroyChild ( pService,
Dhcp4Handle );
*/
}
//
// Set the next service binding
//
pHandle += 1;
}
}
//
// Send the page trailer
//
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}