code scrub fix
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7290 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation.<BR>
|
||||
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
|
||||
@@ -9,13 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name:
|
||||
|
||||
ComponentName.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
|
||||
@@ -34,10 +27,10 @@ Abstract:
|
||||
by This does not support the language specified by Language,
|
||||
then EFI_UNSUPPORTED is returned.
|
||||
|
||||
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||
@param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
|
||||
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||
@param[in] Language A pointer to a Null-terminated ASCII string
|
||||
array indicating the language. This is the
|
||||
language of the driver name that the caller is
|
||||
requesting, and it must match one of the
|
||||
@@ -46,7 +39,7 @@ Abstract:
|
||||
to the driver writer. Language is specified
|
||||
in RFC 3066 or ISO 639-2 language code format.
|
||||
|
||||
@param DriverName[out] A pointer to the Unicode string to return.
|
||||
@param[out] DriverName A pointer to the Unicode string to return.
|
||||
This Unicode string is the name of the
|
||||
driver specified by This in the language
|
||||
specified by Language.
|
||||
@@ -85,15 +78,15 @@ DhcpComponentNameGetDriverName (
|
||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||
|
||||
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||
@param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
|
||||
@param ControllerHandle[in] The handle of a controller that the driver
|
||||
@param[in] ControllerHandle The handle of a controller that the driver
|
||||
specified by This is managing. This handle
|
||||
specifies the controller whose name is to be
|
||||
returned.
|
||||
|
||||
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||
@param[in] ChildHandle The handle of the child controller to retrieve
|
||||
the name of. This is an optional parameter that
|
||||
may be NULL. It will be NULL for device
|
||||
drivers. It will also be NULL for a bus drivers
|
||||
@@ -102,7 +95,7 @@ DhcpComponentNameGetDriverName (
|
||||
driver that wishes to retrieve the name of a
|
||||
child controller.
|
||||
|
||||
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||
@param[in] Language A pointer to a Null-terminated ASCII string
|
||||
array indicating the language. This is the
|
||||
language of the driver name that the caller is
|
||||
requesting, and it must match one of the
|
||||
@@ -111,7 +104,7 @@ DhcpComponentNameGetDriverName (
|
||||
to the driver writer. Language is specified in
|
||||
RFC 3066 or ISO 639-2 language code format.
|
||||
|
||||
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||
@param[out] ControllerName A pointer to the Unicode string to return.
|
||||
This Unicode string is the name of the
|
||||
controller specified by ControllerHandle and
|
||||
ChildHandle in the language specified by
|
||||
@@ -191,10 +184,10 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mDhcpDriverNameTable[] =
|
||||
by This does not support the language specified by Language,
|
||||
then EFI_UNSUPPORTED is returned.
|
||||
|
||||
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||
@param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
|
||||
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||
@param[in] Language A pointer to a Null-terminated ASCII string
|
||||
array indicating the language. This is the
|
||||
language of the driver name that the caller is
|
||||
requesting, and it must match one of the
|
||||
@@ -203,7 +196,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mDhcpDriverNameTable[] =
|
||||
to the driver writer. Language is specified
|
||||
in RFC 3066 or ISO 639-2 language code format.
|
||||
|
||||
@param DriverName[out] A pointer to the Unicode string to return.
|
||||
@param[out] DriverName A pointer to the Unicode string to return.
|
||||
This Unicode string is the name of the
|
||||
driver specified by This in the language
|
||||
specified by Language.
|
||||
@@ -250,15 +243,15 @@ DhcpComponentNameGetDriverName (
|
||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||
|
||||
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||
@param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
|
||||
@param ControllerHandle[in] The handle of a controller that the driver
|
||||
@param[in] ControllerHandle The handle of a controller that the driver
|
||||
specified by This is managing. This handle
|
||||
specifies the controller whose name is to be
|
||||
returned.
|
||||
|
||||
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||
@param[in] ChildHandle The handle of the child controller to retrieve
|
||||
the name of. This is an optional parameter that
|
||||
may be NULL. It will be NULL for device
|
||||
drivers. It will also be NULL for a bus drivers
|
||||
@@ -267,7 +260,7 @@ DhcpComponentNameGetDriverName (
|
||||
driver that wishes to retrieve the name of a
|
||||
child controller.
|
||||
|
||||
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||
@param[in] Language A pointer to a Null-terminated ASCII string
|
||||
array indicating the language. This is the
|
||||
language of the driver name that the caller is
|
||||
requesting, and it must match one of the
|
||||
@@ -276,7 +269,7 @@ DhcpComponentNameGetDriverName (
|
||||
to the driver writer. Language is specified in
|
||||
RFC 3066 or ISO 639-2 language code format.
|
||||
|
||||
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||
@param[out] ControllerName A pointer to the Unicode string to return.
|
||||
This Unicode string is the name of the
|
||||
controller specified by ControllerHandle and
|
||||
ChildHandle in the language specified by
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||
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
|
||||
@@ -9,14 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
Dhcp4Driver.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Dhcp4Impl.h"
|
||||
@@ -43,8 +35,8 @@ EFI_SERVICE_BINDING_PROTOCOL mDhcp4ServiceBindingTemplate = {
|
||||
|
||||
Entry point of the DHCP driver to install various protocols.
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the UEFI image.
|
||||
@param SystemTable A pointer to the EFI System Table.
|
||||
@param[in] ImageHandle The firmware allocated handle for the UEFI image.
|
||||
@param[in] SystemTable A pointer to the EFI System Table.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
||||
@@ -76,10 +68,10 @@ Dhcp4DriverEntryPoint (
|
||||
follow these calling restrictions. If any other agent wishes to call
|
||||
Supported() it must also follow these calling restrictions.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to test
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
@param[in] This Protocol instance pointer.
|
||||
@param[in] ControllerHandle Handle of device to test
|
||||
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
|
||||
@retval EFI_SUCCESS This driver supports this device
|
||||
@retval EFI_ALREADY_STARTED This driver is already running on this device
|
||||
@@ -114,8 +106,8 @@ Dhcp4DriverBindingSupported (
|
||||
Configure the default UDP child to receive all the DHCP traffics
|
||||
on this network interface.
|
||||
|
||||
@param UdpIo The UDP IO port to configure
|
||||
@param Context The context to the function
|
||||
@param[in] UdpIo The UDP IO port to configure
|
||||
@param[in] Context The context to the function
|
||||
|
||||
@retval EFI_SUCCESS The UDP IO port is successfully configured.
|
||||
@retval Others Failed to configure the UDP child.
|
||||
@@ -157,7 +149,7 @@ DhcpConfigUdpIo (
|
||||
or partly destroyed. If a resource is destroyed, it is marked as so in
|
||||
case the destroy failed and being called again later.
|
||||
|
||||
@param DhcpSb The DHCP service instance to destory.
|
||||
@param[in] DhcpSb The DHCP service instance to destory.
|
||||
|
||||
@retval EFI_SUCCESS Always return success.
|
||||
|
||||
@@ -189,11 +181,11 @@ Dhcp4CloseService (
|
||||
/**
|
||||
Create a new DHCP service binding instance for the controller.
|
||||
|
||||
@param Controller The controller to install DHCP service binding
|
||||
protocol onto
|
||||
@param ImageHandle The driver's image handle
|
||||
@param Service The variable to receive the created DHCP service
|
||||
instance.
|
||||
@param[in] Controller The controller to install DHCP service binding
|
||||
protocol onto
|
||||
@param[in] ImageHandle The driver's image handle
|
||||
@param[out] Service The variable to receive the created DHCP service
|
||||
instance.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource .
|
||||
@retval EFI_SUCCESS The DHCP service instance is created.
|
||||
@@ -275,10 +267,10 @@ ON_ERROR:
|
||||
calling restrictions. If any other agent wishes to call Start() it
|
||||
must also follow these calling restrictions.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to bind driver to
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
@param[in] This Protocol instance pointer.
|
||||
@param[in] ControllerHandle Handle of device to bind driver to
|
||||
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
|
||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||
@retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
|
||||
@@ -355,11 +347,11 @@ ON_ERROR:
|
||||
must follow these calling restrictions. If any other agent wishes
|
||||
to call Stop() it must also follow these calling restrictions.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to stop driver on
|
||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||
children is zero stop the entire bus driver.
|
||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
||||
@param[in] This Protocol instance pointer.
|
||||
@param[in] ControllerHandle Handle of device to stop driver on
|
||||
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||
children is zero stop the entire bus driver.
|
||||
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||
|
||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||
@retval other This driver was not removed from this device
|
||||
@@ -453,8 +445,6 @@ Dhcp4DriverBindingStop (
|
||||
@param DhcpSb The dhcp service instance
|
||||
@param Instance The dhcp instance to initialize
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpInitProtocol (
|
||||
@@ -477,14 +467,18 @@ DhcpInitProtocol (
|
||||
|
||||
|
||||
/**
|
||||
Creates a child handle with a set of I/O services.
|
||||
Creates a child handle and installs a protocol.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||
then a new handle is created. If it is not NULL, then the
|
||||
I/O services are added to the existing child handle.
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||
then the protocol is added to the existing UEFI handle.
|
||||
|
||||
@retval EFI_SUCCES The child handle was created with the I/O services
|
||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
||||
the child
|
||||
@@ -569,17 +563,20 @@ Dhcp4ServiceBindingCreateChild (
|
||||
|
||||
|
||||
/**
|
||||
Destroys a child handle with a set of I/O services.
|
||||
Destroys a child handle with a protocol installed on it.
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Handle of the child to destroy
|
||||
|
||||
@retval EFI_SUCCES The I/O services were removed from the child handle
|
||||
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
|
||||
that are being removed.
|
||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
|
||||
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
|
||||
I/O services are being used.
|
||||
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||
because its services are being used.
|
||||
@retval other The child handle was not destroyed
|
||||
|
||||
**/
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
Header for the DHCP4 driver.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||
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
|
||||
@@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name:
|
||||
|
||||
Dhcp4Driver.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Header for the DHCP4 driver
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_DHCP4_DRIVER_H__
|
||||
@@ -34,10 +26,10 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gDhcp4ComponentName2;
|
||||
follow these calling restrictions. If any other agent wishes to call
|
||||
Supported() it must also follow these calling restrictions.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to test
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
@param[in] This Protocol instance pointer.
|
||||
@param[in] ControllerHandle Handle of device to test
|
||||
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
|
||||
@retval EFI_SUCCESS This driver supports this device
|
||||
@retval EFI_ALREADY_STARTED This driver is already running on this device
|
||||
@@ -60,10 +52,10 @@ Dhcp4DriverBindingSupported (
|
||||
calling restrictions. If any other agent wishes to call Start() it
|
||||
must also follow these calling restrictions.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to bind driver to
|
||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
@param[in] This Protocol instance pointer.
|
||||
@param[in] ControllerHandle Handle of device to bind driver to
|
||||
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
|
||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||
@retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
|
||||
@@ -86,11 +78,11 @@ Dhcp4DriverBindingStart (
|
||||
must follow these calling restrictions. If any other agent wishes
|
||||
to call Stop() it must also follow these calling restrictions.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ControllerHandle Handle of device to stop driver on
|
||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||
children is zero stop the entire bus driver.
|
||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
||||
@param[in] This Protocol instance pointer.
|
||||
@param[in] ControllerHandle Handle of device to stop driver on
|
||||
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||
children is zero stop the entire bus driver.
|
||||
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||
|
||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||
@retval other This driver was not removed from this device
|
||||
@@ -106,14 +98,18 @@ Dhcp4DriverBindingStop (
|
||||
);
|
||||
|
||||
/**
|
||||
Creates a child handle with a set of I/O services.
|
||||
Creates a child handle and installs a protocol.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||
then a new handle is created. If it is not NULL, then the
|
||||
I/O services are added to the existing child handle.
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||
then the protocol is added to the existing UEFI handle.
|
||||
|
||||
@retval EFI_SUCCES The child handle was created with the I/O services
|
||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
||||
the child
|
||||
@@ -128,17 +124,20 @@ Dhcp4ServiceBindingCreateChild (
|
||||
);
|
||||
|
||||
/**
|
||||
Destroys a child handle with a set of I/O services.
|
||||
Destroys a child handle with a protocol installed on it.
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Handle of the child to destroy
|
||||
|
||||
@retval EFI_SUCCES The I/O services were removed from the child handle
|
||||
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
|
||||
that are being removed.
|
||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
|
||||
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
|
||||
I/O services are being used.
|
||||
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||
because its services are being used.
|
||||
@retval other The child handle was not destroyed
|
||||
|
||||
**/
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
This file implement the EFI_DHCP4_PROTOCOL interface.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||
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
|
||||
@@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name:
|
||||
|
||||
Dhcp4Impl.c
|
||||
|
||||
Abstract:
|
||||
|
||||
This file implement the EFI_DHCP4_PROTOCOL interface.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
|
||||
@@ -29,8 +21,8 @@ Abstract:
|
||||
The GetModeData() function returns the current operating mode and cached data
|
||||
packet for the EFI DHCPv4 Protocol driver.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[out] Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
|
||||
|
||||
@retval EFI_SUCCESS The mode data was returned.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@@ -69,8 +61,8 @@ EfiDhcp4GetModeData (
|
||||
wants to make it possible for another instance to configure the EFI DHCPv4 Protocol
|
||||
driver, it must call this function with Dhcp4CfgData set to NULL.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or
|
||||
Dhcp4InitReboot state, if the original state of this driver
|
||||
@@ -109,14 +101,14 @@ EfiDhcp4Configure (
|
||||
by EFI_DHCP4_PROTOCOL.Configure() will be called and the user can take this
|
||||
opportunity to control the process.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param CompletionEvent If not NULL, indicates the event that will be signaled when the
|
||||
EFI DHCPv4 Protocol driver is transferred into the
|
||||
Dhcp4Bound state or when the DHCP process is aborted.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
|
||||
is transferred into the Dhcp4Bound state or the process fails.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] CompletionEvent If not NULL, indicates the event that will be signaled when the
|
||||
EFI DHCPv4 Protocol driver is transferred into the
|
||||
Dhcp4Bound state or when the DHCP process is aborted.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
|
||||
is transferred into the Dhcp4Bound state or the process fails.
|
||||
|
||||
@retval EFI_SUCCESS The DHCP configuration process has started, or it has completed
|
||||
when CompletionEvent is NULL.
|
||||
@@ -154,16 +146,16 @@ EfiDhcp4Start (
|
||||
state and the previous configuration is restored. The outgoing and incoming packets
|
||||
can be captured by the EFI_DHCP4_CALLBACK function.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param RebindRequest If TRUE, this function broadcasts the request packets and enters
|
||||
the Dhcp4Rebinding state. Otherwise, it sends a unicast
|
||||
request packet and enters the Dhcp4Renewing state.
|
||||
@param CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
|
||||
completes or some error occurs.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
|
||||
until the DHCP process finishes.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] RebindRequest If TRUE, this function broadcasts the request packets and enters
|
||||
the Dhcp4Rebinding state. Otherwise, it sends a unicast
|
||||
request packet and enters the Dhcp4Renewing state.
|
||||
@param[in] CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
|
||||
completes or some error occurs.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
|
||||
until the DHCP process finishes.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the
|
||||
Dhcp4Renewing state or is back to the Dhcp4Bound state.
|
||||
@@ -198,7 +190,7 @@ EfiDhcp4RenewRebind (
|
||||
After a successful call to this function, the EFI DHCPv4 Protocol driver returns
|
||||
to the Dhcp4Init state and any subsequent incoming packets will be discarded silently.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init phase.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@@ -221,7 +213,7 @@ EfiDhcp4Release (
|
||||
before DHCP configuration process can be started again. This function can be
|
||||
called when the EFI DHCPv4 Protocol driver is in any state.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Stopped phase.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@@ -241,19 +233,19 @@ EfiDhcp4Stop (
|
||||
does not change any state of the EFI DHCPv4 Protocol driver and can be used at
|
||||
any time.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param SeedPacket Initial packet to be used as a base for building new packet.
|
||||
@param DeleteCount Number of opcodes in the DeleteList.
|
||||
@param DeleteList List of opcodes to be deleted from the seed packet.
|
||||
Ignored if DeleteCount is zero.
|
||||
@param AppendCount Number of entries in the OptionList.
|
||||
@param AppendList Pointer to a DHCP option list to be appended to SeedPacket.
|
||||
If SeedPacket also contains options in this list, they are
|
||||
replaced by new options (except pad option). Ignored if
|
||||
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
|
||||
@param NewPacket Pointer to storage for the pointer to the new allocated packet.
|
||||
Use the EFI Boot Service FreePool() on the resulting pointer
|
||||
when done with the packet.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] SeedPacket Initial packet to be used as a base for building new packet.
|
||||
@param[in] DeleteCount Number of opcodes in the DeleteList.
|
||||
@param[in] DeleteList List of opcodes to be deleted from the seed packet.
|
||||
Ignored if DeleteCount is zero.
|
||||
@param[in] AppendCount Number of entries in the OptionList.
|
||||
@param[in] AppendList Pointer to a DHCP option list to be appended to SeedPacket.
|
||||
If SeedPacket also contains options in this list, they are
|
||||
replaced by new options (except pad option). Ignored if
|
||||
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
|
||||
@param[out] NewPacket Pointer to storage for the pointer to the new allocated packet.
|
||||
Use the EFI Boot Service FreePool() on the resulting pointer
|
||||
when done with the packet.
|
||||
|
||||
@retval EFI_SUCCESS The new packet was built.
|
||||
@retval EFI_OUT_OF_RESOURCES Storage for the new packet could not be allocated.
|
||||
@@ -272,15 +264,15 @@ EfiDhcp4Build (
|
||||
OUT EFI_DHCP4_PACKET **NewPacket
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Transmits a DHCP formatted packet and optionally waits for responses.
|
||||
|
||||
The TransmitReceive() function is used to transmit a DHCP packet and optionally
|
||||
wait for the response from servers. This function does not change the state of
|
||||
the EFI DHCPv4 Protocol driver and thus can be used at any time.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
||||
|
||||
@retval EFI_SUCCESS The packet was successfully queued for transmission.
|
||||
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
|
||||
@@ -352,8 +344,8 @@ EFI_DHCP4_PROTOCOL mDhcp4ProtocolTemplate = {
|
||||
The GetModeData() function returns the current operating mode and cached data
|
||||
packet for the EFI DHCPv4 Protocol driver.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[out] Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
|
||||
|
||||
@retval EFI_SUCCESS The mode data was returned.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@@ -426,8 +418,6 @@ EfiDhcp4GetModeData (
|
||||
|
||||
@param Config The DHCP configure data
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpCleanConfigure (
|
||||
@@ -462,8 +452,8 @@ DhcpCleanConfigure (
|
||||
Allocate memory for configure parameter such as timeout value for Dst,
|
||||
then copy the configure parameter from Src to Dst.
|
||||
|
||||
@param Dst The destination DHCP configure data.
|
||||
@param Src The source DHCP configure data.
|
||||
@param[out] Dst The destination DHCP configure data.
|
||||
@param[in] Src The source DHCP configure data.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@retval EFI_SUCCESS The configure is copied.
|
||||
@@ -560,8 +550,6 @@ ON_ERROR:
|
||||
|
||||
@param DhcpSb The DHCP service instance.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpYieldControl (
|
||||
@@ -620,8 +608,8 @@ DhcpYieldControl (
|
||||
wants to make it possible for another instance to configure the EFI DHCPv4 Protocol
|
||||
driver, it must call this function with Dhcp4CfgData set to NULL.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or
|
||||
Dhcp4InitReboot state, if the original state of this driver
|
||||
@@ -761,14 +749,14 @@ ON_EXIT:
|
||||
by EFI_DHCP4_PROTOCOL.Configure() will be called and the user can take this
|
||||
opportunity to control the process.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param CompletionEvent If not NULL, indicates the event that will be signaled when the
|
||||
EFI DHCPv4 Protocol driver is transferred into the
|
||||
Dhcp4Bound state or when the DHCP process is aborted.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
|
||||
is transferred into the Dhcp4Bound state or the process fails.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] CompletionEvent If not NULL, indicates the event that will be signaled when the
|
||||
EFI DHCPv4 Protocol driver is transferred into the
|
||||
Dhcp4Bound state or when the DHCP process is aborted.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
|
||||
is transferred into the Dhcp4Bound state or the process fails.
|
||||
|
||||
@retval EFI_SUCCESS The DHCP configuration process has started, or it has completed
|
||||
when CompletionEvent is NULL.
|
||||
@@ -875,16 +863,16 @@ ON_ERROR:
|
||||
state and the previous configuration is restored. The outgoing and incoming packets
|
||||
can be captured by the EFI_DHCP4_CALLBACK function.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param RebindRequest If TRUE, this function broadcasts the request packets and enters
|
||||
the Dhcp4Rebinding state. Otherwise, it sends a unicast
|
||||
request packet and enters the Dhcp4Renewing state.
|
||||
@param CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
|
||||
completes or some error occurs.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
|
||||
until the DHCP process finishes.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] RebindRequest If TRUE, this function broadcasts the request packets and enters
|
||||
the Dhcp4Rebinding state. Otherwise, it sends a unicast
|
||||
request packet and enters the Dhcp4Renewing state.
|
||||
@param[in] CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
|
||||
completes or some error occurs.
|
||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||
check the completion status. If NULL,
|
||||
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
|
||||
until the DHCP process finishes.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the
|
||||
Dhcp4Renewing state or is back to the Dhcp4Bound state.
|
||||
@@ -998,7 +986,7 @@ ON_ERROR:
|
||||
After a successful call to this function, the EFI DHCPv4 Protocol driver returns
|
||||
to the Dhcp4Init state and any subsequent incoming packets will be discarded silently.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init phase.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@@ -1071,7 +1059,7 @@ ON_EXIT:
|
||||
before DHCP configuration process can be started again. This function can be
|
||||
called when the EFI DHCPv4 Protocol driver is in any state.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Stopped phase.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@@ -1121,19 +1109,19 @@ EfiDhcp4Stop (
|
||||
does not change any state of the EFI DHCPv4 Protocol driver and can be used at
|
||||
any time.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param SeedPacket Initial packet to be used as a base for building new packet.
|
||||
@param DeleteCount Number of opcodes in the DeleteList.
|
||||
@param DeleteList List of opcodes to be deleted from the seed packet.
|
||||
Ignored if DeleteCount is zero.
|
||||
@param AppendCount Number of entries in the OptionList.
|
||||
@param AppendList Pointer to a DHCP option list to be appended to SeedPacket.
|
||||
If SeedPacket also contains options in this list, they are
|
||||
replaced by new options (except pad option). Ignored if
|
||||
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
|
||||
@param NewPacket Pointer to storage for the pointer to the new allocated packet.
|
||||
Use the EFI Boot Service FreePool() on the resulting pointer
|
||||
when done with the packet.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] SeedPacket Initial packet to be used as a base for building new packet.
|
||||
@param[in] DeleteCount Number of opcodes in the DeleteList.
|
||||
@param[in] DeleteList List of opcodes to be deleted from the seed packet.
|
||||
Ignored if DeleteCount is zero.
|
||||
@param[in] AppendCount Number of entries in the OptionList.
|
||||
@param[in] AppendList Pointer to a DHCP option list to be appended to SeedPacket.
|
||||
If SeedPacket also contains options in this list, they are
|
||||
replaced by new options (except pad option). Ignored if
|
||||
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
|
||||
@param[out] NewPacket Pointer to storage for the pointer to the new allocated packet.
|
||||
Use the EFI Boot Service FreePool() on the resulting pointer
|
||||
when done with the packet.
|
||||
|
||||
@retval EFI_SUCCESS The new packet was built.
|
||||
@retval EFI_OUT_OF_RESOURCES Storage for the new packet could not be allocated.
|
||||
@@ -1185,8 +1173,8 @@ EfiDhcp4Build (
|
||||
/**
|
||||
Callback by UdpIoCreatePort() when creating UdpIo for this Dhcp4 instance.
|
||||
|
||||
@param UdpIo The UdpIo being created.
|
||||
@param Context Dhcp4 instance.
|
||||
@param[in] UdpIo The UdpIo being created.
|
||||
@param[in] Context Dhcp4 instance.
|
||||
|
||||
@retval EFI_SUCCESS UdpIo is configured successfully.
|
||||
@retval other Other error occurs.
|
||||
@@ -1260,8 +1248,7 @@ Dhcp4InstanceCreateUdpIo (
|
||||
Callback of Dhcp packet. Does nothing.
|
||||
|
||||
@param Arg The context.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpDummyExtFree (
|
||||
@@ -1281,8 +1268,6 @@ DhcpDummyExtFree (
|
||||
@param IoStatus Status of the input.
|
||||
@param Context Extra info for the input.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
PxeDhcpInput (
|
||||
@@ -1385,8 +1370,6 @@ RESTART:
|
||||
Complete a Dhcp4 transaction and signal the upper layer.
|
||||
|
||||
@param Instance Dhcp4 instance.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -1439,8 +1422,8 @@ SIGNAL_USER:
|
||||
wait for the response from servers. This function does not change the state of
|
||||
the EFI DHCPv4 Protocol driver and thus can be used at any time.
|
||||
|
||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
||||
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
||||
|
||||
@retval EFI_SUCCESS The packet was successfully queued for transmission.
|
||||
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
|
||||
@@ -1614,10 +1597,10 @@ ON_ERROR:
|
||||
EFI_DHCP4_PACKET_OPTION array in the DHCP_PARSE_CONTEXT to point
|
||||
the individual DHCP option in the packet.
|
||||
|
||||
@param Tag The DHCP option type
|
||||
@param Len Length of the DHCP option data
|
||||
@param Data The DHCP option data
|
||||
@param Context The context, to pass several parameters in.
|
||||
@param[in] Tag The DHCP option type
|
||||
@param[in] Len Length of the DHCP option data
|
||||
@param[in] Data The DHCP option data
|
||||
@param[in] Context The context, to pass several parameters in.
|
||||
|
||||
@retval EFI_SUCCESS It always returns EFI_SUCCESS
|
||||
|
||||
|
@@ -1,6 +1,12 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
EFI DHCP protocol implementation.
|
||||
RFCs supported are:
|
||||
RFC 2131: Dynamic Host Configuration Protocol
|
||||
RFC 2132: DHCP Options and BOOTP Vendor Extensions
|
||||
RFC 1534: Interoperation Between DHCP and BOOTP
|
||||
RFC 3396: Encoding Long Options in DHCP.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||
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
|
||||
@@ -9,20 +15,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name:
|
||||
|
||||
Dhcp4Impl.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI DHCP protocol implementation
|
||||
RFCs supported are:
|
||||
RFC 2131: Dynamic Host Configuration Protocol
|
||||
RFC 2132: DHCP Options and BOOTP Vendor Extensions
|
||||
RFC 1534: Interoperation Between DHCP and BOOTP
|
||||
RFC 3396: Encoding Long Options in DHCP
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_DHCP4_IMPL_H__
|
||||
@@ -160,8 +152,6 @@ extern EFI_DHCP4_PROTOCOL mDhcp4ProtocolTemplate;
|
||||
|
||||
@param DhcpSb The DHCP service instance.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpYieldControl (
|
||||
@@ -172,8 +162,6 @@ DhcpYieldControl (
|
||||
Complete a Dhcp4 transaction and signal the upper layer.
|
||||
|
||||
@param Instance Dhcp4 instance.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
EFI DHCP protocol implementation.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||
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
|
||||
@@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name:
|
||||
|
||||
Dhcp4Io.c
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI DHCP protocol implementation
|
||||
|
||||
|
||||
**/
|
||||
|
||||
|
||||
@@ -30,7 +22,7 @@ UINT32 mDhcp4DefaultTimeout[4] = { 4, 8, 16, 32 };
|
||||
Send an initial DISCOVER or REQUEST message according to the
|
||||
DHCP service's current state.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
|
||||
@retval EFI_SUCCESS The request has been sent
|
||||
@retval other Some error occurs when sending the request.
|
||||
@@ -73,10 +65,10 @@ DhcpInitRequest (
|
||||
proper return value is selected to let the caller continue the
|
||||
normal process.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param Event The event as defined in the spec
|
||||
@param Packet The current packet trigger the event
|
||||
@param NewPacket The user's return new packet
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
@param[in] Event The event as defined in the spec
|
||||
@param[in] Packet The current packet trigger the event
|
||||
@param[out] NewPacket The user's return new packet
|
||||
|
||||
@retval EFI_NOT_READY Direct the caller to continue collecting the offer.
|
||||
@retval EFI_SUCCESS The user function returns success.
|
||||
@@ -143,8 +135,6 @@ DhcpCallUser (
|
||||
@param DhcpSb DHCP service instance
|
||||
@param Which Which notify function to signal
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpNotifyUser (
|
||||
@@ -249,8 +239,6 @@ DhcpSetState (
|
||||
|
||||
@param DhcpSb The DHCP service instance.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpSetTransmitTimer (
|
||||
@@ -283,10 +271,7 @@ DhcpSetTransmitTimer (
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param Para The DHCP parameter extracted from the server's
|
||||
response.
|
||||
|
||||
@return None
|
||||
|
||||
response.
|
||||
**/
|
||||
VOID
|
||||
DhcpComputeLease (
|
||||
@@ -319,8 +304,8 @@ DhcpComputeLease (
|
||||
DHCP driver needs this port to unicast packet to the server
|
||||
such as DHCP release.
|
||||
|
||||
@param UdpIo The UDP IO port to configure
|
||||
@param Context Dhcp service instance.
|
||||
@param[in] UdpIo The UDP IO port to configure
|
||||
@param[in] Context Dhcp service instance.
|
||||
|
||||
@retval EFI_SUCCESS The UDP IO port is successfully configured.
|
||||
@retval Others It failed to configure the port.
|
||||
@@ -448,8 +433,6 @@ DhcpLeaseAcquired (
|
||||
|
||||
@param DhcpSb The DHCP instance service.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpCleanLease (
|
||||
@@ -503,7 +486,7 @@ DhcpCleanLease (
|
||||
of BOOTP, the lease is recorded and user notified. If the offer is of
|
||||
DHCP, it will request the offer from the server.
|
||||
|
||||
@param DhcpSb The DHCP service instance.
|
||||
@param[in] DhcpSb The DHCP service instance.
|
||||
|
||||
@retval EFI_SUCCESS One of the offer is selected.
|
||||
|
||||
@@ -583,10 +566,8 @@ DhcpChooseOffer (
|
||||
to this is: only call DhcpEndSession at the highest level, such as
|
||||
DhcpInput, DhcpOnTimerTick...At the other level, just return error.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param Status The result of the DHCP process.
|
||||
|
||||
@return None
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
@param[in] Status The result of the DHCP process.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -611,10 +592,10 @@ DhcpEndSession (
|
||||
/**
|
||||
Handle packets in DHCP select state.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param Packet The DHCP packet received
|
||||
@param Para The DHCP parameter extracted from the packet. That
|
||||
is, all the option value that we care.
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
@param[in] Packet The DHCP packet received
|
||||
@param[in] Para The DHCP parameter extracted from the packet. That
|
||||
is, all the option value that we care.
|
||||
|
||||
@retval EFI_SUCCESS The packet is successfully processed.
|
||||
@retval Others Some error occured.
|
||||
@@ -686,10 +667,10 @@ ON_EXIT:
|
||||
/**
|
||||
Handle packets in DHCP request state.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param Packet The DHCP packet received
|
||||
@param Para The DHCP parameter extracted from the packet. That
|
||||
is, all the option value that we care.
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
@param[in] Packet The DHCP packet received
|
||||
@param[in] Para The DHCP parameter extracted from the packet. That
|
||||
is, all the option value that we care.
|
||||
|
||||
@retval EFI_SUCCESS The packet is successfully processed.
|
||||
@retval Others Some error occured.
|
||||
@@ -779,10 +760,10 @@ ON_EXIT:
|
||||
/**
|
||||
Handle packets in DHCP renew/rebound state.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param Packet The DHCP packet received
|
||||
@param Para The DHCP parameter extracted from the packet. That
|
||||
is, all the option value that we care.
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
@param[in] Packet The DHCP packet received
|
||||
@param[in] Para The DHCP parameter extracted from the packet. That
|
||||
is, all the option value that we care.
|
||||
|
||||
@retval EFI_SUCCESS The packet is successfully processed.
|
||||
@retval Others Some error occured.
|
||||
@@ -863,10 +844,10 @@ ON_EXIT:
|
||||
/**
|
||||
Handle packets in DHCP reboot state.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param Packet The DHCP packet received
|
||||
@param Para The DHCP parameter extracted from the packet. That
|
||||
is, all the option value that we care.
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
@param[in] Packet The DHCP packet received
|
||||
@param[in] Para The DHCP parameter extracted from the packet. That
|
||||
is, all the option value that we care.
|
||||
|
||||
@retval EFI_SUCCESS The packet is successfully processed.
|
||||
@retval Others Some error occured.
|
||||
@@ -959,8 +940,6 @@ ON_EXIT:
|
||||
@param IoStatus The status of the UDP receive
|
||||
@param Context The opaque parameter to the function.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpInput (
|
||||
@@ -1111,9 +1090,7 @@ RESTART:
|
||||
/**
|
||||
Release the packet.
|
||||
|
||||
@param Arg The packet to release
|
||||
|
||||
@return None
|
||||
@param[in] Arg The packet to release
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -1133,8 +1110,6 @@ DhcpReleasePacket (
|
||||
@param IoStatus The status of the UDP receive
|
||||
@param Context The opaque parameter to the function.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpOnPacketSent (
|
||||
@@ -1155,12 +1130,12 @@ DhcpOnPacketSent (
|
||||
the state (as defined in Figure 5. of the same RFC) before sending
|
||||
a DHCP message. The table is adjusted accordingly.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param Seed The seed packet which the new packet is based on
|
||||
@param Para The DHCP parameter of the Seed packet
|
||||
@param Type The message type to send
|
||||
@param Msg The human readable message to include in the packet
|
||||
sent.
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
@param[in] Seed The seed packet which the new packet is based on
|
||||
@param[in] Para The DHCP parameter of the Seed packet
|
||||
@param[in] Type The message type to send
|
||||
@param[in] Msg The human readable message to include in the packet
|
||||
sent.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources for the packet
|
||||
@retval EFI_ACCESS_DENIED Failed to transmit the packet through UDP
|
||||
@@ -1417,7 +1392,7 @@ DhcpSendMessage (
|
||||
Retransmit a saved packet. Only DISCOVER and REQUEST messages
|
||||
will be retransmitted.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
|
||||
@retval EFI_ACCESS_DENIED Failed to transmit packet through UDP port
|
||||
@retval EFI_SUCCESS The packet is retransmitted.
|
||||
@@ -1477,10 +1452,8 @@ DhcpRetransmit (
|
||||
and lease to determine the time to renew and rebind the lease.
|
||||
DhcpOnTimerTick will be called once every second.
|
||||
|
||||
@param Event The timer event
|
||||
@param Context The context, which is the DHCP service instance.
|
||||
|
||||
@return None
|
||||
@param[in] Event The timer event
|
||||
@param[in] Context The context, which is the DHCP service instance.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
The DHCP4 protocol implementation.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||
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
|
||||
@@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
Dhcp4Io.h
|
||||
|
||||
Abstract:
|
||||
|
||||
The DHCP4 protocol implementation.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_DHCP4_IO_H__
|
||||
@@ -104,12 +95,12 @@ DhcpSetState (
|
||||
the state (as defined in Figure 5. of the same RFC) before sending
|
||||
a DHCP message. The table is adjusted accordingly.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param Seed The seed packet which the new packet is based on
|
||||
@param Para The DHCP parameter of the Seed packet
|
||||
@param Type The message type to send
|
||||
@param Msg The human readable message to include in the packet
|
||||
sent.
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
@param[in] Seed The seed packet which the new packet is based on
|
||||
@param[in] Para The DHCP parameter of the Seed packet
|
||||
@param[in] Type The message type to send
|
||||
@param[in] Msg The human readable message to include in the packet
|
||||
sent.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources for the packet
|
||||
@retval EFI_ACCESS_DENIED Failed to transmit the packet through UDP
|
||||
@@ -133,10 +124,8 @@ DhcpSendMessage (
|
||||
and lease to determine the time to renew and rebind the lease.
|
||||
DhcpOnTimerTick will be called once every second.
|
||||
|
||||
@param Event The timer event
|
||||
@param Context The context, which is the DHCP service instance.
|
||||
|
||||
@return None
|
||||
@param[in] Event The timer event
|
||||
@param[in] Context The context, which is the DHCP service instance.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -155,8 +144,6 @@ DhcpOnTimerTick (
|
||||
@param IoStatus The status of the UDP receive
|
||||
@param Context The opaque parameter to the function.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpInput (
|
||||
@@ -170,7 +157,7 @@ DhcpInput (
|
||||
Send an initial DISCOVER or REQUEST message according to the
|
||||
DHCP service's current state.
|
||||
|
||||
@param DhcpSb The DHCP service instance
|
||||
@param[in] DhcpSb The DHCP service instance
|
||||
|
||||
@retval EFI_SUCCESS The request has been sent
|
||||
@retval other Some error occurs when sending the request.
|
||||
@@ -186,8 +173,6 @@ DhcpInitRequest (
|
||||
|
||||
@param DhcpSb The DHCP instance service.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpCleanLease (
|
||||
@@ -202,8 +187,6 @@ DhcpCleanLease (
|
||||
@param IoStatus The status of the UDP receive
|
||||
@param Context The opaque parameter to the function.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
DhcpOnPacketSent (
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
Function to validate, parse, process the DHCP options.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||
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
|
||||
@@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name:
|
||||
|
||||
Dhcp4Option.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Function to validate, parse, process the DHCP options
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Dhcp4Impl.h"
|
||||
@@ -120,7 +112,7 @@ DHCP_OPTION_FORMAT DhcpOptionFormats[] = {
|
||||
Binary search the DhcpOptionFormats array to find the format
|
||||
information about a specific option.
|
||||
|
||||
@param Tag The option's tag.
|
||||
@param[in] Tag The option's tag.
|
||||
|
||||
@return The point to the option's format, NULL if not found.
|
||||
|
||||
@@ -158,9 +150,9 @@ DhcpFindOptionFormat (
|
||||
/**
|
||||
Validate whether a single DHCP option is valid according to its format.
|
||||
|
||||
@param Format The option's format
|
||||
@param OptValue The value of the option
|
||||
@param Len The length of the option value
|
||||
@param[in] Format The option's format
|
||||
@param[in] OptValue The value of the option
|
||||
@param[in] Len The length of the option value
|
||||
|
||||
@retval TRUE The option is valid.
|
||||
@retval FALSE Otherwise.
|
||||
@@ -238,10 +230,10 @@ DhcpOptionIsValid (
|
||||
Extract the client interested options, all the parameters are
|
||||
converted to host byte order.
|
||||
|
||||
@param Tag The DHCP option tag
|
||||
@param Len The length of the option
|
||||
@param Data The value of the DHCP option
|
||||
@param Para The variable to save the interested parameter
|
||||
@param[in] Tag The DHCP option tag
|
||||
@param[in] Len The length of the option
|
||||
@param[in] Data The value of the DHCP option
|
||||
@param[out] Para The variable to save the interested parameter
|
||||
|
||||
@retval EFI_SUCCESS The DHCP option is successfully extracted.
|
||||
@retval EFI_INVALID_PARAMETER The DHCP option is mal-formated
|
||||
@@ -309,12 +301,12 @@ DhcpGetParameter (
|
||||
in several buffers, such as the BOOTP options filed, boot file or server
|
||||
name. Each option buffer is required to end with DHCP_TAG_EOP.
|
||||
|
||||
@param Buffer The buffer which contains DHCP options
|
||||
@param BufLen The length of the buffer
|
||||
@param Check The callback function for each option found
|
||||
@param Context The opaque parameter for the Check
|
||||
@param Overload Variable to save the value of DHCP_TAG_OVERLOAD
|
||||
option.
|
||||
@param[in] Buffer The buffer which contains DHCP options
|
||||
@param[in] BufLen The length of the buffer
|
||||
@param[in] Check The callback function for each option found
|
||||
@param[in] Context The opaque parameter for the Check
|
||||
@param[out] Overload Variable to save the value of DHCP_TAG_OVERLOAD
|
||||
option.
|
||||
|
||||
@retval EFI_SUCCESS All the options are valid
|
||||
@retval EFI_INVALID_PARAMETER The options are mal-formated.
|
||||
@@ -324,7 +316,7 @@ EFI_STATUS
|
||||
DhcpIterateBufferOptions (
|
||||
IN UINT8 *Buffer,
|
||||
IN INTN BufLen,
|
||||
IN DHCP_CHECK_OPTION Check, OPTIONAL
|
||||
IN DHCP_CHECK_OPTION Check OPTIONAL,
|
||||
IN VOID *Context,
|
||||
OUT UINT8 *Overload OPTIONAL
|
||||
)
|
||||
@@ -385,10 +377,10 @@ DhcpIterateBufferOptions (
|
||||
the options in FILENAME and SERVERNAME fields. One option may be
|
||||
encoded in several places. See RFC 3396 Encoding Long Options in DHCP
|
||||
|
||||
@param Packet The DHCP packet to check the options for
|
||||
@param Check The callback function to be called for each option
|
||||
found
|
||||
@param Context The opaque parameter for Check
|
||||
@param[in] Packet The DHCP packet to check the options for
|
||||
@param[in] Check The callback function to be called for each option
|
||||
found
|
||||
@param[in] Context The opaque parameter for Check
|
||||
|
||||
@retval EFI_SUCCESS The DHCP packet's options are well formated
|
||||
@retval EFI_INVALID_PARAMETER The DHCP packet's options are not well formated
|
||||
@@ -455,11 +447,11 @@ DhcpIterateOptions (
|
||||
length. It just adds the data length of all the occurances of this
|
||||
Tag. Context is an array of 256 DHCP_OPTION_COUNT.
|
||||
|
||||
@param Tag The current option to check
|
||||
@param Len The length of the option data
|
||||
@param Data The option data
|
||||
@param Context The context, which is a array of 256
|
||||
DHCP_OPTION_COUNT.
|
||||
@param[in] Tag The current option to check
|
||||
@param[in] Len The length of the option data
|
||||
@param[in] Data The option data
|
||||
@param[in] Context The context, which is a array of 256
|
||||
DHCP_OPTION_COUNT.
|
||||
|
||||
@retval EFI_SUCCESS It always returns EFI_SUCCESS.
|
||||
|
||||
@@ -485,11 +477,11 @@ DhcpGetOptionLen (
|
||||
Call back function to DhcpIterateOptions to consolidate each option's
|
||||
data. There are maybe several occurrence of the same option.
|
||||
|
||||
@param Tag The option to consolidate its data
|
||||
@param Len The length of option data
|
||||
@param Data The data of the option's current occurance
|
||||
@param Context The context, which is DHCP_OPTION_CONTEXT. This
|
||||
array is just a wrap to pass THREE parameters.
|
||||
@param[in] Tag The option to consolidate its data
|
||||
@param[in] Len The length of option data
|
||||
@param[in] Data The data of the option's current occurance
|
||||
@param[in] Context The context, which is DHCP_OPTION_CONTEXT. This
|
||||
array is just a wrap to pass THREE parameters.
|
||||
|
||||
@retval EFI_SUCCESS It always returns EFI_SUCCESS
|
||||
|
||||
@@ -544,11 +536,11 @@ DhcpFillOption (
|
||||
with DhcpFillOption to fill each option's data to its position in the
|
||||
buffer.
|
||||
|
||||
@param Packet The DHCP packet to parse the options
|
||||
@param Count The number of valid dhcp options present in the
|
||||
packet
|
||||
@param OptionPoint The array that contains the DHCP options. Caller
|
||||
should free it.
|
||||
@param[in] Packet The DHCP packet to parse the options
|
||||
@param[out] Count The number of valid dhcp options present in the
|
||||
packet
|
||||
@param[out] OptionPoint The array that contains the DHCP options. Caller
|
||||
should free it.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to parse the packet.
|
||||
@retval EFI_INVALID_PARAMETER The options are mal-formated
|
||||
@@ -648,8 +640,8 @@ ON_EXIT:
|
||||
Validate the packet's options. If necessary, allocate
|
||||
and fill in the interested parameters.
|
||||
|
||||
@param Packet The packet to validate the options
|
||||
@param Para The variable to save the DHCP parameters.
|
||||
@param[in] Packet The packet to validate the options
|
||||
@param[out] Para The variable to save the DHCP parameters.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to validate the packet.
|
||||
@retval EFI_INVALID_PARAMETER The options are mal-formated
|
||||
@@ -735,10 +727,10 @@ ON_EXIT:
|
||||
Append an option to the memory, if the option is longer than
|
||||
255 bytes, splits it into several options.
|
||||
|
||||
@param Buf The buffer to append the option to
|
||||
@param Tag The option's tag
|
||||
@param DataLen The length of the option's data
|
||||
@param Data The option's data
|
||||
@param[out] Buf The buffer to append the option to
|
||||
@param[in] Tag The option's tag
|
||||
@param[in] DataLen The length of the option's data
|
||||
@param[in] Data The option's data
|
||||
|
||||
@return The position to append the next option
|
||||
|
||||
@@ -774,13 +766,13 @@ DhcpAppendOption (
|
||||
Build a new DHCP packet from a seed packet. Options may be deleted or
|
||||
appended. The caller should free the NewPacket when finished using it.
|
||||
|
||||
@param SeedPacket The seed packet to start with
|
||||
@param DeleteCount The number of options to delete
|
||||
@param DeleteList The options to delete from the packet
|
||||
@param AppendCount The number of options to append
|
||||
@param AppendList The options to append to the packet
|
||||
@param NewPacket The new packet, allocated and built by this
|
||||
function.
|
||||
@param[in] SeedPacket The seed packet to start with
|
||||
@param[in] DeleteCount The number of options to delete
|
||||
@param[in] DeleteList The options to delete from the packet
|
||||
@param[in] AppendCount The number of options to append
|
||||
@param[in] AppendList The options to append to the packet
|
||||
@param[out] NewPacket The new packet, allocated and built by this
|
||||
function.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory
|
||||
@retval EFI_INVALID_PARAMETER The options in SeekPacket are mal-formated
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
To validate, parse and process the DHCP options.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation.<BR>
|
||||
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
|
||||
@@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
Dhcp4Option.h
|
||||
|
||||
Abstract:
|
||||
|
||||
To validate, parse and process the DHCP options
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_DHCP4_OPTION_H__
|
||||
@@ -233,10 +224,10 @@ EFI_STATUS
|
||||
the options in FILENAME and SERVERNAME fields. One option may be
|
||||
encoded in several places. See RFC 3396 Encoding Long Options in DHCP
|
||||
|
||||
@param Packet The DHCP packet to check the options for
|
||||
@param Check The callback function to be called for each option
|
||||
found
|
||||
@param Context The opaque parameter for Check
|
||||
@param[in] Packet The DHCP packet to check the options for
|
||||
@param[in] Check The callback function to be called for each option
|
||||
found
|
||||
@param[in] Context The opaque parameter for Check
|
||||
|
||||
@retval EFI_SUCCESS The DHCP packet's options are well formated
|
||||
@retval EFI_INVALID_PARAMETER The DHCP packet's options are not well formated
|
||||
@@ -253,8 +244,8 @@ DhcpIterateOptions (
|
||||
Validate the packet's options. If necessary, allocate
|
||||
and fill in the interested parameters.
|
||||
|
||||
@param Packet The packet to validate the options
|
||||
@param Para The variable to save the DHCP parameters.
|
||||
@param[in] Packet The packet to validate the options
|
||||
@param[out] Para The variable to save the DHCP parameters.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to validate the packet.
|
||||
@retval EFI_INVALID_PARAMETER The options are mal-formated
|
||||
@@ -283,11 +274,11 @@ DhcpValidateOptions (
|
||||
with DhcpFillOption to fill each option's data to its position in the
|
||||
buffer.
|
||||
|
||||
@param Packet The DHCP packet to parse the options
|
||||
@param Count The number of valid dhcp options present in the
|
||||
packet
|
||||
@param OptionPoint The array that contains the DHCP options. Caller
|
||||
should free it.
|
||||
@param[in] Packet The DHCP packet to parse the options
|
||||
@param[out] Count The number of valid dhcp options present in the
|
||||
packet
|
||||
@param[out] OptionPoint The array that contains the DHCP options. Caller
|
||||
should free it.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to parse the packet.
|
||||
@retval EFI_INVALID_PARAMETER The options are mal-formated
|
||||
@@ -305,10 +296,10 @@ DhcpParseOption (
|
||||
Append an option to the memory, if the option is longer than
|
||||
255 bytes, splits it into several options.
|
||||
|
||||
@param Buf The buffer to append the option to
|
||||
@param Tag The option's tag
|
||||
@param DataLen The length of the option's data
|
||||
@param Data The option's data
|
||||
@param[out] Buf The buffer to append the option to
|
||||
@param[in] Tag The option's tag
|
||||
@param[in] DataLen The length of the option's data
|
||||
@param[in] Data The option's data
|
||||
|
||||
@return The position to append the next option
|
||||
|
||||
@@ -325,13 +316,13 @@ DhcpAppendOption (
|
||||
Build a new DHCP packet from a seed packet. Options may be deleted or
|
||||
appended. The caller should free the NewPacket when finished using it.
|
||||
|
||||
@param SeedPacket The seed packet to start with
|
||||
@param DeleteCount The number of options to delete
|
||||
@param DeleteList The options to delete from the packet
|
||||
@param AppendCount The number of options to append
|
||||
@param AppendList The options to append to the packet
|
||||
@param NewPacket The new packet, allocated and built by this
|
||||
function.
|
||||
@param[in] SeedPacket The seed packet to start with
|
||||
@param[in] DeleteCount The number of options to delete
|
||||
@param[in] DeleteList The options to delete from the packet
|
||||
@param[in] AppendCount The number of options to append
|
||||
@param[in] AppendList The options to append to the packet
|
||||
@param[out] NewPacket The new packet, allocated and built by this
|
||||
function.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory
|
||||
@retval EFI_INVALID_PARAMETER The options in SeekPacket are mal-formated
|
||||
|
Reference in New Issue
Block a user