mirror of https://github.com/acidanthera/audk.git
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:
parent
be973ff7f3
commit
3e8c18da04
|
@ -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
|
||||
|
|
|
@ -204,7 +204,7 @@ EFI_STATUS
|
|||
EFIAPI
|
||||
EfiNicIp4ConfigSetInfo (
|
||||
IN EFI_NIC_IP4_CONFIG_PROTOCOL *This,
|
||||
IN NIC_IP4_CONFIG_INFO *NicConfig, OPTIONAL
|
||||
IN NIC_IP4_CONFIG_INFO *NicConfig OPTIONAL,
|
||||
IN BOOLEAN Reconfig
|
||||
)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/** @file
|
||||
Routines used to operate the Ip4 configure variable
|
||||
Routines used to operate the Ip4 configure variable.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
|
@ -261,7 +261,7 @@ Ip4ConfigFindNicVariable (
|
|||
**/
|
||||
IP4_CONFIG_VARIABLE *
|
||||
Ip4ConfigModifyVariable (
|
||||
IN IP4_CONFIG_VARIABLE *Variable, OPTIONAL
|
||||
IN IP4_CONFIG_VARIABLE *Variable OPTIONAL,
|
||||
IN NIC_ADDR *NicAddr,
|
||||
IN NIC_IP4_CONFIG_INFO *Config OPTIONAL
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/** @file
|
||||
Routines used to operate the Ip4 configure variable
|
||||
Routines used to operate the Ip4 configure variable.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
|
@ -123,7 +123,7 @@ Ip4ConfigFindNicVariable (
|
|||
**/
|
||||
IP4_CONFIG_VARIABLE *
|
||||
Ip4ConfigModifyVariable (
|
||||
IN IP4_CONFIG_VARIABLE *Variable, OPTIONAL
|
||||
IN IP4_CONFIG_VARIABLE *Variable OPTIONAL,
|
||||
IN NIC_ADDR *NicAddr,
|
||||
IN NIC_IP4_CONFIG_INFO *Config OPTIONAL
|
||||
);
|
||||
|
|
|
@ -1,22 +1,14 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2007, Intel Corporation
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||
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:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -34,10 +26,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 +38,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 +77,15 @@ Ip4ComponentNameGetDriverName (
|
|||
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 +94,7 @@ Ip4ComponentNameGetDriverName (
|
|||
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 +103,7 @@ Ip4ComponentNameGetDriverName (
|
|||
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 +183,10 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIp4DriverNameTable[] = {
|
|||
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 +195,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIp4DriverNameTable[] = {
|
|||
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.
|
||||
|
@ -251,15 +243,15 @@ Ip4ComponentNameGetDriverName (
|
|||
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
|
||||
|
@ -268,7 +260,7 @@ Ip4ComponentNameGetDriverName (
|
|||
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
|
||||
|
@ -277,7 +269,7 @@ Ip4ComponentNameGetDriverName (
|
|||
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) 2005 - 2006, Intel Corporation
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Common.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -26,8 +18,8 @@ Abstract:
|
|||
Return the cast type (Unicast/Boradcast) specific to an
|
||||
interface. All the addresses are host byte ordered.
|
||||
|
||||
@param IpAddr The IP address to classify in host byte order
|
||||
@param IpIf The interface that IpAddr received from
|
||||
@param[in] IpAddr The IP address to classify in host byte order
|
||||
@param[in] IpIf The interface that IpAddr received from
|
||||
|
||||
@return The cast type of this IP address specific to the interface.
|
||||
@retval IP4_LOCAL_HOST The IpAddr equals to the interface's address
|
||||
|
@ -63,11 +55,11 @@ Ip4GetNetCast (
|
|||
This isn't the same as link layer cast type. For example, DHCP
|
||||
server may send local broadcast to the local unicast MAC.
|
||||
|
||||
@param IpSb The IP4 service binding instance that received the
|
||||
packet
|
||||
@param Dst The destination address in the packet (host byte
|
||||
order)
|
||||
@param Src The source address in the packet (host byte order)
|
||||
@param[in] IpSb The IP4 service binding instance that received the
|
||||
packet
|
||||
@param[in] Dst The destination address in the packet (host byte
|
||||
order)
|
||||
@param[in] Src The source address in the packet (host byte order)
|
||||
|
||||
@return The cast type for the Dst, it will return on the first non-promiscuous
|
||||
cast type to a configured interface. If the packet doesn't match any of
|
||||
|
@ -135,8 +127,8 @@ Ip4GetHostCast (
|
|||
/**
|
||||
Find an interface whose configured IP address is Ip.
|
||||
|
||||
@param IpSb The IP4 service binding instance
|
||||
@param Ip The Ip address (host byte order) to find
|
||||
@param[in] IpSb The IP4 service binding instance
|
||||
@param[in] Ip The Ip address (host byte order) to find
|
||||
|
||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
||||
|
||||
|
@ -165,8 +157,8 @@ Ip4FindInterface (
|
|||
/**
|
||||
Find an interface that Ip is on that connected network.
|
||||
|
||||
@param IpSb The IP4 service binding instance
|
||||
@param Ip The Ip address (host byte order) to find
|
||||
@param[in] IpSb The IP4 service binding instance
|
||||
@param[in] Ip The Ip address (host byte order) to find
|
||||
|
||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
||||
|
||||
|
@ -195,9 +187,9 @@ Ip4FindNet (
|
|||
/**
|
||||
Find an interface of the service with the same Ip/Netmask pair.
|
||||
|
||||
@param IpSb Ip4 service binding instance
|
||||
@param Ip The Ip adress to find (host byte order)
|
||||
@param Netmask The network to find (host byte order)
|
||||
@param[in] IpSb Ip4 service binding instance
|
||||
@param[in] Ip The Ip adress to find (host byte order)
|
||||
@param[in] Netmask The network to find (host byte order)
|
||||
|
||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
||||
|
||||
|
@ -229,9 +221,9 @@ Ip4FindStationAddress (
|
|||
Mnp's McastIpToMac to find the MAC address in stead of
|
||||
hard code the NIC to be Ethernet.
|
||||
|
||||
@param Mnp The Mnp instance to get the MAC address.
|
||||
@param Multicast The multicast IP address to translate.
|
||||
@param Mac The buffer to hold the translated address.
|
||||
@param[in] Mnp The Mnp instance to get the MAC address.
|
||||
@param[in] Multicast The multicast IP address to translate.
|
||||
@param[out] Mac The buffer to hold the translated address.
|
||||
|
||||
@retval EFI_SUCCESS if the multicast IP is successfully translated to a
|
||||
multicast MAC address.
|
||||
|
@ -257,7 +249,7 @@ Ip4GetMulticastMac (
|
|||
In spite of its name, it can also be used to convert from
|
||||
host to network byte order.
|
||||
|
||||
@param Head The IP head to convert
|
||||
@param[in] Head The IP head to convert
|
||||
|
||||
@return Point to the converted IP head
|
||||
|
||||
|
@ -283,7 +275,7 @@ Ip4NtohHead (
|
|||
Save the list of all of the IPv4 addresses and subnet masks that are currently
|
||||
being used to volatile variable storage.
|
||||
|
||||
@param IpSb Ip4 service binding instance
|
||||
@param[in] IpSb Ip4 service binding instance
|
||||
|
||||
@retval EFI_SUCCESS Successfully set variable.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources to set the variable.
|
||||
|
@ -402,9 +394,7 @@ ON_ERROR:
|
|||
/**
|
||||
Clear the variable and free the resource.
|
||||
|
||||
@param IpSb Ip4 service binding instance
|
||||
|
||||
@return None.
|
||||
@param[in] IpSb Ip4 service binding instance
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
Common definition for IP4.
|
||||
|
||||
Copyright (c) 2005 - 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:
|
||||
|
||||
Ip4Common.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Common definition for IP4.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_COMMON_H__
|
||||
|
@ -90,8 +81,8 @@ typedef enum {
|
|||
Return the cast type (Unicast/Boradcast) specific to an
|
||||
interface. All the addresses are host byte ordered.
|
||||
|
||||
@param IpAddr The IP address to classify in host byte order
|
||||
@param IpIf The interface that IpAddr received from
|
||||
@param[in] IpAddr The IP address to classify in host byte order
|
||||
@param[in] IpIf The interface that IpAddr received from
|
||||
|
||||
@return The cast type of this IP address specific to the interface.
|
||||
@retval IP4_LOCAL_HOST The IpAddr equals to the interface's address
|
||||
|
@ -112,11 +103,11 @@ Ip4GetNetCast (
|
|||
This isn't the same as link layer cast type. For example, DHCP
|
||||
server may send local broadcast to the local unicast MAC.
|
||||
|
||||
@param IpSb The IP4 service binding instance that received the
|
||||
packet
|
||||
@param Dst The destination address in the packet (host byte
|
||||
order)
|
||||
@param Src The source address in the packet (host byte order)
|
||||
@param[in] IpSb The IP4 service binding instance that received the
|
||||
packet
|
||||
@param[in] Dst The destination address in the packet (host byte
|
||||
order)
|
||||
@param[in] Src The source address in the packet (host byte order)
|
||||
|
||||
@return The cast type for the Dst, it will return on the first non-promiscuous
|
||||
cast type to a configured interface. If the packet doesn't match any of
|
||||
|
@ -133,8 +124,8 @@ Ip4GetHostCast (
|
|||
/**
|
||||
Find an interface whose configured IP address is Ip.
|
||||
|
||||
@param IpSb The IP4 service binding instance
|
||||
@param Ip The Ip address (host byte order) to find
|
||||
@param[in] IpSb The IP4 service binding instance
|
||||
@param[in] Ip The Ip address (host byte order) to find
|
||||
|
||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
||||
|
||||
|
@ -148,8 +139,8 @@ Ip4FindInterface (
|
|||
/**
|
||||
Find an interface that Ip is on that connected network.
|
||||
|
||||
@param IpSb The IP4 service binding instance
|
||||
@param Ip The Ip address (host byte order) to find
|
||||
@param[in] IpSb The IP4 service binding instance
|
||||
@param[in] Ip The Ip address (host byte order) to find
|
||||
|
||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
||||
|
||||
|
@ -163,9 +154,9 @@ Ip4FindNet (
|
|||
/**
|
||||
Find an interface of the service with the same Ip/Netmask pair.
|
||||
|
||||
@param IpSb Ip4 service binding instance
|
||||
@param Ip The Ip adress to find (host byte order)
|
||||
@param Netmask The network to find (host byte order)
|
||||
@param[in] IpSb Ip4 service binding instance
|
||||
@param[in] Ip The Ip adress to find (host byte order)
|
||||
@param[in] Netmask The network to find (host byte order)
|
||||
|
||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
||||
|
||||
|
@ -182,9 +173,9 @@ Ip4FindStationAddress (
|
|||
Mnp's McastIpToMac to find the MAC address in stead of
|
||||
hard code the NIC to be Ethernet.
|
||||
|
||||
@param Mnp The Mnp instance to get the MAC address.
|
||||
@param Multicast The multicast IP address to translate.
|
||||
@param Mac The buffer to hold the translated address.
|
||||
@param[in] Mnp The Mnp instance to get the MAC address.
|
||||
@param[in] Multicast The multicast IP address to translate.
|
||||
@param[out] Mac The buffer to hold the translated address.
|
||||
|
||||
@retval EFI_SUCCESS if the multicast IP is successfully translated to a
|
||||
multicast MAC address.
|
||||
|
@ -203,7 +194,7 @@ Ip4GetMulticastMac (
|
|||
In spite of its name, it can also be used to convert from
|
||||
host to network byte order.
|
||||
|
||||
@param Head The IP head to convert
|
||||
@param[in] Head The IP head to convert
|
||||
|
||||
@return Point to the converted IP head
|
||||
|
||||
|
@ -219,7 +210,7 @@ Ip4NtohHead (
|
|||
Save the list of all of the IPv4 addresses and subnet masks that are currently
|
||||
being used to volatile variable storage.
|
||||
|
||||
@param IpSb Ip4 service binding instance
|
||||
@param[in] IpSb Ip4 service binding instance
|
||||
|
||||
@retval EFI_SUCCESS Successfully set variable.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources to set the variable.
|
||||
|
@ -234,9 +225,7 @@ Ip4SetVariableData (
|
|||
/**
|
||||
Clear the variable and free the resource.
|
||||
|
||||
@param IpSb Ip4 service binding instance
|
||||
|
||||
@return None.
|
||||
@param[in] IpSb Ip4 service binding instance
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
The driver binding and service binding protocol for IP4 driver.
|
||||
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Driver.c
|
||||
|
||||
Abstract:
|
||||
|
||||
The driver binding and service binding protocol for IP4 driver.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -39,8 +31,8 @@ EFI_DRIVER_BINDING_PROTOCOL gIp4DriverBinding = {
|
|||
The entry point for IP4 driver which install the driver
|
||||
binding and component name protocol on its image.
|
||||
|
||||
@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.
|
||||
|
@ -71,10 +63,10 @@ Ip4DriverEntryPoint (
|
|||
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
|
||||
|
@ -129,7 +121,7 @@ Ip4DriverBindingSupported (
|
|||
destroyed, it is marked as that in case the destory failed and
|
||||
being called again later.
|
||||
|
||||
@param IpSb The IP4 serviceing binding instance to clean up
|
||||
@param[in] IpSb The IP4 serviceing binding instance to clean up
|
||||
|
||||
@retval EFI_SUCCESS The resource used by the instance are cleaned up
|
||||
@retval other Failed to clean up some of the resources.
|
||||
|
@ -144,11 +136,11 @@ Ip4CleanService (
|
|||
/**
|
||||
Create a new IP4 driver service binding private instance.
|
||||
|
||||
@param Controller The controller that has MNP service binding
|
||||
installed
|
||||
@param ImageHandle The IP4 driver's image handle
|
||||
@param Service The variable to receive the newly created IP4
|
||||
service.
|
||||
@param Controller The controller that has MNP service binding
|
||||
installed
|
||||
@param ImageHandle The IP4 driver's image handle
|
||||
@param Service The variable to receive the newly created IP4
|
||||
service.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate some resource
|
||||
@retval EFI_SUCCESS A new IP4 service binding private is created.
|
||||
|
@ -318,7 +310,7 @@ ON_ERROR:
|
|||
destroyed, it is marked as that in case the destory failed and
|
||||
being called again later.
|
||||
|
||||
@param IpSb The IP4 serviceing binding instance to clean up
|
||||
@param[in] IpSb The IP4 serviceing binding instance to clean up
|
||||
|
||||
@retval EFI_SUCCESS The resource used by the instance are cleaned up
|
||||
@retval other Failed to clean up some of the resources.
|
||||
|
@ -405,10 +397,10 @@ Ip4CleanService (
|
|||
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
|
||||
|
@ -509,14 +501,14 @@ FREE_SERVICE:
|
|||
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
|
||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||
@retval other This driver was not removed from this device
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@ -743,14 +735,18 @@ ON_ERROR:
|
|||
|
||||
|
||||
/**
|
||||
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
|
||||
|
@ -845,17 +841,20 @@ ON_ERROR:
|
|||
|
||||
|
||||
/**
|
||||
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,6 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2007, Intel Corporation
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Driver.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_DRIVER_H__
|
||||
|
@ -39,8 +31,8 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gIp4ComponentName2;
|
|||
The entry point for IP4 driver which install the driver
|
||||
binding and component name protocol on its image.
|
||||
|
||||
@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.
|
||||
|
@ -64,10 +56,10 @@ Ip4DriverEntryPoint (
|
|||
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
|
||||
|
@ -90,10 +82,10 @@ Ip4DriverBindingSupported (
|
|||
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
|
||||
|
@ -116,14 +108,14 @@ Ip4DriverBindingStart (
|
|||
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
|
||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||
@retval other This driver was not removed from this device
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@ -139,14 +131,18 @@ Ip4DriverBindingStop (
|
|||
// Function ptototypes for the ServiceBinding Prococol
|
||||
//
|
||||
/**
|
||||
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
|
||||
|
@ -161,17 +157,20 @@ Ip4ServiceBindingCreateChild (
|
|||
);
|
||||
|
||||
/**
|
||||
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,6 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Icmp.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -88,12 +80,12 @@ mIp4SupportedIcmp[23] = {
|
|||
message SHOULD be treated identically to a Host Redirect
|
||||
message;"
|
||||
|
||||
@param IpSb The IP4 service binding instance that received the
|
||||
packet
|
||||
@param Head The IP head of the received ICMPpacket.
|
||||
@param Packet The content of the ICMP redirect packet with IP
|
||||
@param[in] IpSb The IP4 service binding instance that received
|
||||
the packet.
|
||||
@param[in] Head The IP head of the received ICMPpacket.
|
||||
@param[in] Packet The content of the ICMP redirect packet with IP
|
||||
head removed.
|
||||
@param Icmp The buffer to store the ICMP error message if
|
||||
@param[in] Icmp The buffer to store the ICMP error message if
|
||||
something is wrong.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER The parameter is invalid
|
||||
|
@ -166,9 +158,9 @@ Ip4ProcessIcmpRedirect (
|
|||
update call Ip4ProcessIcmpRedirect to update the IP instance's
|
||||
route cache, otherwise, deliver the packet to upper layer.
|
||||
|
||||
@param IpSb The IP service that received the packet.
|
||||
@param Head The IP head of the ICMP error packet
|
||||
@param Packet The content of the ICMP error with IP head
|
||||
@param[in] IpSb The IP service that received the packet.
|
||||
@param[in] Head The IP head of the ICMP error packet
|
||||
@param[in] Packet The content of the ICMP error with IP head
|
||||
removed.
|
||||
|
||||
@retval EFI_SUCCESS The ICMP error is processed successfully.
|
||||
|
@ -208,9 +200,9 @@ Ip4ProcessIcmpError (
|
|||
/**
|
||||
Replay an ICMP echo request.
|
||||
|
||||
@param IpSb The IP service that receivd the packet
|
||||
@param Head The IP head of the ICMP error packet
|
||||
@param Packet The content of the ICMP error with IP head
|
||||
@param[in] IpSb The IP service that receivd the packet
|
||||
@param[in] Head The IP head of the ICMP error packet
|
||||
@param[in] Packet The content of the ICMP error with IP head
|
||||
removed.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource.
|
||||
|
@ -285,9 +277,9 @@ ON_EXIT:
|
|||
Process the ICMP query message. If it is an ICMP echo
|
||||
request, answer it. Otherwise deliver it to upper layer.
|
||||
|
||||
@param IpSb The IP service that receivd the packet
|
||||
@param Head The IP head of the ICMP query packet
|
||||
@param Packet The content of the ICMP query with IP head
|
||||
@param[in] IpSb The IP service that receivd the packet
|
||||
@param[in] Head The IP head of the ICMP query packet
|
||||
@param[in] Packet The content of the ICMP query with IP head
|
||||
removed.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER The packet is invalid
|
||||
|
@ -324,9 +316,9 @@ Ip4ProcessIcmpQuery (
|
|||
then according to the message types, process it as query or
|
||||
error packet.
|
||||
|
||||
@param IpSb The IP service that receivd the packet
|
||||
@param Head The IP head of the ICMP query packet
|
||||
@param Packet The content of the ICMP query with IP head
|
||||
@param[in] IpSb The IP service that receivd the packet
|
||||
@param[in] Head The IP head of the ICMP query packet
|
||||
@param[in] Packet The content of the ICMP query with IP head
|
||||
removed.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER The packet is malformated.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
Header file for ICMP protocol.
|
||||
|
||||
Copyright (c) 2005 - 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:
|
||||
|
||||
Ip4Icmp.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Header file for ICMP protocol.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_ICMP_H__
|
||||
|
@ -95,9 +86,9 @@ extern EFI_IP4_ICMP_TYPE mIp4SupportedIcmp[];
|
|||
then according to the message types, process it as query or
|
||||
error packet.
|
||||
|
||||
@param IpSb The IP service that receivd the packet
|
||||
@param Head The IP head of the ICMP query packet
|
||||
@param Packet The content of the ICMP query with IP head
|
||||
@param[in] IpSb The IP service that receivd the packet
|
||||
@param[in] Head The IP head of the ICMP query packet
|
||||
@param[in] Packet The content of the ICMP query with IP head
|
||||
removed.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER The packet is malformated.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2007, Intel Corporation
|
||||
Implement IP4 pesudo interface.
|
||||
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4If.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Implement IP4 pesudo interface.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -33,9 +24,7 @@ EFI_MAC_ADDRESS mZeroMacAddress;
|
|||
Callback funtion when frame transmission is finished. It will
|
||||
call the frame owner's callback function to tell it the result.
|
||||
|
||||
@param Context Context which is point to the token.
|
||||
|
||||
@return None.
|
||||
@param[in] Context Context which is point to the token.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -47,10 +36,8 @@ Ip4OnFrameSentDpc (
|
|||
/**
|
||||
Request Ip4OnFrameSentDpc as a DPC at TPL_CALLBACK.
|
||||
|
||||
@param Event The transmit token's event.
|
||||
@param Context Context which is point to the token.
|
||||
|
||||
@return None
|
||||
@param[in] Event The transmit token's event.
|
||||
@param[in] Context Context which is point to the token.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -65,11 +52,9 @@ Ip4OnFrameSent (
|
|||
all the queued frame if the ARP requests failed. Or transmit them
|
||||
if the request succeed.
|
||||
|
||||
@param Context The context of the callback, a point to the ARP
|
||||
@param[in] Context The context of the callback, a point to the ARP
|
||||
queue
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -80,12 +65,10 @@ Ip4OnArpResolvedDpc (
|
|||
/**
|
||||
Request Ip4OnArpResolvedDpc as a DPC at TPL_CALLBACK.
|
||||
|
||||
@param Event The Arp request event.
|
||||
@param Context The context of the callback, a point to the ARP
|
||||
queue.
|
||||
|
||||
@return None
|
||||
|
||||
@param Event The Arp request event.
|
||||
@param Context The context of the callback, a point to the ARP
|
||||
queue.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -104,8 +87,6 @@ Ip4OnArpResolved (
|
|||
|
||||
@param Context Context for the callback.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -114,13 +95,10 @@ Ip4OnFrameReceivedDpc (
|
|||
);
|
||||
|
||||
/**
|
||||
|
||||
Request Ip4OnFrameReceivedDpc as a DPC at TPL_CALLBACK.
|
||||
|
||||
@param Event The receive event delivered to MNP for receive.
|
||||
@param Context Context for the callback.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -134,13 +112,11 @@ Ip4OnFrameReceived (
|
|||
Remove all the frames on the ARP queue that pass the FrameToCancel,
|
||||
that is, either FrameToCancel is NULL or it returns true for the frame.
|
||||
|
||||
@param ArpQue ARP frame to remove the frames from.
|
||||
@param IoStatus The status returned to the cancelled frames'
|
||||
@param[in] ArpQue ARP frame to remove the frames from.
|
||||
@param[in] IoStatus The status returned to the cancelled frames'
|
||||
callback function.
|
||||
@param FrameToCancel Function to select which frame to cancel.
|
||||
@param Context Opaque parameter to the FrameToCancel.
|
||||
|
||||
@return NONE
|
||||
@param[in] FrameToCancel Function to select which frame to cancel.
|
||||
@param[in] Context Opaque parameter to the FrameToCancel.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -155,15 +131,16 @@ Ip4CancelFrameArp (
|
|||
/**
|
||||
Wrap a transmit request into a newly allocated IP4_LINK_TX_TOKEN.
|
||||
|
||||
@param Interface The interface to send out to.
|
||||
@param IpInstance The IpInstance that transmit the packet. NULL if
|
||||
@param[in] Interface The interface to send out to.
|
||||
@param[in] IpInstance The IpInstance that transmit the packet. NULL if
|
||||
the packet is sent by the IP4 driver itself.
|
||||
@param Packet The packet to transmit
|
||||
@param CallBack Call back function to execute if transmission
|
||||
@param[in] Packet The packet to transmit
|
||||
@param[in] CallBack Call back function to execute if transmission
|
||||
finished.
|
||||
@param Context Opaque parameter to the call back.
|
||||
@param[in] Context Opaque parameter to the call back.
|
||||
|
||||
@return The wrapped token if succeed or NULL
|
||||
@retval Token The wrapped token if succeed
|
||||
@retval NULL The wrapped token if NULL
|
||||
|
||||
**/
|
||||
IP4_LINK_TX_TOKEN *
|
||||
|
@ -237,9 +214,7 @@ Ip4WrapLinkTxToken (
|
|||
Free the link layer transmit token. It will close the event
|
||||
then free the memory used.
|
||||
|
||||
@param Token Token to free
|
||||
|
||||
@return NONE
|
||||
@param[in] Token Token to free
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -257,8 +232,8 @@ Ip4FreeLinkTxToken (
|
|||
/**
|
||||
Create an IP_ARP_QUE structure to request ARP service.
|
||||
|
||||
@param Interface The interface to send ARP from.
|
||||
@param DestIp The destination IP (host byte order) to request MAC
|
||||
@param[in] Interface The interface to send ARP from.
|
||||
@param[in] DestIp The destination IP (host byte order) to request MAC
|
||||
for
|
||||
|
||||
@return Point to newly created IP4_ARP_QUE if succeed, otherwise NULL.
|
||||
|
@ -308,12 +283,10 @@ Ip4CreateArpQue (
|
|||
/**
|
||||
Remove all the transmit requests queued on the ARP queue, then free it.
|
||||
|
||||
@param ArpQue Arp queue to free
|
||||
@param IoStatus The transmit status returned to transmit requests'
|
||||
@param[in] ArpQue Arp queue to free
|
||||
@param[in] IoStatus The transmit status returned to transmit requests'
|
||||
callback.
|
||||
|
||||
@return NONE
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4FreeArpQue (
|
||||
|
@ -336,11 +309,11 @@ Ip4FreeArpQue (
|
|||
/**
|
||||
Create a link layer receive token to wrap the receive request
|
||||
|
||||
@param Interface The interface to receive from
|
||||
@param IpInstance The instance that request the receive (NULL for IP4
|
||||
@param[in] Interface The interface to receive from
|
||||
@param[in] IpInstance The instance that request the receive (NULL for IP4
|
||||
driver itself)
|
||||
@param CallBack Call back function to execute when finished.
|
||||
@param Context Opaque parameters to the callback
|
||||
@param[in] CallBack Call back function to execute when finished.
|
||||
@param[in] Context Opaque parameters to the callback
|
||||
|
||||
@return Point to created IP4_LINK_RX_TOKEN if succeed, otherwise NULL.
|
||||
|
||||
|
@ -393,9 +366,7 @@ Ip4CreateLinkRxToken (
|
|||
Free the link layer request token. It will close the event
|
||||
then free the memory used.
|
||||
|
||||
@param Token Request token to free
|
||||
|
||||
@return NONE
|
||||
@param[in] Token Request token to free.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -415,13 +386,11 @@ Ip4FreeFrameRxToken (
|
|||
Remove all the frames on the ARP queue that pass the FrameToCancel,
|
||||
that is, either FrameToCancel is NULL or it returns true for the frame.
|
||||
|
||||
@param ArpQue ARP frame to remove the frames from.
|
||||
@param IoStatus The status returned to the cancelled frames'
|
||||
@param[in] ArpQue ARP frame to remove the frames from.
|
||||
@param[in] IoStatus The status returned to the cancelled frames'
|
||||
callback function.
|
||||
@param FrameToCancel Function to select which frame to cancel.
|
||||
@param Context Opaque parameter to the FrameToCancel.
|
||||
|
||||
@return NONE
|
||||
@param[in] FrameToCancel Function to select which frame to cancel.
|
||||
@param[in] Context Opaque parameter to the FrameToCancel.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -454,14 +423,12 @@ Ip4CancelFrameArp (
|
|||
either queued on ARP queues or that have already been delivered to
|
||||
MNP and not yet recycled.
|
||||
|
||||
@param Interface Interface to remove the frames from
|
||||
@param IoStatus The transmit status returned to the frames'
|
||||
@param[in] Interface Interface to remove the frames from
|
||||
@param[in] IoStatus The transmit status returned to the frames'
|
||||
callback
|
||||
@param FrameToCancel Function to select the frame to cancel, NULL to
|
||||
@param[in] FrameToCancel Function to select the frame to cancel, NULL to
|
||||
select all
|
||||
@param Context Opaque parameters passed to FrameToCancel
|
||||
|
||||
@return NONE
|
||||
@param[in] Context Opaque parameters passed to FrameToCancel
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -508,11 +475,11 @@ Ip4CancelFrames (
|
|||
Create an IP4_INTERFACE. Delay the creation of ARP instance until
|
||||
the interface is configured.
|
||||
|
||||
@param Mnp The shared MNP child of this IP4 service binding
|
||||
@param[in] Mnp The shared MNP child of this IP4 service binding
|
||||
instance
|
||||
@param Controller The controller this IP4 service binding instance
|
||||
@param[in] Controller The controller this IP4 service binding instance
|
||||
is installed. Most like the UNDI handle.
|
||||
@param ImageHandle This driver's image handle
|
||||
@param[in] ImageHandle This driver's image handle
|
||||
|
||||
@return Point to the created IP4_INTERFACE, otherwise NULL.
|
||||
|
||||
|
@ -575,9 +542,9 @@ Ip4CreateInterface (
|
|||
Set the interface's address, create and configure
|
||||
the ARP child if necessary.
|
||||
|
||||
@param Interface The interface to set the address
|
||||
@param IpAddr The interface's IP address
|
||||
@param SubnetMask The interface's netmask
|
||||
@param Interface The interface to set the address
|
||||
@param IpAddr The interface's IP address
|
||||
@param SubnetMask The interface's netmask
|
||||
|
||||
@retval EFI_SUCCESS The interface is configured with Ip/netmask pair,
|
||||
and a ARP is created for it.
|
||||
|
@ -690,8 +657,8 @@ ON_ERROR:
|
|||
/**
|
||||
Filter function to cancel all the frame related to an IP instance.
|
||||
|
||||
@param Frame The transmit request to test whether to cancel
|
||||
@param Context The context which is the Ip instance that issued
|
||||
@param[in] Frame The transmit request to test whether to cancel
|
||||
@param[in] Context The context which is the Ip instance that issued
|
||||
the transmit.
|
||||
|
||||
@retval TRUE The frame belongs to this instance and is to be
|
||||
|
@ -723,9 +690,7 @@ Ip4CancelInstanceFrame (
|
|||
packet and update the upper layer's transmit request status, say
|
||||
that from the UDP.
|
||||
|
||||
@param Interface The interface used by the IpInstance
|
||||
|
||||
@return None
|
||||
@param[in] Interface The interface used by the IpInstance
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -754,8 +719,8 @@ Ip4CancelReceive (
|
|||
Because the IpInstance is optional, the caller must remove
|
||||
IpInstance from the interface's instance list itself.
|
||||
|
||||
@param Interface The interface used by the IpInstance
|
||||
@param IpInstance The Ip instance that free the interface. NULL if
|
||||
@param[in] Interface The interface used by the IpInstance
|
||||
@param[in] IpInstance The Ip instance that free the interface. NULL if
|
||||
the Ip driver is releasing the default interface.
|
||||
|
||||
@retval EFI_SUCCESS The interface use IpInstance is freed.
|
||||
|
@ -820,11 +785,9 @@ Ip4FreeInterface (
|
|||
all the queued frame if the ARP requests failed. Or transmit them
|
||||
if the request succeed.
|
||||
|
||||
@param Context The context of the callback, a point to the ARP
|
||||
@param[in] Context The context of the callback, a point to the ARP
|
||||
queue
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -893,12 +856,10 @@ Ip4OnArpResolvedDpc (
|
|||
/**
|
||||
Request Ip4OnArpResolvedDpc as a DPC at TPL_CALLBACK.
|
||||
|
||||
@param Event The Arp request event.
|
||||
@param Context The context of the callback, a point to the ARP
|
||||
queue.
|
||||
|
||||
@return None
|
||||
|
||||
@param Event The Arp request event.
|
||||
@param Context The context of the callback, a point to the ARP
|
||||
queue.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -919,9 +880,7 @@ Ip4OnArpResolved (
|
|||
Callback funtion when frame transmission is finished. It will
|
||||
call the frame owner's callback function to tell it the result.
|
||||
|
||||
@param Context Context which is point to the token.
|
||||
|
||||
@return None.
|
||||
@param[in] Context Context which is point to the token.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -951,10 +910,8 @@ Ip4OnFrameSentDpc (
|
|||
/**
|
||||
Request Ip4OnFrameSentDpc as a DPC at TPL_CALLBACK.
|
||||
|
||||
@param Event The transmit token's event.
|
||||
@param Context Context which is point to the token.
|
||||
|
||||
@return None
|
||||
@param[in] Event The transmit token's event.
|
||||
@param[in] Context Context which is point to the token.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -979,14 +936,14 @@ Ip4OnFrameSent (
|
|||
If some error happened, the CallBack won't be called. So, the caller
|
||||
must test the return value, and take action when there is an error.
|
||||
|
||||
@param Interface The interface to send the frame from
|
||||
@param IpInstance The IP child that request the transmission. NULL
|
||||
@param[in] Interface The interface to send the frame from
|
||||
@param[in] IpInstance The IP child that request the transmission. NULL
|
||||
if it is the IP4 driver itself.
|
||||
@param Packet The packet to transmit.
|
||||
@param NextHop The immediate destination to transmit the packet
|
||||
@param[in] Packet The packet to transmit.
|
||||
@param[in] NextHop The immediate destination to transmit the packet
|
||||
to.
|
||||
@param CallBack Function to call back when transmit finished.
|
||||
@param Context Opaque parameter to the call back.
|
||||
@param[in] CallBack Function to call back when transmit finished.
|
||||
@param[in] Context Opaque parameter to the call back.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to send the frame
|
||||
@retval EFI_NO_MAPPING Can't resolve the MAC for the nexthop
|
||||
|
@ -1127,9 +1084,7 @@ ON_ERROR:
|
|||
Call back function when the received packet is freed.
|
||||
Check Ip4OnFrameReceived for information.
|
||||
|
||||
@param Context Context, which is the IP4_LINK_RX_TOKEN.
|
||||
|
||||
@return None.
|
||||
@param Context Context, which is the IP4_LINK_RX_TOKEN.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1157,8 +1112,6 @@ Ip4RecycleFrame (
|
|||
|
||||
@param Context Context for the callback.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -1218,13 +1171,10 @@ Ip4OnFrameReceivedDpc (
|
|||
}
|
||||
|
||||
/**
|
||||
|
||||
Request Ip4OnFrameReceivedDpc as a DPC at TPL_CALLBACK.
|
||||
|
||||
@param Event The receive event delivered to MNP for receive.
|
||||
@param Context Context for the callback.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1244,11 +1194,11 @@ Ip4OnFrameReceived (
|
|||
/**
|
||||
Request to receive the packet from the interface.
|
||||
|
||||
@param Interface The interface to receive the frames from
|
||||
@param IpInstance The instance that requests the receive. NULL for
|
||||
@param[in] Interface The interface to receive the frames from
|
||||
@param[in] IpInstance The instance that requests the receive. NULL for
|
||||
the driver itself.
|
||||
@param CallBack Function to call when receive finished.
|
||||
@param Context Opaque parameter to the callback
|
||||
@param[in] CallBack Function to call when receive finished.
|
||||
@param[in] Context Opaque parameter to the callback
|
||||
|
||||
@retval EFI_ALREADY_STARTED There is already a pending receive request.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to receive
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
Definition for IP4 pesudo interface structure.
|
||||
|
||||
Copyright (c) 2005 - 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:
|
||||
|
||||
Ip4If.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Definition for IP4 pesudo interface structure.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_IF_H__
|
||||
|
@ -40,24 +31,24 @@ typedef enum {
|
|||
When transmitting, the Netbuf is from IP4, and provided
|
||||
to the callback as a reference. Flag isn't used.
|
||||
|
||||
@param IpInstance The instance that sent or received the packet.
|
||||
IpInstance can be NULL which means that it is the IP4 driver
|
||||
itself sending the packets. IP4 driver may send packets that
|
||||
don't belong to any instance, such as ICMP errors, ICMP echo
|
||||
responses, or IGMP packets. IpInstance is used as a tag in
|
||||
this module.
|
||||
@param Packet The sent or received packet.
|
||||
@param IoStatus Status of sending or receiving.
|
||||
@param LinkFlag Indicate if the frame is received as link broadcast/multicast.
|
||||
When transmitting, it is not used.
|
||||
@param Context Additional data for callback.
|
||||
@param[in] IpInstance The instance that sent or received the packet.
|
||||
IpInstance can be NULL which means that it is the IP4 driver
|
||||
itself sending the packets. IP4 driver may send packets that
|
||||
don't belong to any instance, such as ICMP errors, ICMP echo
|
||||
responses, or IGMP packets. IpInstance is used as a tag in
|
||||
this module.
|
||||
@param[in] Packet The sent or received packet.
|
||||
@param[in] IoStatus Status of sending or receiving.
|
||||
@param[in] LinkFlag Indicate if the frame is received as link broadcast/multicast.
|
||||
When transmitting, it is not used.
|
||||
@param[in] Context Additional data for callback.
|
||||
|
||||
@return None.
|
||||
@retval None.
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(*IP4_FRAME_CALLBACK)(
|
||||
IN IP4_PROTOCOL *IpInstance, OPTIONAL
|
||||
IN IP4_PROTOCOL *IpInstance OPTIONAL,
|
||||
IN NET_BUF *Packet,
|
||||
IN EFI_STATUS IoStatus,
|
||||
IN UINT32 LinkFlag,
|
||||
|
@ -202,11 +193,11 @@ struct _IP4_INTERFACE {
|
|||
Create an IP4_INTERFACE. Delay the creation of ARP instance until
|
||||
the interface is configured.
|
||||
|
||||
@param Mnp The shared MNP child of this IP4 service binding
|
||||
@param[in] Mnp The shared MNP child of this IP4 service binding
|
||||
instance
|
||||
@param Controller The controller this IP4 service binding instance
|
||||
@param[in] Controller The controller this IP4 service binding instance
|
||||
is installed. Most like the UNDI handle.
|
||||
@param ImageHandle This driver's image handle
|
||||
@param[in] ImageHandle This driver's image handle
|
||||
|
||||
@return Point to the created IP4_INTERFACE, otherwise NULL.
|
||||
|
||||
|
@ -222,9 +213,9 @@ Ip4CreateInterface (
|
|||
Set the interface's address, create and configure
|
||||
the ARP child if necessary.
|
||||
|
||||
@param Interface The interface to set the address
|
||||
@param IpAddr The interface's IP address
|
||||
@param SubnetMask The interface's netmask
|
||||
@param Interface The interface to set the address
|
||||
@param IpAddr The interface's IP address
|
||||
@param SubnetMask The interface's netmask
|
||||
|
||||
@retval EFI_SUCCESS The interface is configured with Ip/netmask pair,
|
||||
and a ARP is created for it.
|
||||
|
@ -245,8 +236,8 @@ Ip4SetAddress (
|
|||
Because the IpInstance is optional, the caller must remove
|
||||
IpInstance from the interface's instance list itself.
|
||||
|
||||
@param Interface The interface used by the IpInstance
|
||||
@param IpInstance The Ip instance that free the interface. NULL if
|
||||
@param[in] Interface The interface used by the IpInstance
|
||||
@param[in] IpInstance The Ip instance that free the interface. NULL if
|
||||
the Ip driver is releasing the default interface.
|
||||
|
||||
@retval EFI_SUCCESS The interface use IpInstance is freed.
|
||||
|
@ -265,14 +256,14 @@ Ip4FreeInterface (
|
|||
If some error happened, the CallBack won't be called. So, the caller
|
||||
must test the return value, and take action when there is an error.
|
||||
|
||||
@param Interface The interface to send the frame from
|
||||
@param IpInstance The IP child that request the transmission. NULL
|
||||
@param[in] Interface The interface to send the frame from
|
||||
@param[in] IpInstance The IP child that request the transmission. NULL
|
||||
if it is the IP4 driver itself.
|
||||
@param Packet The packet to transmit.
|
||||
@param NextHop The immediate destination to transmit the packet
|
||||
@param[in] Packet The packet to transmit.
|
||||
@param[in] NextHop The immediate destination to transmit the packet
|
||||
to.
|
||||
@param CallBack Function to call back when transmit finished.
|
||||
@param Context Opaque parameter to the call back.
|
||||
@param[in] CallBack Function to call back when transmit finished.
|
||||
@param[in] Context Opaque parameter to the call back.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to send the frame
|
||||
@retval EFI_NO_MAPPING Can't resolve the MAC for the nexthop
|
||||
|
@ -295,14 +286,12 @@ Ip4SendFrame (
|
|||
either queued on ARP queues or that have already been delivered to
|
||||
MNP and not yet recycled.
|
||||
|
||||
@param Interface Interface to remove the frames from
|
||||
@param IoStatus The transmit status returned to the frames'
|
||||
@param[in] Interface Interface to remove the frames from
|
||||
@param[in] IoStatus The transmit status returned to the frames'
|
||||
callback
|
||||
@param FrameToCancel Function to select the frame to cancel, NULL to
|
||||
@param[in] FrameToCancel Function to select the frame to cancel, NULL to
|
||||
select all
|
||||
@param Context Opaque parameters passed to FrameToCancel
|
||||
|
||||
@return NONE
|
||||
@param[in] Context Opaque parameters passed to FrameToCancel
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -322,9 +311,7 @@ Ip4CancelFrames (
|
|||
packet and update the upper layer's transmit request status, say
|
||||
that from the UDP.
|
||||
|
||||
@param Interface The interface used by the IpInstance
|
||||
|
||||
@return None
|
||||
@param[in] Interface The interface used by the IpInstance
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -335,11 +322,11 @@ Ip4CancelReceive (
|
|||
/**
|
||||
Request to receive the packet from the interface.
|
||||
|
||||
@param Interface The interface to receive the frames from
|
||||
@param IpInstance The instance that requests the receive. NULL for
|
||||
@param[in] Interface The interface to receive the frames from
|
||||
@param[in] IpInstance The instance that requests the receive. NULL for
|
||||
the driver itself.
|
||||
@param CallBack Function to call when receive finished.
|
||||
@param Context Opaque parameter to the callback
|
||||
@param[in] CallBack Function to call when receive finished.
|
||||
@param[in] Context Opaque parameter to the callback
|
||||
|
||||
@retval EFI_ALREADY_STARTED There is already a pending receive request.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to receive
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
This file implements the RFC2236: IGMP v2.
|
||||
|
||||
Copyright (c) 2005 - 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:
|
||||
|
||||
Ip4Igmp.c
|
||||
|
||||
Abstract:
|
||||
|
||||
This file implements the RFC2236: IGMP v2
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -34,7 +25,7 @@ UINT32 mRouteAlertOption = 0x00000494;
|
|||
Init the IGMP control data of the IP4 service instance, configure
|
||||
MNP to receive ALL SYSTEM multicast.
|
||||
|
||||
@param IpSb The IP4 service whose IGMP is to be initialized.
|
||||
@param[in, out] IpSb The IP4 service whose IGMP is to be initialized.
|
||||
|
||||
@retval EFI_SUCCESS IGMP of the IpSb is successfully initialized.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to initialize IGMP.
|
||||
|
@ -94,8 +85,8 @@ ON_ERROR:
|
|||
Find the IGMP_GROUP structure which contains the status of multicast
|
||||
group Address in this IGMP control block
|
||||
|
||||
@param IgmpCtrl The IGMP control block to search from
|
||||
@param Address The multicast address to search
|
||||
@param[in] IgmpCtrl The IGMP control block to search from
|
||||
@param[in] Address The multicast address to search
|
||||
|
||||
@return NULL if the multicast address isn't in the IGMP control block. Otherwise
|
||||
the point to the IGMP_GROUP which contains the status of multicast group
|
||||
|
@ -128,8 +119,8 @@ Ip4FindGroup (
|
|||
same MAC address. Several IP4 multicast address may be mapped to
|
||||
the same MAC address.
|
||||
|
||||
@param IgmpCtrl The IGMP control block to search in
|
||||
@param Mac The MAC address to search
|
||||
@param[in] IgmpCtrl The IGMP control block to search in
|
||||
@param[in] Mac The MAC address to search
|
||||
|
||||
@return The number of the IP4 multicast group that mapped to the same
|
||||
multicast group Mac.
|
||||
|
@ -162,12 +153,12 @@ Ip4FindMac (
|
|||
/**
|
||||
Send an IGMP protocol message to the Dst, such as IGMP v1 membership report.
|
||||
|
||||
@param IpSb The IP4 service instance that requests the
|
||||
@param[in] IpSb The IP4 service instance that requests the
|
||||
transmission
|
||||
@param Dst The destinaton to send to
|
||||
@param Type The IGMP message type, such as IGMP v1 membership
|
||||
@param[in] Dst The destinaton to send to
|
||||
@param[in] Type The IGMP message type, such as IGMP v1 membership
|
||||
report
|
||||
@param Group The group address in the IGMP message head.
|
||||
@param[in] Group The group address in the IGMP message head.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to build the message
|
||||
@retval EFI_SUCCESS The IGMP message is successfully send
|
||||
|
@ -233,9 +224,9 @@ Ip4SendIgmpMessage (
|
|||
Send an IGMP membership report. Depends on whether the server is
|
||||
v1 or v2, it will send either a V1 or V2 membership report.
|
||||
|
||||
@param IpSb The IP4 service instance that requests the
|
||||
@param[in] IpSb The IP4 service instance that requests the
|
||||
transmission.
|
||||
@param Group The group address to report
|
||||
@param[in] Group The group address to report
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to build the message
|
||||
@retval EFI_SUCCESS The IGMP report message is successfully send
|
||||
|
@ -259,8 +250,8 @@ Ip4SendIgmpReport (
|
|||
/**
|
||||
Join the multicast group on behalf of this IP4 child
|
||||
|
||||
@param IpInstance The IP4 child that wants to join the group
|
||||
@param Address The group to join
|
||||
@param[in] IpInstance The IP4 child that wants to join the group
|
||||
@param[in] Address The group to join
|
||||
|
||||
@retval EFI_SUCCESS Successfully join the multicast group
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources
|
||||
|
@ -339,9 +330,9 @@ ON_ERROR:
|
|||
/**
|
||||
Leave the IP4 multicast group on behalf of IpInstance.
|
||||
|
||||
@param IpInstance The IP4 child that wants to leave the group
|
||||
@param[in] IpInstance The IP4 child that wants to leave the group
|
||||
address
|
||||
@param Address The group address to leave
|
||||
@param[in] Address The group address to leave
|
||||
|
||||
@retval EFI_NOT_FOUND The IP4 service instance isn't in the group
|
||||
@retval EFI_SUCCESS Successfully leave the multicast group.
|
||||
|
@ -409,9 +400,9 @@ Ip4LeaveGroup (
|
|||
/**
|
||||
Handle the received IGMP message for the IP4 service instance.
|
||||
|
||||
@param IpSb The IP4 service instance that received the message
|
||||
@param Head The IP4 header of the received message
|
||||
@param Packet The IGMP message, without IP4 header
|
||||
@param[in] IpSb The IP4 service instance that received the message
|
||||
@param[in] Head The IP4 header of the received message
|
||||
@param[in] Packet The IGMP message, without IP4 header
|
||||
|
||||
@retval EFI_INVALID_PARAMETER The IGMP message is malformated.
|
||||
@retval EFI_SUCCESS The IGMP message is successfully processed.
|
||||
|
@ -515,9 +506,7 @@ Ip4IgmpHandle (
|
|||
2. Decrease the report timer for each IGMP group in "delaying
|
||||
member" state.
|
||||
|
||||
@param IpSb The IP4 service instance that is ticking
|
||||
|
||||
@return None
|
||||
@param[in] IpSb The IP4 service instance that is ticking
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -561,9 +550,9 @@ Ip4IgmpTicking (
|
|||
assume the byte order of the both Source and Addr, the
|
||||
network byte order is used by the caller.
|
||||
|
||||
@param Source The array of group addresses to add to
|
||||
@param Count The number of group addresses in the Source
|
||||
@param Addr The IP4 multicast address to add
|
||||
@param[in] Source The array of group addresses to add to
|
||||
@param[in] Count The number of group addresses in the Source
|
||||
@param[in] Addr The IP4 multicast address to add
|
||||
|
||||
@return NULL if failed to allocate memory for the new groups,
|
||||
otherwise the new combined group addresses.
|
||||
|
@ -597,9 +586,9 @@ Ip4CombineGroups (
|
|||
both Groups and Addr, the network byte order is used by
|
||||
the caller.
|
||||
|
||||
@param Groups The array of group addresses to remove from
|
||||
@param Count The number of group addresses in the Groups
|
||||
@param Addr The IP4 multicast address to remove
|
||||
@param Groups The array of group addresses to remove from
|
||||
@param Count The number of group addresses in the Groups
|
||||
@param Addr The IP4 multicast address to remove
|
||||
|
||||
@return The nubmer of group addresses in the Groups after remove.
|
||||
It is Count if the Addr isn't in the Groups.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Igmp.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_IGMP_H__
|
||||
|
@ -73,7 +65,7 @@ typedef enum {
|
|||
Init the IGMP control data of the IP4 service instance, configure
|
||||
MNP to receive ALL SYSTEM multicast.
|
||||
|
||||
@param IpSb The IP4 service whose IGMP is to be initialized.
|
||||
@param[in, out] IpSb The IP4 service whose IGMP is to be initialized.
|
||||
|
||||
@retval EFI_SUCCESS IGMP of the IpSb is successfully initialized.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to initialize IGMP.
|
||||
|
@ -88,8 +80,8 @@ Ip4InitIgmp (
|
|||
/**
|
||||
Join the multicast group on behalf of this IP4 child
|
||||
|
||||
@param IpInstance The IP4 child that wants to join the group
|
||||
@param Address The group to join
|
||||
@param[in] IpInstance The IP4 child that wants to join the group
|
||||
@param[in] Address The group to join
|
||||
|
||||
@retval EFI_SUCCESS Successfully join the multicast group
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources
|
||||
|
@ -105,9 +97,9 @@ Ip4JoinGroup (
|
|||
/**
|
||||
Leave the IP4 multicast group on behalf of IpInstance.
|
||||
|
||||
@param IpInstance The IP4 child that wants to leave the group
|
||||
@param[in] IpInstance The IP4 child that wants to leave the group
|
||||
address
|
||||
@param Address The group address to leave
|
||||
@param[in] Address The group address to leave
|
||||
|
||||
@retval EFI_NOT_FOUND The IP4 service instance isn't in the group
|
||||
@retval EFI_SUCCESS Successfully leave the multicast group.
|
||||
|
@ -123,9 +115,9 @@ Ip4LeaveGroup (
|
|||
/**
|
||||
Handle the received IGMP message for the IP4 service instance.
|
||||
|
||||
@param IpSb The IP4 service instance that received the message
|
||||
@param Head The IP4 header of the received message
|
||||
@param Packet The IGMP message, without IP4 header
|
||||
@param[in] IpSb The IP4 service instance that received the message
|
||||
@param[in] Head The IP4 header of the received message
|
||||
@param[in] Packet The IGMP message, without IP4 header
|
||||
|
||||
@retval EFI_INVALID_PARAMETER The IGMP message is malformated.
|
||||
@retval EFI_SUCCESS The IGMP message is successfully processed.
|
||||
|
@ -146,9 +138,7 @@ Ip4IgmpHandle (
|
|||
2. Decrease the report timer for each IGMP group in "delaying
|
||||
member" state.
|
||||
|
||||
@param IpSb The IP4 service instance that is ticking
|
||||
|
||||
@return None
|
||||
@param[in] IpSb The IP4 service instance that is ticking
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -163,9 +153,9 @@ Ip4IgmpTicking (
|
|||
assume the byte order of the both Source and Addr, the
|
||||
network byte order is used by the caller.
|
||||
|
||||
@param Source The array of group addresses to add to
|
||||
@param Count The number of group addresses in the Source
|
||||
@param Addr The IP4 multicast address to add
|
||||
@param[in] Source The array of group addresses to add to
|
||||
@param[in] Count The number of group addresses in the Source
|
||||
@param[in] Addr The IP4 multicast address to add
|
||||
|
||||
@return NULL if failed to allocate memory for the new groups,
|
||||
otherwise the new combined group addresses.
|
||||
|
@ -184,9 +174,9 @@ Ip4CombineGroups (
|
|||
both Groups and Addr, the network byte order is used by
|
||||
the caller.
|
||||
|
||||
@param Groups The array of group addresses to remove from
|
||||
@param Count The number of group addresses in the Groups
|
||||
@param Addr The IP4 multicast address to remove
|
||||
@param Groups The array of group addresses to remove from
|
||||
@param Count The number of group addresses in the Groups
|
||||
@param Addr The IP4 multicast address to remove
|
||||
|
||||
@return The nubmer of group addresses in the Groups after remove.
|
||||
It is Count if the Addr isn't in the Groups.
|
||||
|
@ -203,8 +193,8 @@ Ip4RemoveGroupAddr (
|
|||
Find the IGMP_GROUP structure which contains the status of multicast
|
||||
group Address in this IGMP control block
|
||||
|
||||
@param IgmpCtrl The IGMP control block to search from
|
||||
@param Address The multicast address to search
|
||||
@param[in] IgmpCtrl The IGMP control block to search from
|
||||
@param[in] Address The multicast address to search
|
||||
|
||||
@return NULL if the multicast address isn't in the IGMP control block. Otherwise
|
||||
the point to the IGMP_GROUP which contains the status of multicast group
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2007, Intel Corporation
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Impl.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -29,10 +21,10 @@ Abstract:
|
|||
function is used optionally to retrieve the operational mode data of underlying
|
||||
networks or drivers.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
|
||||
@param MnpConfigData Pointer to the managed network configuration data structure.
|
||||
@param SnpModeData Pointer to the simple network mode data structure.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[out] Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
|
||||
@param[out] MnpConfigData Pointer to the managed network configuration data structure.
|
||||
@param[out] SnpModeData Pointer to the simple network mode data structure.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
|
@ -71,8 +63,8 @@ EfiIp4GetModeData (
|
|||
requests will be cancelled. Their completion token status will be set to EFI_ABORTED
|
||||
and their events will be signaled.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
|
||||
|
||||
@retval EFI_SUCCESS The driver instance was successfully opened.
|
||||
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
|
||||
|
@ -107,9 +99,9 @@ EfiIp4Configure (
|
|||
|
||||
If JoinFlag is FALSE and GroupAddress is NULL, all joined groups will be left.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
|
||||
@param GroupAddress Pointer to the IPv4 multicast address.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
|
||||
@param[in] GroupAddress Pointer to the IPv4 multicast address.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following is TRUE:
|
||||
|
@ -160,13 +152,13 @@ EfiIp4Groups (
|
|||
copies will be updated whenever the EIF IPv4 Protocol driver reconfigures its
|
||||
instances. As a result, client modification to the routing table will be lost.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param DeleteRoute Set to TRUE to delete this route from the routing table. Set to
|
||||
FALSE to add this route to the routing table. SubnetAddress
|
||||
and SubnetMask are used as the key to each route entry.
|
||||
@param SubnetAddress The address of the subnet that needs to be routed.
|
||||
@param SubnetMask The subnet mask of SubnetAddress.
|
||||
@param GatewayAddress The unicast gateway IPv4 address for this route.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] DeleteRoute Set to TRUE to delete this route from the routing table. Set to
|
||||
FALSE to add this route to the routing table. SubnetAddress
|
||||
and SubnetMask are used as the key to each route entry.
|
||||
@param[in] SubnetAddress The address of the subnet that needs to be routed.
|
||||
@param[in] SubnetMask The subnet mask of SubnetAddress.
|
||||
@param[in] GatewayAddress The unicast gateway IPv4 address for this route.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_NOT_STARTED The driver instance has not been started.
|
||||
|
@ -203,8 +195,8 @@ EfiIp4Routes (
|
|||
EFI IPv4 Protocol instance. Whenever the packet in the token is sent out or some
|
||||
errors occur, the event in the token will be signaled and the status is updated.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param Token Pointer to the transmit token.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to the transmit token.
|
||||
|
||||
@retval EFI_SUCCESS The data has been queued for transmission.
|
||||
@retval EFI_NOT_STARTED This instance has not been started.
|
||||
|
@ -243,8 +235,8 @@ EfiIp4Transmit (
|
|||
driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event
|
||||
is signaled.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param Token Pointer to a token that is associated with the receive data descriptor.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that is associated with the receive data descriptor.
|
||||
|
||||
@retval EFI_SUCCESS The receive completion token was cached.
|
||||
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
|
||||
|
@ -281,12 +273,12 @@ EfiIp4Receive (
|
|||
asynchronous operation has completed, this function will not signal the token
|
||||
and EFI_NOT_FOUND is returned.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param Token Pointer to a token that has been issued by
|
||||
EFI_IP4_PROTOCOL.Transmit() or
|
||||
EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
|
||||
tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
|
||||
defined in EFI_IP4_PROTOCOL.Transmit().
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that has been issued by
|
||||
EFI_IP4_PROTOCOL.Transmit() or
|
||||
EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
|
||||
tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
|
||||
defined in EFI_IP4_PROTOCOL.Transmit().
|
||||
|
||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
||||
Token.->Event was signaled. When Token is NULL, all
|
||||
|
@ -321,7 +313,7 @@ EfiIp4Cancel (
|
|||
experiencing packet loss should try calling the EFI_IP4_PROTOCOL.Poll() function
|
||||
more often.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Incoming or outgoing data was processed.
|
||||
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
|
||||
|
@ -360,10 +352,10 @@ mEfiIp4ProtocolTemplete = {
|
|||
function is used optionally to retrieve the operational mode data of underlying
|
||||
networks or drivers.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
|
||||
@param MnpConfigData Pointer to the managed network configuration data structure.
|
||||
@param SnpModeData Pointer to the simple network mode data structure.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[out] Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
|
||||
@param[out] MnpConfigData Pointer to the managed network configuration data structure.
|
||||
@param[out] SnpModeData Pointer to the simple network mode data structure.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
|
@ -468,8 +460,8 @@ EfiIp4GetModeData (
|
|||
reconfigure the MNP. If Force is TRUE, the MNP is configured no
|
||||
matter whether that is changed or not.
|
||||
|
||||
@param IpSb The IP4 service instance that is to be changed.
|
||||
@param Force Force the configuration or not.
|
||||
@param[in] IpSb The IP4 service instance that is to be changed.
|
||||
@param[in] Force Force the configuration or not.
|
||||
|
||||
@retval EFI_SUCCESS The MNP is successfully configured/reconfigured.
|
||||
@retval Others Configuration failed.
|
||||
|
@ -547,9 +539,7 @@ Ip4ServiceConfigMnp (
|
|||
it will configure the default interface and default route table
|
||||
with the configuration information retrieved by IP4_CONFIGURE.
|
||||
|
||||
@param Context The IP4 service binding instance.
|
||||
|
||||
@return None
|
||||
@param[in] Context The IP4 service binding instance.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -692,13 +682,10 @@ ON_EXIT:
|
|||
}
|
||||
|
||||
/**
|
||||
|
||||
Request Ip4AutoConfigCallBackDpc as a DPC at TPL_CALLBACK.
|
||||
|
||||
@param Event The event that is signalled.
|
||||
@param Context The IP4 service binding instance.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -725,7 +712,7 @@ Ip4AutoConfigCallBack (
|
|||
It will locates the EFI_IP4_CONFIG_PROTOCOL, then start the
|
||||
auto configuration.
|
||||
|
||||
@param IpSb The IP4 service instance to configure
|
||||
@param[in] IpSb The IP4 service instance to configure
|
||||
|
||||
@retval EFI_SUCCESS The auto configuration is successfull started
|
||||
@retval Others Failed to start auto configuration.
|
||||
|
@ -822,8 +809,6 @@ CLOSE_DONE_EVENT:
|
|||
@param IpSb The IP4 service instance.
|
||||
@param IpInstance The IP4 child instance.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4InitProtocol (
|
||||
|
@ -857,8 +842,8 @@ Ip4InitProtocol (
|
|||
for the first time. The caller should validate the configuration
|
||||
before deliver them to it. It also don't do configure NULL.
|
||||
|
||||
@param IpInstance The IP4 child to configure.
|
||||
@param Config The configure data.
|
||||
@param[in, out] IpInstance The IP4 child to configure.
|
||||
@param[in] Config The configure data.
|
||||
|
||||
@retval EFI_SUCCESS The IP4 child is successfully configured.
|
||||
@retval EFI_DEVICE_ERROR Failed to free the pending transive or to
|
||||
|
@ -1012,7 +997,7 @@ ON_ERROR:
|
|||
/**
|
||||
Clean up the IP4 child, release all the resources used by it.
|
||||
|
||||
@param IpInstance The IP4 child to clean up.
|
||||
@param[in] IpInstance The IP4 child to clean up.
|
||||
|
||||
@retval EFI_SUCCESS The IP4 child is cleaned up
|
||||
@retval EFI_DEVICE_ERROR Some resources failed to be released
|
||||
|
@ -1080,8 +1065,8 @@ Ip4CleanProtocol (
|
|||
address. Only continuous netmasks are supported. and check
|
||||
that StationAddress is a unicast address on the newtwork.
|
||||
|
||||
@param Ip The IP address to validate
|
||||
@param Netmask The netmaks of the IP
|
||||
@param[in] Ip The IP address to validate
|
||||
@param[in] Netmask The netmaks of the IP
|
||||
|
||||
@retval TRUE The Ip/Netmask pair is valid
|
||||
@retval FALSE The Ip/Netmask pair is invalid
|
||||
|
@ -1158,8 +1143,8 @@ Ip4StationAddressValid (
|
|||
requests will be cancelled. Their completion token status will be set to EFI_ABORTED
|
||||
and their events will be signaled.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
|
||||
|
||||
@retval EFI_SUCCESS The driver instance was successfully opened.
|
||||
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
|
||||
|
@ -1301,9 +1286,9 @@ ON_EXIT:
|
|||
Change the IP4 child's multicast setting. The caller
|
||||
should make sure that the parameters is valid.
|
||||
|
||||
@param IpInstance The IP4 child to change the setting.
|
||||
@param JoinFlag TRUE to join the group, otherwise leave it
|
||||
@param GroupAddress The target group address
|
||||
@param[in] IpInstance The IP4 child to change the setting.
|
||||
@param[in] JoinFlag TRUE to join the group, otherwise leave it
|
||||
@param[in] GroupAddress The target group address
|
||||
|
||||
@retval EFI_ALREADY_STARTED Want to join the group, but already a member of it
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate some resources.
|
||||
|
@ -1400,9 +1385,9 @@ Ip4Groups (
|
|||
|
||||
If JoinFlag is FALSE and GroupAddress is NULL, all joined groups will be left.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
|
||||
@param GroupAddress Pointer to the IPv4 multicast address.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
|
||||
@param[in] GroupAddress Pointer to the IPv4 multicast address.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following is TRUE:
|
||||
|
@ -1491,13 +1476,13 @@ ON_EXIT:
|
|||
copies will be updated whenever the EIF IPv4 Protocol driver reconfigures its
|
||||
instances. As a result, client modification to the routing table will be lost.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param DeleteRoute Set to TRUE to delete this route from the routing table. Set to
|
||||
FALSE to add this route to the routing table. SubnetAddress
|
||||
and SubnetMask are used as the key to each route entry.
|
||||
@param SubnetAddress The address of the subnet that needs to be routed.
|
||||
@param SubnetMask The subnet mask of SubnetAddress.
|
||||
@param GatewayAddress The unicast gateway IPv4 address for this route.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] DeleteRoute Set to TRUE to delete this route from the routing table. Set to
|
||||
FALSE to add this route to the routing table. SubnetAddress
|
||||
and SubnetMask are used as the key to each route entry.
|
||||
@param[in] SubnetAddress The address of the subnet that needs to be routed.
|
||||
@param[in] SubnetMask The subnet mask of SubnetAddress.
|
||||
@param[in] GatewayAddress The unicast gateway IPv4 address for this route.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_NOT_STARTED The driver instance has not been started.
|
||||
|
@ -1598,10 +1583,10 @@ ON_EXIT:
|
|||
Check whether the user's token or event has already
|
||||
been enqueued on IP4's list.
|
||||
|
||||
@param Map The container of either user's transmit or receive
|
||||
token.
|
||||
@param Item Current item to check against
|
||||
@param Context The Token to check againist.
|
||||
@param[in] Map The container of either user's transmit or receive
|
||||
token.
|
||||
@param[in] Item Current item to check against
|
||||
@param[in] Context The Token to check againist.
|
||||
|
||||
@retval EFI_ACCESS_DENIED The token or event has already been enqueued in IP
|
||||
@retval EFI_SUCCESS The current item isn't the same token/event as the
|
||||
|
@ -1632,8 +1617,8 @@ Ip4TokenExist (
|
|||
/**
|
||||
Validate the user's token against current station address.
|
||||
|
||||
@param Token User's token to validate
|
||||
@param IpIf The IP4 child's interface.
|
||||
@param[in] Token User's token to validate
|
||||
@param[in] IpIf The IP4 child's interface.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Some parameters are invalid
|
||||
@retval EFI_BAD_BUFFER_SIZE The user's option/data is too long.
|
||||
|
@ -1762,9 +1747,7 @@ Ip4TxTokenValid (
|
|||
are bound together. Check the comments in Ip4Output for information
|
||||
about IP fragmentation.
|
||||
|
||||
@param Context The token's wrap
|
||||
|
||||
@return None
|
||||
@param[in] Context The token's wrap
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1809,8 +1792,6 @@ Ip4FreeTxToken (
|
|||
@param Flag Not used during transmission
|
||||
@param Context The token's wrap.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4OnPacketSent (
|
||||
|
@ -1850,8 +1831,8 @@ Ip4OnPacketSent (
|
|||
EFI IPv4 Protocol instance. Whenever the packet in the token is sent out or some
|
||||
errors occur, the event in the token will be signaled and the status is updated.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param Token Pointer to the transmit token.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to the transmit token.
|
||||
|
||||
@retval EFI_SUCCESS The data has been queued for transmission.
|
||||
@retval EFI_NOT_STARTED This instance has not been started.
|
||||
|
@ -2052,8 +2033,8 @@ ON_EXIT:
|
|||
driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event
|
||||
is signaled.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param Token Pointer to a token that is associated with the receive data descriptor.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that is associated with the receive data descriptor.
|
||||
|
||||
@retval EFI_SUCCESS The receive completion token was cached.
|
||||
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
|
||||
|
@ -2142,9 +2123,9 @@ ON_EXIT:
|
|||
Because Ip4CancelPacket and other functions are all called in
|
||||
line, so, after Ip4CancelPacket returns, the Item has been freed.
|
||||
|
||||
@param Map The IP4 child's transmit queue
|
||||
@param Item The current transmitted packet to test.
|
||||
@param Context The user's token to cancel.
|
||||
@param[in] Map The IP4 child's transmit queue
|
||||
@param[in] Item The current transmitted packet to test.
|
||||
@param[in] Context The user's token to cancel.
|
||||
|
||||
@retval EFI_SUCCESS Continue to check the next Item.
|
||||
@retval EFI_ABORTED The user's Token (Token != NULL) is cancelled.
|
||||
|
@ -2195,9 +2176,9 @@ Ip4CancelTxTokens (
|
|||
Cancel the receive request. This is quiet simple, because
|
||||
it is only enqueued in our local receive map.
|
||||
|
||||
@param Map The IP4 child's receive queue
|
||||
@param Item Current receive request to cancel.
|
||||
@param Context The user's token to cancel
|
||||
@param[in] Map The IP4 child's receive queue
|
||||
@param[in] Item Current receive request to cancel.
|
||||
@param[in] Context The user's token to cancel
|
||||
|
||||
@retval EFI_SUCCESS Continue to check the next receive request on the
|
||||
queue.
|
||||
|
@ -2239,8 +2220,8 @@ Ip4CancelRxTokens (
|
|||
/**
|
||||
Cancel the user's receive/transmit request.
|
||||
|
||||
@param IpInstance The IP4 child
|
||||
@param Token The token to cancel. If NULL, all token will be
|
||||
@param[in] IpInstance The IP4 child
|
||||
@param[in] Token The token to cancel. If NULL, all token will be
|
||||
cancelled.
|
||||
|
||||
@retval EFI_SUCCESS The token is cancelled
|
||||
|
@ -2322,12 +2303,12 @@ Ip4Cancel (
|
|||
asynchronous operation has completed, this function will not signal the token
|
||||
and EFI_NOT_FOUND is returned.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param Token Pointer to a token that has been issued by
|
||||
EFI_IP4_PROTOCOL.Transmit() or
|
||||
EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
|
||||
tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
|
||||
defined in EFI_IP4_PROTOCOL.Transmit().
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that has been issued by
|
||||
EFI_IP4_PROTOCOL.Transmit() or
|
||||
EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
|
||||
tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
|
||||
defined in EFI_IP4_PROTOCOL.Transmit().
|
||||
|
||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
||||
Token.->Event was signaled. When Token is NULL, all
|
||||
|
@ -2392,7 +2373,7 @@ ON_EXIT:
|
|||
experiencing packet loss should try calling the EFI_IP4_PROTOCOL.Poll() function
|
||||
more often.
|
||||
|
||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Incoming or outgoing data was processed.
|
||||
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
|
||||
|
@ -2440,9 +2421,9 @@ EfiIp4Poll (
|
|||
received-but-not-delivered and transmitted-but-not-recycle
|
||||
packets.
|
||||
|
||||
@param Map The IP4 child's transmit map.
|
||||
@param Item Current transmitted packet
|
||||
@param Context Not used.
|
||||
@param[in] Map The IP4 child's transmit map.
|
||||
@param[in] Item Current transmitted packet
|
||||
@param[in] Context Not used.
|
||||
|
||||
@retval EFI_SUCCESS Always returns EFI_SUCCESS
|
||||
|
||||
|
@ -2473,10 +2454,8 @@ Ip4SentPacketTicking (
|
|||
transmitted-but-not-recycle packets, and provides time input
|
||||
for its IGMP protocol.
|
||||
|
||||
@param Event The IP4 service instance's heart beat timer.
|
||||
@param Context The IP4 service instance.
|
||||
|
||||
@return None
|
||||
@param[in] Event The IP4 service instance's heart beat timer.
|
||||
@param[in] Context The IP4 service instance.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2007, Intel Corporation
|
||||
Ip4 internal functions and type defintions.
|
||||
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Impl.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Ip4 internal functions and type defintions.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_IMPL_H__
|
||||
|
@ -227,8 +219,8 @@ extern EFI_IP4_PROTOCOL mEfiIp4ProtocolTemplete;
|
|||
reconfigure the MNP. If Force is TRUE, the MNP is configured no
|
||||
matter whether that is changed or not.
|
||||
|
||||
@param IpSb The IP4 service instance that is to be changed.
|
||||
@param Force Force the configuration or not.
|
||||
@param[in] IpSb The IP4 service instance that is to be changed.
|
||||
@param[in] Force Force the configuration or not.
|
||||
|
||||
@retval EFI_SUCCESS The MNP is successfully configured/reconfigured.
|
||||
@retval Others Configuration failed.
|
||||
|
@ -246,8 +238,6 @@ Ip4ServiceConfigMnp (
|
|||
@param IpSb The IP4 service instance.
|
||||
@param IpInstance The IP4 child instance.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4InitProtocol (
|
||||
|
@ -258,7 +248,7 @@ Ip4InitProtocol (
|
|||
/**
|
||||
Clean up the IP4 child, release all the resources used by it.
|
||||
|
||||
@param IpInstance The IP4 child to clean up.
|
||||
@param[in] IpInstance The IP4 child to clean up.
|
||||
|
||||
@retval EFI_SUCCESS The IP4 child is cleaned up
|
||||
@retval EFI_DEVICE_ERROR Some resources failed to be released
|
||||
|
@ -272,8 +262,8 @@ Ip4CleanProtocol (
|
|||
/**
|
||||
Cancel the user's receive/transmit request.
|
||||
|
||||
@param IpInstance The IP4 child
|
||||
@param Token The token to cancel. If NULL, all token will be
|
||||
@param[in] IpInstance The IP4 child
|
||||
@param[in] Token The token to cancel. If NULL, all token will be
|
||||
cancelled.
|
||||
|
||||
@retval EFI_SUCCESS The token is cancelled
|
||||
|
@ -292,9 +282,9 @@ Ip4Cancel (
|
|||
Change the IP4 child's multicast setting. The caller
|
||||
should make sure that the parameters is valid.
|
||||
|
||||
@param IpInstance The IP4 child to change the setting.
|
||||
@param JoinFlag TRUE to join the group, otherwise leave it
|
||||
@param GroupAddress The target group address
|
||||
@param[in] IpInstance The IP4 child to change the setting.
|
||||
@param[in] JoinFlag TRUE to join the group, otherwise leave it
|
||||
@param[in] GroupAddress The target group address
|
||||
|
||||
@retval EFI_ALREADY_STARTED Want to join the group, but already a member of it
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate some resources.
|
||||
|
@ -316,10 +306,8 @@ Ip4Groups (
|
|||
transmitted-but-not-recycle packets, and provides time input
|
||||
for its IGMP protocol.
|
||||
|
||||
@param Event The IP4 service instance's heart beat timer.
|
||||
@param Context The IP4 service instance.
|
||||
|
||||
@return None
|
||||
@param[in] Event The IP4 service instance's heart beat timer.
|
||||
@param[in] Context The IP4 service instance.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -336,9 +324,9 @@ Ip4TimerTicking (
|
|||
received-but-not-delivered and transmitted-but-not-recycle
|
||||
packets.
|
||||
|
||||
@param Map The IP4 child's transmit map.
|
||||
@param Item Current transmitted packet
|
||||
@param Context Not used.
|
||||
@param[in] Map The IP4 child's transmit map.
|
||||
@param[in] Item Current transmitted packet
|
||||
@param[in] Context Not used.
|
||||
|
||||
@retval EFI_SUCCESS Always returns EFI_SUCCESS
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2007, Intel Corporation
|
||||
IP4 input process.
|
||||
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Input.c
|
||||
|
||||
Abstract:
|
||||
|
||||
IP4 input process.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -28,13 +20,13 @@ Abstract:
|
|||
(Dst, Src, Id, Protocol). The default life for the packet is
|
||||
120 seconds.
|
||||
|
||||
@param Dst The destination address
|
||||
@param Src The source address
|
||||
@param Id The ID field in IP header
|
||||
@param Protocol The protocol field in IP header
|
||||
@param[in] Dst The destination address
|
||||
@param[in] Src The source address
|
||||
@param[in] Id The ID field in IP header
|
||||
@param[in] Protocol The protocol field in IP header
|
||||
|
||||
@return NULL if failed to allocate memory for the entry, otherwise
|
||||
@return the point to just created reassemble entry.
|
||||
the point to just created reassemble entry.
|
||||
|
||||
**/
|
||||
IP4_ASSEMBLE_ENTRY *
|
||||
|
@ -74,9 +66,7 @@ Ip4CreateAssembleEntry (
|
|||
/**
|
||||
Release all the fragments of a packet, then free the assemble entry.
|
||||
|
||||
@param Assemble The assemble entry to free
|
||||
|
||||
@return None
|
||||
@param[in] Assemble The assemble entry to free
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -103,9 +93,7 @@ Ip4FreeAssembleEntry (
|
|||
Initialize an already allocated assemble table. This is generally
|
||||
the assemble table embedded in the IP4 service instance.
|
||||
|
||||
@param Table The assemble table to initialize.
|
||||
|
||||
@return NONE
|
||||
@param[in, out] Table The assemble table to initialize.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -125,9 +113,7 @@ Ip4InitAssembleTable (
|
|||
Clean up the assemble table: remove all the fragments
|
||||
and assemble entries.
|
||||
|
||||
@param Table The assemble table to clean up
|
||||
|
||||
@return None
|
||||
@param[in] Table The assemble table to clean up
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -159,8 +145,6 @@ Ip4CleanAssembleTable (
|
|||
@param Start The sequence of the first byte to fit in
|
||||
@param End One beyond the sequence of last byte to fit in.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4TrimPacket (
|
||||
|
@ -200,9 +184,7 @@ Ip4TrimPacket (
|
|||
the assembled packet's OnFree. It will free the assemble entry,
|
||||
which in turn will free all the fragments of the packet.
|
||||
|
||||
@param Arg The assemble entry to free
|
||||
|
||||
@return None
|
||||
@param[in] Arg The assemble entry to free
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -448,15 +430,13 @@ DROP:
|
|||
The IP4 input routine. It is called by the IP4_INTERFACE when a
|
||||
IP4 fragment is received from MNP.
|
||||
|
||||
@param Ip4Instance The IP4 child that request the receive, most like
|
||||
@param[in] Ip4Instance The IP4 child that request the receive, most like
|
||||
it is NULL.
|
||||
@param Packet The IP4 packet received.
|
||||
@param IoStatus The return status of receive request.
|
||||
@param Flag The link layer flag for the packet received, such
|
||||
@param[in] Packet The IP4 packet received.
|
||||
@param[in] IoStatus The return status of receive request.
|
||||
@param[in] Flag The link layer flag for the packet received, such
|
||||
as multicast.
|
||||
@param Context The IP4 service instance that own the MNP.
|
||||
|
||||
@return None
|
||||
@param[in] Context The IP4 service instance that own the MNP.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -625,9 +605,9 @@ DROP:
|
|||
/**
|
||||
Check whether this IP child accepts the packet.
|
||||
|
||||
@param IpInstance The IP child to check
|
||||
@param Head The IP header of the packet
|
||||
@param Packet The data of the packet
|
||||
@param[in] IpInstance The IP child to check
|
||||
@param[in] Head The IP header of the packet
|
||||
@param[in] Packet The data of the packet
|
||||
|
||||
@retval TRUE If the child wants to receive the packet.
|
||||
@retval FALSE Otherwise.
|
||||
|
@ -730,9 +710,9 @@ Ip4InstanceFrameAcceptable (
|
|||
packet is acceptable to it. Here the data of the packet is
|
||||
shared, but the net buffer isn't.
|
||||
|
||||
@param IpInstance The IP4 child to enqueue the packet to
|
||||
@param Head The IP header of the received packet
|
||||
@param Packet The data of the received packet
|
||||
@param[in] IpInstance The IP4 child to enqueue the packet to
|
||||
@param[in] Head The IP header of the received packet
|
||||
@param[in] Packet The data of the received packet
|
||||
|
||||
@retval EFI_NOT_STARTED The IP child hasn't been configured.
|
||||
@retval EFI_INVALID_PARAMETER The child doesn't want to receive the packet
|
||||
|
@ -786,11 +766,9 @@ Ip4InstanceEnquePacket (
|
|||
The signal handle of IP4's recycle event. It is called back
|
||||
when the upper layer release the packet.
|
||||
|
||||
@param Event The IP4's recycle event.
|
||||
@param Context The context of the handle, which is a
|
||||
IP4_RXDATA_WRAP
|
||||
|
||||
@return None
|
||||
@param Event The IP4's recycle event.
|
||||
@param Context The context of the handle, which is a
|
||||
IP4_RXDATA_WRAP
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -824,10 +802,11 @@ Ip4OnRecyclePacket (
|
|||
to the upper layer. Upper layer will signal the recycle event in
|
||||
it when it is done with the packet.
|
||||
|
||||
@param IpInstance The IP4 child to receive the packet
|
||||
@param Packet The packet to deliver up.
|
||||
@param[in] IpInstance The IP4 child to receive the packet
|
||||
@param[in] Packet The packet to deliver up.
|
||||
|
||||
@return NULL if failed to wrap the packet, otherwise the wrapper.
|
||||
@retval Wrap if warp the packet succeed.
|
||||
@retval NULL failed to wrap the packet .
|
||||
|
||||
**/
|
||||
IP4_RXDATA_WRAP *
|
||||
|
@ -900,7 +879,7 @@ Ip4WrapRxData (
|
|||
duplicate it to a non-shared packet, release the shared packet, then
|
||||
deliver the non-shared packet up.
|
||||
|
||||
@param IpInstance The IP child to deliver the packet up.
|
||||
@param[in] IpInstance The IP child to deliver the packet up.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources to deliver the
|
||||
packets.
|
||||
|
@ -996,10 +975,10 @@ Ip4InstanceDeliverPacket (
|
|||
Enqueue a received packet to all the IP children that share
|
||||
the same interface.
|
||||
|
||||
@param IpSb The IP4 service instance that receive the packet
|
||||
@param Head The header of the received packet
|
||||
@param Packet The data of the received packet
|
||||
@param IpIf The interface to enqueue the packet to
|
||||
@param[in] IpSb The IP4 service instance that receive the packet
|
||||
@param[in] Head The header of the received packet
|
||||
@param[in] Packet The data of the received packet
|
||||
@param[in] IpIf The interface to enqueue the packet to
|
||||
|
||||
@return The number of the IP4 children that accepts the packet
|
||||
|
||||
|
@ -1087,8 +1066,8 @@ Ip4InterfaceEnquePacket (
|
|||
/**
|
||||
Deliver the packet for each IP4 child on the interface.
|
||||
|
||||
@param IpSb The IP4 service instance that received the packet
|
||||
@param IpIf The IP4 interface to deliver the packet.
|
||||
@param[in] IpSb The IP4 service instance that received the packet
|
||||
@param[in] IpIf The IP4 interface to deliver the packet.
|
||||
|
||||
@retval EFI_SUCCESS It always returns EFI_SUCCESS now
|
||||
|
||||
|
@ -1120,9 +1099,9 @@ Ip4InterfaceDeliverPacket (
|
|||
child wants to consume the packet because each IP child needs
|
||||
its own copy of the packet to make changes.
|
||||
|
||||
@param IpSb The IP4 service instance that received the packet
|
||||
@param Head The header of the received packet
|
||||
@param Packet The data of the received packet
|
||||
@param[in] IpSb The IP4 service instance that received the packet
|
||||
@param[in] Head The header of the received packet
|
||||
@param[in] Packet The data of the received packet
|
||||
|
||||
@retval EFI_NOT_FOUND No IP child accepts the packet
|
||||
@retval EFI_SUCCESS The packet is enqueued or delivered to some IP
|
||||
|
@ -1180,9 +1159,7 @@ Ip4Demultiplex (
|
|||
/**
|
||||
Timeout the fragment and enqueued packets.
|
||||
|
||||
@param IpSb The IP4 service instance to timeout
|
||||
|
||||
@return None
|
||||
@param[in] IpSb The IP4 service instance to timeout
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Input.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_INPUT_H__
|
||||
|
@ -95,9 +88,7 @@ typedef struct {
|
|||
Initialize an already allocated assemble table. This is generally
|
||||
the assemble table embedded in the IP4 service instance.
|
||||
|
||||
@param Table The assemble table to initialize.
|
||||
|
||||
@return NONE
|
||||
@param[in, out] Table The assemble table to initialize.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -109,9 +100,7 @@ Ip4InitAssembleTable (
|
|||
Clean up the assemble table: remove all the fragments
|
||||
and assemble entries.
|
||||
|
||||
@param Table The assemble table to clean up
|
||||
|
||||
@return None
|
||||
@param[in] Table The assemble table to clean up
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -123,15 +112,13 @@ Ip4CleanAssembleTable (
|
|||
The IP4 input routine. It is called by the IP4_INTERFACE when a
|
||||
IP4 fragment is received from MNP.
|
||||
|
||||
@param Ip4Instance The IP4 child that request the receive, most like
|
||||
@param[in] Ip4Instance The IP4 child that request the receive, most like
|
||||
it is NULL.
|
||||
@param Packet The IP4 packet received.
|
||||
@param IoStatus The return status of receive request.
|
||||
@param Flag The link layer flag for the packet received, such
|
||||
@param[in] Packet The IP4 packet received.
|
||||
@param[in] IoStatus The return status of receive request.
|
||||
@param[in] Flag The link layer flag for the packet received, such
|
||||
as multicast.
|
||||
@param Context The IP4 service instance that own the MNP.
|
||||
|
||||
@return None
|
||||
@param[in] Context The IP4 service instance that own the MNP.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -152,9 +139,9 @@ Ip4AccpetFrame (
|
|||
child wants to consume the packet because each IP child needs
|
||||
its own copy of the packet to make changes.
|
||||
|
||||
@param IpSb The IP4 service instance that received the packet
|
||||
@param Head The header of the received packet
|
||||
@param Packet The data of the received packet
|
||||
@param[in] IpSb The IP4 service instance that received the packet
|
||||
@param[in] Head The header of the received packet
|
||||
@param[in] Packet The data of the received packet
|
||||
|
||||
@retval EFI_NOT_FOUND No IP child accepts the packet
|
||||
@retval EFI_SUCCESS The packet is enqueued or delivered to some IP
|
||||
|
@ -172,10 +159,10 @@ Ip4Demultiplex (
|
|||
Enqueue a received packet to all the IP children that share
|
||||
the same interface.
|
||||
|
||||
@param IpSb The IP4 service instance that receive the packet
|
||||
@param Head The header of the received packet
|
||||
@param Packet The data of the received packet
|
||||
@param IpIf The interface to enqueue the packet to
|
||||
@param[in] IpSb The IP4 service instance that receive the packet
|
||||
@param[in] Head The header of the received packet
|
||||
@param[in] Packet The data of the received packet
|
||||
@param[in] IpIf The interface to enqueue the packet to
|
||||
|
||||
@return The number of the IP4 children that accepts the packet
|
||||
|
||||
|
@ -194,7 +181,7 @@ Ip4InterfaceEnquePacket (
|
|||
duplicate it to a non-shared packet, release the shared packet, then
|
||||
deliver the non-shared packet up.
|
||||
|
||||
@param IpInstance The IP child to deliver the packet up.
|
||||
@param[in] IpInstance The IP child to deliver the packet up.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources to deliver the
|
||||
packets.
|
||||
|
@ -210,9 +197,7 @@ Ip4InstanceDeliverPacket (
|
|||
/**
|
||||
Timeout the fragment and enqueued packets.
|
||||
|
||||
@param IpSb The IP4 service instance to timeout
|
||||
|
||||
@return None
|
||||
@param[in] IpSb The IP4 service instance to timeout
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
IP4 option support functions.
|
||||
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Option.c
|
||||
|
||||
Abstract:
|
||||
|
||||
IP4 option support functions
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -28,9 +20,9 @@ Abstract:
|
|||
and will transmit. It will compute the ICMP error message fields
|
||||
if the option is mal-formated. But this information isn't used.
|
||||
|
||||
@param Option The first byte of the option
|
||||
@param OptionLen The length of the whole option
|
||||
@param Rcvd The option is from the packet we received if TRUE,
|
||||
@param[in] Option The first byte of the option
|
||||
@param[in] OptionLen The length of the whole option
|
||||
@param[in] Rcvd The option is from the packet we received if TRUE,
|
||||
otherwise the option we wants to transmit.
|
||||
|
||||
@retval TRUE The option is properly formatted
|
||||
|
@ -127,11 +119,11 @@ Ip4OptionIsValid (
|
|||
fragments.
|
||||
2. Pad the options copied over to aligned to 4 bytes.
|
||||
|
||||
@param Option The original option to copy from
|
||||
@param OptionLen The length of the original option
|
||||
@param FirstFragment Whether it is the first fragment
|
||||
@param Buf The buffer to copy options to. NULL
|
||||
@param BufLen The length of the buffer
|
||||
@param[in] Option The original option to copy from
|
||||
@param[in] OptionLen The length of the original option
|
||||
@param[in] FirstFragment Whether it is the first fragment
|
||||
@param[in, out] Buf The buffer to copy options to. NULL
|
||||
@param[in, out] BufLen The length of the buffer
|
||||
|
||||
@retval EFI_SUCCESS The options are copied over
|
||||
@retval EFI_BUFFER_TOO_SMALL Buf is NULL or BufLen provided is too small.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
IP4 option support routines.
|
||||
|
||||
Copyright (c) 2005 - 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:
|
||||
|
||||
Ip4Option.h
|
||||
|
||||
Abstract:
|
||||
|
||||
IP4 option support routines.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_OPTION_H__
|
||||
|
@ -39,9 +30,9 @@ typedef enum {
|
|||
and will transmit. It will compute the ICMP error message fields
|
||||
if the option is mal-formated. But this information isn't used.
|
||||
|
||||
@param Option The first byte of the option
|
||||
@param OptionLen The length of the whole option
|
||||
@param Rcvd The option is from the packet we received if TRUE,
|
||||
@param[in] Option The first byte of the option
|
||||
@param[in] OptionLen The length of the whole option
|
||||
@param[in] Rcvd The option is from the packet we received if TRUE,
|
||||
otherwise the option we wants to transmit.
|
||||
|
||||
@retval TRUE The option is properly formatted
|
||||
|
@ -62,11 +53,11 @@ Ip4OptionIsValid (
|
|||
fragments.
|
||||
2. Pad the options copied over to aligned to 4 bytes.
|
||||
|
||||
@param Option The original option to copy from
|
||||
@param OptionLen The length of the original option
|
||||
@param FirstFragment Whether it is the first fragment
|
||||
@param Buf The buffer to copy options to. NULL
|
||||
@param BufLen The length of the buffer
|
||||
@param[in] Option The original option to copy from
|
||||
@param[in] OptionLen The length of the original option
|
||||
@param[in] FirstFragment Whether it is the first fragment
|
||||
@param[in, out] Buf The buffer to copy options to. NULL
|
||||
@param[in, out] BufLen The length of the buffer
|
||||
|
||||
@retval EFI_SUCCESS The options are copied over
|
||||
@retval EFI_BUFFER_TOO_SMALL Buf is NULL or BufLen provided is too small.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
Transmit the IP4 packet.
|
||||
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Output.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Transmit the IP4 packet
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -29,14 +21,14 @@ UINT16 mIp4Id;
|
|||
Prepend an IP4 head to the Packet. It will copy the options and
|
||||
build the IP4 header fields. Used for IP4 fragmentation.
|
||||
|
||||
@param Packet The packet to prepend IP4 header to
|
||||
@param Head The caller supplied header. The caller should set
|
||||
the following header fields: Tos, TotalLen, Id,
|
||||
Fragment, Ttl, Protocol, Src and Dst. All the fields
|
||||
are in host byte order. This function will fill in
|
||||
the Ver, HeadLen, and checksum.
|
||||
@param Option The orginal IP4 option to copy from
|
||||
@param OptLen The length of the IP4 option
|
||||
@param Packet The packet to prepend IP4 header to
|
||||
@param Head The caller supplied header. The caller should set
|
||||
the following header fields: Tos, TotalLen, Id,
|
||||
Fragment, Ttl, Protocol, Src and Dst. All the fields
|
||||
are in host byte order. This function will fill in
|
||||
the Ver, HeadLen, and checksum.
|
||||
@param Option The orginal IP4 option to copy from
|
||||
@param OptLen The length of the IP4 option
|
||||
|
||||
@retval EFI_BAD_BUFFER_SIZE There is no enought room in the head space of
|
||||
Packet.
|
||||
|
@ -101,9 +93,9 @@ Ip4PrependHead (
|
|||
itself, that is, not by the requests of IP4 child's consumer. Such
|
||||
packets include the ICMP echo replies, and other ICMP error packets.
|
||||
|
||||
@param IpSb The IP4 service that wants to send the packets.
|
||||
@param Dst The destination of the packet
|
||||
@param Src The source of the packet
|
||||
@param[in] IpSb The IP4 service that wants to send the packets.
|
||||
@param[in] Dst The destination of the packet
|
||||
@param[in] Src The source of the packet
|
||||
|
||||
@return NULL if no proper interface is found, otherwise the interface that
|
||||
can be used to send the system packet from.
|
||||
|
@ -170,8 +162,6 @@ Ip4SelectInterface (
|
|||
for reference.
|
||||
@param Context The context provided by us
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4SysPacketSent (
|
||||
|
@ -192,24 +182,24 @@ Ip4SysPacketSent (
|
|||
(IpInstance == NULL). It will route the packet, fragment it,
|
||||
then transmit all the fragments through some interface.
|
||||
|
||||
@param IpSb The IP4 service instance to transmit the packet
|
||||
@param IpInstance The IP4 child that issues the transmission. It is
|
||||
@param[in] IpSb The IP4 service instance to transmit the packet
|
||||
@param[in] IpInstance The IP4 child that issues the transmission. It is
|
||||
NULL if the packet is from the system.
|
||||
@param Packet The user data to send, excluding the IP header.
|
||||
@param Head The caller supplied header. The caller should set
|
||||
@param[in] Packet The user data to send, excluding the IP header.
|
||||
@param[in] Head The caller supplied header. The caller should set
|
||||
the following header fields: Tos, TotalLen, Id, tl,
|
||||
Fragment, Protocol, Src and Dst. All the fields are
|
||||
in host byte order. This function will fill in the
|
||||
Ver, HeadLen, Fragment, and checksum. The Fragment
|
||||
only need to include the DF flag. Ip4Output will
|
||||
compute the MF and offset for you.
|
||||
@param Option The original option to append to the IP headers
|
||||
@param OptLen The length of the option
|
||||
@param GateWay The next hop address to transmit packet to.
|
||||
@param[in] Option The original option to append to the IP headers
|
||||
@param[in] OptLen The length of the option
|
||||
@param[in] GateWay The next hop address to transmit packet to.
|
||||
255.255.255.255 means broadcast.
|
||||
@param Callback The callback function to issue when transmission
|
||||
@param[in] Callback The callback function to issue when transmission
|
||||
completed.
|
||||
@param Context The opaque context for the callback
|
||||
@param[in] Context The opaque context for the callback
|
||||
|
||||
@retval EFI_NO_MAPPING There is no interface to the destination.
|
||||
@retval EFI_NOT_FOUND There is no route to the destination
|
||||
|
@ -414,8 +404,8 @@ ON_ERROR:
|
|||
The filter function to find a packet and all its fragments.
|
||||
The packet's fragments have their Context set to the packet.
|
||||
|
||||
@param Frame The frames hold by the low level interface
|
||||
@param Context Context to the function, which is the packet.
|
||||
@param[in] Frame The frames hold by the low level interface
|
||||
@param[in] Context Context to the function, which is the packet.
|
||||
|
||||
@retval TRUE This is the packet to cancel or its fragments.
|
||||
@retval FALSE This is unrelated packet.
|
||||
|
@ -442,8 +432,6 @@ Ip4CancelPacketFragments (
|
|||
@param Packet The Packet to cancel
|
||||
@param IoStatus The status returns to the sender.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4CancelPacket (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Output.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_OUTPUT_H__
|
||||
|
@ -33,8 +26,6 @@ Abstract:
|
|||
for reference.
|
||||
@param Context The context provided by us
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4SysPacketSent (
|
||||
|
@ -51,24 +42,24 @@ Ip4SysPacketSent (
|
|||
(IpInstance == NULL). It will route the packet, fragment it,
|
||||
then transmit all the fragments through some interface.
|
||||
|
||||
@param IpSb The IP4 service instance to transmit the packet
|
||||
@param IpInstance The IP4 child that issues the transmission. It is
|
||||
@param[in] IpSb The IP4 service instance to transmit the packet
|
||||
@param[in] IpInstance The IP4 child that issues the transmission. It is
|
||||
NULL if the packet is from the system.
|
||||
@param Packet The user data to send, excluding the IP header.
|
||||
@param Head The caller supplied header. The caller should set
|
||||
@param[in] Packet The user data to send, excluding the IP header.
|
||||
@param[in] Head The caller supplied header. The caller should set
|
||||
the following header fields: Tos, TotalLen, Id, tl,
|
||||
Fragment, Protocol, Src and Dst. All the fields are
|
||||
in host byte order. This function will fill in the
|
||||
Ver, HeadLen, Fragment, and checksum. The Fragment
|
||||
only need to include the DF flag. Ip4Output will
|
||||
compute the MF and offset for you.
|
||||
@param Option The original option to append to the IP headers
|
||||
@param OptLen The length of the option
|
||||
@param GateWay The next hop address to transmit packet to.
|
||||
@param[in] Option The original option to append to the IP headers
|
||||
@param[in] OptLen The length of the option
|
||||
@param[in] GateWay The next hop address to transmit packet to.
|
||||
255.255.255.255 means broadcast.
|
||||
@param Callback The callback function to issue when transmission
|
||||
@param[in] Callback The callback function to issue when transmission
|
||||
completed.
|
||||
@param Context The opaque context for the callback
|
||||
@param[in] Context The opaque context for the callback
|
||||
|
||||
@retval EFI_NO_MAPPING There is no interface to the destination.
|
||||
@retval EFI_NOT_FOUND There is no route to the destination
|
||||
|
@ -96,8 +87,6 @@ Ip4Output (
|
|||
@param Packet The Packet to cancel
|
||||
@param IoStatus The status returns to the sender.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4CancelPacket (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
Copyright (c) 2005 - 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,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:
|
||||
|
||||
Ip4Route.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Ip4Impl.h"
|
||||
|
@ -26,9 +18,9 @@ Abstract:
|
|||
Allocate a route entry then initialize it with the Dest/Netmaks
|
||||
and Gateway.
|
||||
|
||||
@param Dest The destination network
|
||||
@param Netmask The destination network mask
|
||||
@param GateWay The nexthop address
|
||||
@param[in] Dest The destination network
|
||||
@param[in] Netmask The destination network mask
|
||||
@param[in] GateWay The nexthop address
|
||||
|
||||
@return NULL if failed to allocate memeory, otherwise the newly created
|
||||
route entry.
|
||||
|
@ -66,8 +58,6 @@ Ip4CreateRouteEntry (
|
|||
|
||||
@param RtEntry The route entry to free.
|
||||
|
||||
@return NONE
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4FreeRouteEntry (
|
||||
|
@ -85,11 +75,11 @@ Ip4FreeRouteEntry (
|
|||
/**
|
||||
Allocate and initialize an IP4 route cache entry.
|
||||
|
||||
@param Dst The destination address
|
||||
@param Src The source address
|
||||
@param GateWay The next hop address
|
||||
@param Tag The tag from the caller. This marks all the cache
|
||||
entries spawned from one route table entry.
|
||||
@param[in] Dst The destination address
|
||||
@param[in] Src The source address
|
||||
@param[in] GateWay The next hop address
|
||||
@param[in] Tag The tag from the caller. This marks all the cache
|
||||
entries spawned from one route table entry.
|
||||
|
||||
@return NULL if failed to allocate memory for the cache, other point
|
||||
to the created route cache entry.
|
||||
|
@ -128,8 +118,6 @@ Ip4CreateRouteCacheEntry (
|
|||
|
||||
@param RtCacheEntry The route cache entry to free.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4FreeRouteCacheEntry (
|
||||
|
@ -147,9 +135,7 @@ Ip4FreeRouteCacheEntry (
|
|||
/**
|
||||
Initialize an empty route cache table.
|
||||
|
||||
@param RtCache The rotue cache table to initialize.
|
||||
|
||||
@return NONE
|
||||
@param[in, out] RtCache The rotue cache table to initialize.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -169,9 +155,7 @@ Ip4InitRouteCache (
|
|||
Clean up a route cache, that is free all the route cache
|
||||
entries enqueued in the cache.
|
||||
|
||||
@param RtCache The route cache table to clean up
|
||||
|
||||
@return None
|
||||
@param[in] RtCache The route cache table to clean up
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -235,9 +219,7 @@ Ip4CreateRouteTable (
|
|||
Free the route table and its associated route cache. Route
|
||||
table is reference counted.
|
||||
|
||||
@param RtTable The route table to free.
|
||||
|
||||
@return None
|
||||
@param[in] RtTable The route table to free.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -284,8 +266,6 @@ Ip4FreeRouteTable (
|
|||
@param RtCache Route cache to remove the entries from
|
||||
@param Tag The Tag of the entries to remove
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4PurgeRouteCache (
|
||||
|
@ -316,10 +296,10 @@ Ip4PurgeRouteCache (
|
|||
Add a route entry to the route table. All the IP4_ADDRs are in
|
||||
host byte order.
|
||||
|
||||
@param RtTable Route table to add route to
|
||||
@param Dest The destination of the network
|
||||
@param Netmask The netmask of the destination
|
||||
@param Gateway The next hop address
|
||||
@param[in, out] RtTable Route table to add route to
|
||||
@param[in] Dest The destination of the network
|
||||
@param[in] Netmask The netmask of the destination
|
||||
@param[in] Gateway The next hop address
|
||||
|
||||
@retval EFI_ACCESS_DENIED The same route already exists
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory for the entry
|
||||
|
@ -378,10 +358,10 @@ Ip4AddRoute (
|
|||
/**
|
||||
Remove a route entry and all the route caches spawn from it.
|
||||
|
||||
@param RtTable The route table to remove the route from
|
||||
@param Dest The destination network
|
||||
@param Netmask The netmask of the Dest
|
||||
@param Gateway The next hop address
|
||||
@param RtTable The route table to remove the route from
|
||||
@param Dest The destination network
|
||||
@param Netmask The netmask of the Dest
|
||||
@param Gateway The next hop address
|
||||
|
||||
@retval EFI_SUCCESS The route entry is successfully removed
|
||||
@retval EFI_NOT_FOUND There is no route entry in the table with that
|
||||
|
@ -426,9 +406,9 @@ Ip4DelRoute (
|
|||
host redirect according to RFC1122. So, only route cache entries
|
||||
are modified according to the ICMP redirect message.
|
||||
|
||||
@param RtTable The route table to search the cache for
|
||||
@param Dest The destination address
|
||||
@param Src The source address
|
||||
@param[in] RtTable The route table to search the cache for
|
||||
@param[in] Dest The destination address
|
||||
@param[in] Src The source address
|
||||
|
||||
@return NULL if no route entry to the (Dest, Src). Otherwise the point
|
||||
to the correct route cache entry.
|
||||
|
@ -469,11 +449,11 @@ Ip4FindRouteCache (
|
|||
1. IP search the route table for a most specific match
|
||||
2. The local route entries have precedence over the default route entry.
|
||||
|
||||
@param RtTable The route table to search from
|
||||
@param Dst The destionation address to search
|
||||
@param[in] RtTable The route table to search from
|
||||
@param[in] Dst The destionation address to search
|
||||
|
||||
@return NULL if no route matches the Dst, otherwise the point to the
|
||||
@return most specific route to the Dst.
|
||||
most specific route to the Dst.
|
||||
|
||||
**/
|
||||
IP4_ROUTE_ENTRY *
|
||||
|
@ -511,9 +491,9 @@ Ip4FindRouteEntry (
|
|||
Search the route table to route the packet. Return/create a route
|
||||
cache if there is a route to the destination.
|
||||
|
||||
@param RtTable The route table to search from
|
||||
@param Dest The destination address to search for
|
||||
@param Src The source address to search for
|
||||
@param[in] RtTable The route table to search from
|
||||
@param[in] Dest The destination address to search for
|
||||
@param[in] Src The source address to search for
|
||||
|
||||
@return NULL if failed to route packet, otherwise a route cache
|
||||
entry that can be used to route packet.
|
||||
|
@ -610,7 +590,7 @@ Ip4Route (
|
|||
GetModeData. The EFI_IP4_ROUTE_TABLE is clumsy to use in the
|
||||
internal operation of the IP4 driver.
|
||||
|
||||
@param IpInstance The IP4 child that requests the route table.
|
||||
@param[in] IpInstance The IP4 child that requests the route table.
|
||||
|
||||
@retval EFI_SUCCESS The route table is successfully build
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the rotue table.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation
|
||||
EFI IP4 route table and route cache table defintions.
|
||||
|
||||
Copyright (c) 2005 - 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:
|
||||
|
||||
Ip4Route.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI IP4 route table and route cache table defintions.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_IP4_ROUTE_H__
|
||||
|
@ -115,9 +106,7 @@ Ip4CreateRouteTable (
|
|||
Free the route table and its associated route cache. Route
|
||||
table is reference counted.
|
||||
|
||||
@param RtTable The route table to free.
|
||||
|
||||
@return None
|
||||
@param[in] RtTable The route table to free.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -129,10 +118,10 @@ Ip4FreeRouteTable (
|
|||
Add a route entry to the route table. All the IP4_ADDRs are in
|
||||
host byte order.
|
||||
|
||||
@param RtTable Route table to add route to
|
||||
@param Dest The destination of the network
|
||||
@param Netmask The netmask of the destination
|
||||
@param Gateway The next hop address
|
||||
@param[in, out] RtTable Route table to add route to
|
||||
@param[in] Dest The destination of the network
|
||||
@param[in] Netmask The netmask of the destination
|
||||
@param[in] Gateway The next hop address
|
||||
|
||||
@retval EFI_ACCESS_DENIED The same route already exists
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory for the entry
|
||||
|
@ -150,10 +139,10 @@ Ip4AddRoute (
|
|||
/**
|
||||
Remove a route entry and all the route caches spawn from it.
|
||||
|
||||
@param RtTable The route table to remove the route from
|
||||
@param Dest The destination network
|
||||
@param Netmask The netmask of the Dest
|
||||
@param Gateway The next hop address
|
||||
@param RtTable The route table to remove the route from
|
||||
@param Dest The destination network
|
||||
@param Netmask The netmask of the Dest
|
||||
@param Gateway The next hop address
|
||||
|
||||
@retval EFI_SUCCESS The route entry is successfully removed
|
||||
@retval EFI_NOT_FOUND There is no route entry in the table with that
|
||||
|
@ -174,9 +163,9 @@ Ip4DelRoute (
|
|||
host redirect according to RFC1122. So, only route cache entries
|
||||
are modified according to the ICMP redirect message.
|
||||
|
||||
@param RtTable The route table to search the cache for
|
||||
@param Dest The destination address
|
||||
@param Src The source address
|
||||
@param[in] RtTable The route table to search the cache for
|
||||
@param[in] Dest The destination address
|
||||
@param[in] Src The source address
|
||||
|
||||
@return NULL if no route entry to the (Dest, Src). Otherwise the point
|
||||
to the correct route cache entry.
|
||||
|
@ -194,8 +183,6 @@ Ip4FindRouteCache (
|
|||
|
||||
@param RtCacheEntry The route cache entry to free.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4FreeRouteCacheEntry (
|
||||
|
@ -206,9 +193,9 @@ Ip4FreeRouteCacheEntry (
|
|||
Search the route table to route the packet. Return/create a route
|
||||
cache if there is a route to the destination.
|
||||
|
||||
@param RtTable The route table to search from
|
||||
@param Dest The destination address to search for
|
||||
@param Src The source address to search for
|
||||
@param[in] RtTable The route table to search from
|
||||
@param[in] Dest The destination address to search for
|
||||
@param[in] Src The source address to search for
|
||||
|
||||
@return NULL if failed to route packet, otherwise a route cache
|
||||
entry that can be used to route packet.
|
||||
|
@ -226,7 +213,7 @@ Ip4Route (
|
|||
GetModeData. The EFI_IP4_ROUTE_TABLE is clumsy to use in the
|
||||
internal operation of the IP4 driver.
|
||||
|
||||
@param IpInstance The IP4 child that requests the route table.
|
||||
@param[in] IpInstance The IP4 child that requests the route table.
|
||||
|
||||
@retval EFI_SUCCESS The route table is successfully build
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the rotue table.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for MnpDxe driver.
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2005 - 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
|
||||
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.
|
||||
|
@ -28,10 +28,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
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
|
||||
|
@ -40,7 +40,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
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.
|
||||
|
@ -79,15 +79,15 @@ MnpComponentNameGetDriverName (
|
|||
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
|
||||
|
@ -96,7 +96,7 @@ MnpComponentNameGetDriverName (
|
|||
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
|
||||
|
@ -105,7 +105,7 @@ MnpComponentNameGetDriverName (
|
|||
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
|
||||
|
@ -185,10 +185,10 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mMnpDriverNameTable[] = {
|
|||
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
|
||||
|
@ -197,7 +197,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mMnpDriverNameTable[] = {
|
|||
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.
|
||||
|
@ -244,15 +244,15 @@ MnpComponentNameGetDriverName (
|
|||
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
|
||||
|
@ -261,7 +261,7 @@ MnpComponentNameGetDriverName (
|
|||
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
|
||||
|
@ -270,7 +270,7 @@ MnpComponentNameGetDriverName (
|
|||
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,11 +1,11 @@
|
|||
/** @file
|
||||
Implementation of Managed Network Protocol private services.
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
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.
|
||||
|
@ -48,7 +48,7 @@ EFI_MANAGED_NETWORK_CONFIG_DATA mMnpDefaultConfigData = {
|
|||
Configure the Snp receive filters according to the instances' receive filter
|
||||
settings.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
|
||||
@retval EFI_SUCCESS The receive filters is configured.
|
||||
@retval EFI_OUT_OF_RESOURCES The receive filters can't be configured due to
|
||||
|
@ -205,8 +205,8 @@ MnpConfigReceiveFilters (
|
|||
Add Count of net buffers to MnpServiceData->FreeNbufQue. The length of the net
|
||||
buffer is specified by MnpServiceData->BufferLength.
|
||||
|
||||
@param MnpServiceData Pointer to the MNP_SERVICE_DATA.
|
||||
@param Count Number of NET_BUFFERs to add.
|
||||
@param[in] MnpServiceData Pointer to the MNP_SERVICE_DATA.
|
||||
@param[in] Count Number of NET_BUFFERs to add.
|
||||
|
||||
@retval EFI_SUCCESS The specified amount of NET_BUFs are allocated
|
||||
and added to MnpServiceData->FreeNbufQue.
|
||||
|
@ -260,7 +260,7 @@ MnpAddFreeNbuf (
|
|||
in the queue, first try to allocate some and add them into the queue, then
|
||||
fetch the NET_BUF from the updated FreeNbufQue.
|
||||
|
||||
@param MnpServiceData Pointer to the MNP_SERVICE_DATA.
|
||||
@param[in] MnpServiceData Pointer to the MNP_SERVICE_DATA.
|
||||
|
||||
@return Pointer to the allocated free NET_BUF structure, if NULL the
|
||||
operation is failed.
|
||||
|
@ -335,7 +335,7 @@ ON_EXIT:
|
|||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Nbuf Pointer to the NET_BUF to free.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
MnpFreeNbuf (
|
||||
|
@ -367,9 +367,9 @@ MnpFreeNbuf (
|
|||
/**
|
||||
Initialize the mnp service context data.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param ImageHandle The driver image handle.
|
||||
@param ControllerHandle Handle of device to bind driver to.
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] ImageHandle The driver image handle.
|
||||
@param[in] ControllerHandle Handle of device to bind driver to.
|
||||
|
||||
@retval EFI_SUCCESS The mnp service context is initialized.
|
||||
@retval Other Some error occurs.
|
||||
|
@ -555,7 +555,7 @@ ERROR:
|
|||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param ImageHandle The driver image handle.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
MnpFlushServiceData (
|
||||
|
@ -616,8 +616,8 @@ MnpFlushServiceData (
|
|||
/**
|
||||
Initialize the mnp instance context data.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Instance Pointer to the mnp instance context data to
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] Instance Pointer to the mnp instance context data to
|
||||
initialize.
|
||||
|
||||
**/
|
||||
|
@ -667,9 +667,9 @@ MnpInitializeInstanceData (
|
|||
/**
|
||||
Check whether the token specified by Arg maches the token in Item.
|
||||
|
||||
@param Map Pointer to the NET_MAP.
|
||||
@param Item Pointer to the NET_MAP_ITEM
|
||||
@param Arg Pointer to the Arg, it's a pointer to the token to
|
||||
@param[in] Map Pointer to the NET_MAP.
|
||||
@param[in] Item Pointer to the NET_MAP_ITEM
|
||||
@param[in] Arg Pointer to the Arg, it's a pointer to the token to
|
||||
check.
|
||||
|
||||
@retval EFI_SUCCESS The token specified by Arg is different from the
|
||||
|
@ -705,10 +705,10 @@ MnpTokenExist (
|
|||
/**
|
||||
Cancel the token specified by Arg if it matches the token in Item.
|
||||
|
||||
@param Map Pointer to the NET_MAP.
|
||||
@param Item Pointer to the NET_MAP_ITEM
|
||||
@param Arg Pointer to the Arg, it's a pointer to the token to
|
||||
cancel.
|
||||
@param[in, out] Map Pointer to the NET_MAP.
|
||||
@param[in] Item Pointer to the NET_MAP_ITEM
|
||||
@param[in] Arg Pointer to the Arg, it's a pointer to the token to
|
||||
cancel.
|
||||
|
||||
@retval EFI_SUCCESS The Arg is NULL, and the token in Item is cancelled,
|
||||
or the Arg isn't NULL, and the token in Item is
|
||||
|
@ -760,7 +760,7 @@ MnpCancelTokens (
|
|||
/**
|
||||
Start and initialize the simple network.
|
||||
|
||||
@param Snp Pointer to the simple network protocol.
|
||||
@param[in] Snp Pointer to the simple network protocol.
|
||||
|
||||
@retval EFI_SUCCESS The simple network protocol is started.
|
||||
@retval Other Some error occurs.
|
||||
|
@ -794,7 +794,7 @@ MnpStartSnp (
|
|||
/**
|
||||
Stop the simple network.
|
||||
|
||||
@param Snp Pointer to the simple network protocol.
|
||||
@param[in] Snp Pointer to the simple network protocol.
|
||||
|
||||
@retval EFI_SUCCESS The simple network is stopped.
|
||||
@retval Other Some error occurs.
|
||||
|
@ -829,10 +829,10 @@ MnpStopSnp (
|
|||
Start the managed network, this function is called when one instance is configured
|
||||
or reconfigured.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param IsConfigUpdate The instance is reconfigured or it's the first time
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] IsConfigUpdate The instance is reconfigured or it's the first time
|
||||
the instanced is configured.
|
||||
@param EnableSystemPoll Enable the system polling or not.
|
||||
@param[in] EnableSystemPoll Enable the system polling or not.
|
||||
|
||||
@retval EFI_SUCCESS The managed network is started and some
|
||||
configuration is updated.
|
||||
|
@ -921,7 +921,7 @@ ErrorExit:
|
|||
/**
|
||||
Stop the managed network.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
|
||||
@retval EFI_SUCCESS The managed network is stopped.
|
||||
@retval Other Some error occurs.
|
||||
|
@ -1021,8 +1021,8 @@ MnpFlushRcvdDataQueue (
|
|||
/**
|
||||
Configure the Instance using ConfigData.
|
||||
|
||||
@param Instance Pointer to the mnp instance context data.
|
||||
@param ConfigData Pointer to the configuration data used to configure
|
||||
@param[in] Instance Pointer to the mnp instance context data.
|
||||
@param[in] ConfigData Pointer to the configuration data used to configure
|
||||
the isntance.
|
||||
|
||||
@retval EFI_SUCCESS The Instance is configured.
|
||||
|
@ -1162,11 +1162,11 @@ MnpConfigureInstance (
|
|||
Add a group address control block which controls the MacAddress for
|
||||
this instance.
|
||||
|
||||
@param Instance Pointer to the mnp instance context data.
|
||||
@param CtrlBlk Pointer to the group address control block.
|
||||
@param GroupAddress Pointer to the group adress.
|
||||
@param MacAddress Pointer to the mac address.
|
||||
@param HwAddressSize The hardware address size.
|
||||
@param[in] Instance Pointer to the mnp instance context data.
|
||||
@param[in] CtrlBlk Pointer to the group address control block.
|
||||
@param[in] GroupAddress Pointer to the group adress.
|
||||
@param[in] MacAddress Pointer to the mac address.
|
||||
@param[in] HwAddressSize The hardware address size.
|
||||
|
||||
@retval EFI_SUCCESS The group address control block is added.
|
||||
@retval EFI_OUT_OF_RESOURCE Failed due to lack of memory resources.
|
||||
|
@ -1231,8 +1231,8 @@ MnpGroupOpAddCtrlBlk (
|
|||
Delete a group control block from the instance. If the controlled group address's
|
||||
reference count reaches zero, the group address is removed too.
|
||||
|
||||
@param Instance Pointer to the instance context data.
|
||||
@param CtrlBlk Pointer to the group control block to delete.
|
||||
@param[in] Instance Pointer to the instance context data.
|
||||
@param[in] CtrlBlk Pointer to the group control block to delete.
|
||||
|
||||
@return The group address controlled by the control block is no longer used or not.
|
||||
|
||||
|
@ -1283,11 +1283,11 @@ MnpGroupOpDelCtrlBlk (
|
|||
/**
|
||||
Do the group operations for this instance.
|
||||
|
||||
@param Instance Pointer to the instance context data.
|
||||
@param JoinFlag Set to TRUE to join a group. Set to TRUE to leave a
|
||||
@param[in] Instance Pointer to the instance context data.
|
||||
@param[in] JoinFlag Set to TRUE to join a group. Set to TRUE to leave a
|
||||
group/groups.
|
||||
@param MacAddress Pointer to the group address to join or leave.
|
||||
@param CtrlBlk Pointer to the group control block if JoinFlag if
|
||||
@param[in] MacAddress Pointer to the group address to join or leave.
|
||||
@param[in] CtrlBlk Pointer to the group control block if JoinFlag if
|
||||
FALSE.
|
||||
|
||||
@retval EFI_SUCCESS The group operation finished.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/** @file
|
||||
Implementation of driver entry point and driver binding protocol.
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2005 - 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
|
||||
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.
|
||||
|
@ -33,10 +33,10 @@ EFI_DRIVER_BINDING_PROTOCOL gMnpDriverBinding = {
|
|||
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
|
||||
|
@ -107,10 +107,10 @@ MnpDriverBindingSupported (
|
|||
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
|
||||
|
@ -185,11 +185,11 @@ ErrorExit:
|
|||
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
|
||||
|
@ -270,19 +270,22 @@ MnpDriverBindingStop (
|
|||
|
||||
|
||||
/**
|
||||
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 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.
|
||||
@retval other The child handle was not created.
|
||||
@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
|
||||
@retval other The child handle was not created
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@ -384,24 +387,21 @@ ErrorExit:
|
|||
|
||||
|
||||
/**
|
||||
Destroys a child handle with a set of I/O services.
|
||||
|
||||
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 Pointer to the EFI_SERVICE_BINDING_PROTOCOL
|
||||
instance.
|
||||
@param ChildHandle Handle of the child to destroy.
|
||||
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.
|
||||
|
||||
@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 ChildHandle 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.
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Handle of the child to destroy
|
||||
|
||||
@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
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@ -520,8 +520,8 @@ MnpServiceBindingDestroyChild (
|
|||
The entry point for Mnp driver which installs the driver binding and component
|
||||
name protocol on its ImageHandle.
|
||||
|
||||
@param ImageHandle The image handle of the driver.
|
||||
@param SystemTable The system table.
|
||||
@param[in] ImageHandle The image handle of the driver.
|
||||
@param[in] SystemTable The system table.
|
||||
|
||||
@retval EFI_SUCCES The driver binding and component name protocols are
|
||||
successfully installed.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/** @file
|
||||
Declaration of strctures and functions for MnpDxe driver.
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2005 - 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
|
||||
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.
|
||||
|
@ -96,10 +96,10 @@ typedef struct _MNP_SERVICE_DATA {
|
|||
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
|
||||
|
@ -122,10 +122,10 @@ MnpDriverBindingSupported (
|
|||
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
|
||||
|
@ -149,11 +149,11 @@ MnpDriverBindingStart (
|
|||
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
|
||||
|
@ -169,19 +169,22 @@ MnpDriverBindingStop (
|
|||
);
|
||||
|
||||
/**
|
||||
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_OUT_OF_RESOURCES There are not enough resources availabe to create
|
||||
the child.
|
||||
@retval other The child handle was not created.
|
||||
@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
|
||||
@retval other The child handle was not created
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@ -192,19 +195,21 @@ MnpServiceBindingCreateChild (
|
|||
);
|
||||
|
||||
/**
|
||||
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 ChildHandle Handle of the child to destroy.
|
||||
@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 other The child handle was not destroyed.
|
||||
@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
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Declaration of structures and functions of MnpDxe driver.
|
||||
|
||||
Copyright (c) 2005 - 2008, Intel Corporation. <BR>
|
||||
Copyright (c) 2005 - 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
|
||||
|
@ -93,9 +93,9 @@ typedef struct _MNP_RXDATA_WRAP {
|
|||
/**
|
||||
Initialize the mnp service context data.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param ImageHandle The driver image handle.
|
||||
@param ControllerHandle Handle of device to bind driver to.
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] ImageHandle The driver image handle.
|
||||
@param[in] ControllerHandle Handle of device to bind driver to.
|
||||
|
||||
@retval EFI_SUCCESS The mnp service context is initialized.
|
||||
@retval Other Some error occurs.
|
||||
|
@ -113,7 +113,7 @@ MnpInitializeServiceData (
|
|||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param ImageHandle The driver image handle.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
MnpFlushServiceData (
|
||||
|
@ -124,8 +124,8 @@ MnpFlushServiceData (
|
|||
/**
|
||||
Initialize the mnp instance context data.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Instance Pointer to the mnp instance context data to
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] Instance Pointer to the mnp instance context data to
|
||||
initialize.
|
||||
|
||||
**/
|
||||
|
@ -138,9 +138,9 @@ MnpInitializeInstanceData (
|
|||
/**
|
||||
Check whether the token specified by Arg maches the token in Item.
|
||||
|
||||
@param Map Pointer to the NET_MAP.
|
||||
@param Item Pointer to the NET_MAP_ITEM
|
||||
@param Arg Pointer to the Arg, it's a pointer to the token to
|
||||
@param[in] Map Pointer to the NET_MAP.
|
||||
@param[in] Item Pointer to the NET_MAP_ITEM
|
||||
@param[in] Arg Pointer to the Arg, it's a pointer to the token to
|
||||
check.
|
||||
|
||||
@retval EFI_SUCCESS The token specified by Arg is different from the
|
||||
|
@ -159,16 +159,16 @@ MnpTokenExist (
|
|||
/**
|
||||
Cancel the token specified by Arg if it matches the token in Item.
|
||||
|
||||
@param Map Pointer to the NET_MAP.
|
||||
@param Item Pointer to the NET_MAP_ITEM
|
||||
@param Arg Pointer to the Arg, it's a pointer to the token to
|
||||
@param[in, out] Map Pointer to the NET_MAP.
|
||||
@param[in] Item Pointer to the NET_MAP_ITEM
|
||||
@param[in] Arg Pointer to the Arg, it's a pointer to the token to
|
||||
cancel.
|
||||
|
||||
@retval EFI_SUCCESS The Arg is NULL, and the token in Item is
|
||||
cancelled, or the Arg isn't NULL, and the token in
|
||||
Item is different from the Arg.
|
||||
@retval EFI_ABORTED The Arg isn't NULL, the token in Item mathces the
|
||||
Arg, and the token is cancelled.
|
||||
@retval EFI_SUCCESS The Arg is NULL, and the token in Item is cancelled,
|
||||
or the Arg isn't NULL, and the token in Item is
|
||||
different from the Arg.
|
||||
@retval EFI_ABORTED The Arg isn't NULL, the token in Item mathces the
|
||||
Arg, and the token is cancelled.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@ -192,8 +192,8 @@ MnpFlushRcvdDataQueue (
|
|||
/**
|
||||
Configure the Instance using ConfigData.
|
||||
|
||||
@param Instance Pointer to the mnp instance context data.
|
||||
@param ConfigData Pointer to the configuration data used to configure
|
||||
@param[in] Instance Pointer to the mnp instance context data.
|
||||
@param[in] ConfigData Pointer to the configuration data used to configure
|
||||
the isntance.
|
||||
|
||||
@retval EFI_SUCCESS The Instance is configured.
|
||||
|
@ -211,11 +211,11 @@ MnpConfigureInstance (
|
|||
/**
|
||||
Do the group operations for this instance.
|
||||
|
||||
@param Instance Pointer to the instance context data.
|
||||
@param JoinFlag Set to TRUE to join a group. Set to TRUE to leave a
|
||||
@param[in] Instance Pointer to the instance context data.
|
||||
@param[in] JoinFlag Set to TRUE to join a group. Set to TRUE to leave a
|
||||
group/groups.
|
||||
@param MacAddress Pointer to the group address to join or leave.
|
||||
@param CtrlBlk Pointer to the group control block if JoinFlag if
|
||||
@param[in] MacAddress Pointer to the group address to join or leave.
|
||||
@param[in] CtrlBlk Pointer to the group control block if JoinFlag if
|
||||
FALSE.
|
||||
|
||||
@retval EFI_SUCCESS The group operation finished.
|
||||
|
@ -226,15 +226,15 @@ EFI_STATUS
|
|||
MnpGroupOp (
|
||||
IN MNP_INSTANCE_DATA *Instance,
|
||||
IN BOOLEAN JoinFlag,
|
||||
IN EFI_MAC_ADDRESS *MacAddr OPTIONAL,
|
||||
IN EFI_MAC_ADDRESS *MacAddress OPTIONAL,
|
||||
IN MNP_GROUP_CONTROL_BLOCK *CtrlBlk OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
Validates the Mnp transmit token.
|
||||
|
||||
@param Instance Pointer to the Mnp instance context data.
|
||||
@param Token Pointer to the transmit token to check.
|
||||
@param[in] Instance Pointer to the Mnp instance context data.
|
||||
@param[in] Token Pointer to the transmit token to check.
|
||||
|
||||
@return The Token is valid or not.
|
||||
|
||||
|
@ -254,7 +254,7 @@ MnpIsValidTxToken (
|
|||
@param PktBuf Pointer to record the address of the packet.
|
||||
@param PktLen Pointer to a UINT32 variable used to record the
|
||||
packet's length.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
MnpBuildTxPacket (
|
||||
|
@ -267,10 +267,10 @@ MnpBuildTxPacket (
|
|||
/**
|
||||
Synchronously send out the packet.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Packet Pointer to the pakcet buffer.
|
||||
@param Length The length of the packet.
|
||||
@param Token Pointer to the token the packet generated from.
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] Packet Pointer to the pakcet buffer.
|
||||
@param[in] Length The length of the packet.
|
||||
@param[in] Token Pointer to the token the packet generated from.
|
||||
|
||||
@retval EFI_SUCCESS The packet is sent out.
|
||||
@retval EFI_TIMEOUT Time out occurs, the packet isn't sent.
|
||||
|
@ -288,7 +288,7 @@ MnpSyncSendPacket (
|
|||
/**
|
||||
Try to deliver the received packet to the instance.
|
||||
|
||||
@param Instance Pointer to the mnp instance context data.
|
||||
@param[in] Instance Pointer to the mnp instance context data.
|
||||
|
||||
@retval EFI_SUCCESS The received packet is delivered, or there is no
|
||||
packet to deliver, or there is no available receive
|
||||
|
@ -305,9 +305,9 @@ MnpInstanceDeliverPacket (
|
|||
Recycle the RxData and other resources used to hold and deliver the received
|
||||
packet.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registerd to the Event.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registerd to the Event.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -319,7 +319,7 @@ MnpRecycleRxData (
|
|||
/**
|
||||
Try to receive a packet and deliver it.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
|
||||
@retval EFI_SUCCESS add return value to function comment
|
||||
@retval EFI_NOT_STARTED The simple network protocol is not started.
|
||||
|
@ -337,9 +337,10 @@ MnpReceivePacket (
|
|||
in the queue, first try to allocate some and add them into the queue, then
|
||||
fetch the NET_BUF from the updated FreeNbufQue.
|
||||
|
||||
@param MnpServiceData Pointer to the MNP_SERVICE_DATA.
|
||||
@param[in] MnpServiceData Pointer to the MNP_SERVICE_DATA.
|
||||
|
||||
@return Pointer to the allocated free NET_BUF structure, if NULL the operation is failed.
|
||||
@return Pointer to the allocated free NET_BUF structure, if NULL the
|
||||
operation is failed.
|
||||
|
||||
**/
|
||||
NET_BUF *
|
||||
|
@ -352,7 +353,7 @@ MnpAllocNbuf (
|
|||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Nbuf Pointer to the NET_BUF to free.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
MnpFreeNbuf (
|
||||
|
@ -363,10 +364,10 @@ MnpFreeNbuf (
|
|||
/**
|
||||
Remove the received packets if timeout occurs.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registered to the
|
||||
event.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registered to the
|
||||
event.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -379,9 +380,9 @@ MnpCheckPacketTimeout (
|
|||
Poll to receive the packets from Snp. This function is either called by upperlayer
|
||||
protocols/applications or the system poll timer notify mechanism.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registered to the
|
||||
event.
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registered to the
|
||||
event.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -398,13 +399,13 @@ MnpSystemPoll (
|
|||
The GetModeData() function is used to read the current mode data (operational
|
||||
parameters) from the MNP or the underlying SNP.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param MnpConfigData Pointer to storage for MNP operational parameters. Type
|
||||
EFI_MANAGED_NETWORK_CONFIG_DATA is defined in "Related
|
||||
Definitions" below.
|
||||
@param SnpModeData Pointer to storage for SNP operational parameters. This
|
||||
feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE
|
||||
is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[out] MnpConfigData Pointer to storage for MNP operational parameters. Type
|
||||
EFI_MANAGED_NETWORK_CONFIG_DATA is defined in "Related
|
||||
Definitions" below.
|
||||
@param[out] SnpModeData Pointer to storage for SNP operational parameters. This
|
||||
feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE
|
||||
is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
|
@ -446,14 +447,13 @@ MnpGetModeData (
|
|||
Note: Warning: Receive filter settings that overlap will consume extra
|
||||
processor and/or DMA resources and degrade system and network performance.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param MnpConfigData Pointer to configuration data that will be assigned
|
||||
to the MNP child driver instance. If NULL, the MNP
|
||||
child driver instance is reset to startup defaults
|
||||
and all pending transmit and receive requests are
|
||||
flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is
|
||||
defined in
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] MnpConfigData Pointer to configuration data that will be assigned
|
||||
to the MNP child driver instance. If NULL, the MNP
|
||||
child driver instance is reset to startup defaults
|
||||
and all pending transmit and receive requests are
|
||||
flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is
|
||||
defined in EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is
|
||||
|
@ -493,12 +493,12 @@ MnpConfigure (
|
|||
underlying EFI_SIMPLE_NETWORK.MCastIpToMac() function, which may also be
|
||||
unsupported in some MNP implementations.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
|
||||
Set to FALSE if IpAddress is an IPv4 multicast address.
|
||||
@param IpAddress Pointer to the multicast IP address (in network byte order)
|
||||
to convert.
|
||||
@param MacAddress Pointer to the resulting multicast MAC address.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
|
||||
Set to FALSE if IpAddress is an IPv4 multicast address.
|
||||
@param[in] IpAddress Pointer to the multicast IP address (in network byte order)
|
||||
to convert.
|
||||
@param[out] MacAddress Pointer to the resulting multicast MAC address.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:
|
||||
|
@ -532,11 +532,11 @@ MnpMcastIpToMac (
|
|||
Management Protocol (IGMP) packets. If JoinFlag is FALSE and MacAddress is
|
||||
NULL, then all joined groups are left.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param JoinFlag Set to TRUE to join this multicast group.
|
||||
Set to FALSE to leave this multicast group.
|
||||
@param MacAddress Pointer to the multicast MAC group (address) to join or
|
||||
leave.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] JoinFlag Set to TRUE to join this multicast group.
|
||||
Set to FALSE to leave this multicast group.
|
||||
@param[in] MacAddress Pointer to the multicast MAC group (address) to join or
|
||||
leave.
|
||||
|
||||
@retval EFI_SUCCESS The requested operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
|
@ -582,10 +582,10 @@ MnpGroups (
|
|||
the underlying communications device and drivers.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param Token Pointer to a token associated with the transmit data
|
||||
descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN is
|
||||
defined in "Related Definitions" below.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token associated with the transmit data
|
||||
descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN is
|
||||
defined in "Related Definitions" below.
|
||||
|
||||
@retval EFI_SUCCESS The transmit completion token was cached.
|
||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
||||
|
@ -639,11 +639,11 @@ MnpTransmit (
|
|||
the asynchronous operation has completed, this function will not signal the
|
||||
token and EFI_NOT_FOUND is returned.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param Token Pointer to a token that has been issued by
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all pending
|
||||
tokens are aborted.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that has been issued by
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all pending
|
||||
tokens are aborted.
|
||||
|
||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
||||
Token.Event was signaled. When Token is NULL,
|
||||
|
@ -675,11 +675,11 @@ MnpCancel (
|
|||
updates the Token.Status and Token.RxData fields and the Token.Event is
|
||||
signaled.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param Token Pointer to a token associated with the receive
|
||||
data descriptor. Type
|
||||
EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit().
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token associated with the receive
|
||||
data descriptor. Type
|
||||
EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit().
|
||||
|
||||
@retval EFI_SUCCESS The receive completion token was cached.
|
||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
||||
|
@ -719,7 +719,7 @@ MnpReceive (
|
|||
applications that are experiencing packet loss should try calling the Poll()
|
||||
function more often.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Incoming or outgoing data was processed.
|
||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/** @file
|
||||
Implementation of Managed Network Protocol I/O functions.
|
||||
|
||||
Copyright (c) 2005 - 2007, Intel Corporation. <BR>
|
||||
Implementation of Managed Network Protocol I/O functions.
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
|
@ -22,8 +23,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
/**
|
||||
Validates the Mnp transmit token.
|
||||
|
||||
@param Instance Pointer to the Mnp instance context data.
|
||||
@param Token Pointer to the transmit token to check.
|
||||
@param[in] Instance Pointer to the Mnp instance context data.
|
||||
@param[in] Token Pointer to the transmit token to check.
|
||||
|
||||
@return The Token is valid or not.
|
||||
|
||||
|
@ -115,7 +116,7 @@ MnpIsValidTxToken (
|
|||
@param PktBuf Pointer to record the address of the packet.
|
||||
@param PktLen Pointer to a UINT32 variable used to record the
|
||||
packet's length.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
MnpBuildTxPacket (
|
||||
|
@ -179,10 +180,10 @@ MnpBuildTxPacket (
|
|||
/**
|
||||
Synchronously send out the packet.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Packet Pointer to the pakcet buffer.
|
||||
@param Length The length of the packet.
|
||||
@param Token Pointer to the token the packet generated from.
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] Packet Pointer to the pakcet buffer.
|
||||
@param[in] Length The length of the packet.
|
||||
@param[in] Token Pointer to the token the packet generated from.
|
||||
|
||||
@retval EFI_SUCCESS The packet is sent out.
|
||||
@retval EFI_TIMEOUT Time out occurs, the packet isn't sent.
|
||||
|
@ -296,7 +297,7 @@ SIGNAL_TOKEN:
|
|||
/**
|
||||
Try to deliver the received packet to the instance.
|
||||
|
||||
@param Instance Pointer to the mnp instance context data.
|
||||
@param[in] Instance Pointer to the mnp instance context data.
|
||||
|
||||
@retval EFI_SUCCESS The received packet is delivered, or there is no
|
||||
packet to deliver, or there is no available receive
|
||||
|
@ -392,8 +393,6 @@ MnpInstanceDeliverPacket (
|
|||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
MnpDeliverPacket (
|
||||
|
@ -421,9 +420,9 @@ MnpDeliverPacket (
|
|||
Recycle the RxData and other resources used to hold and deliver the received
|
||||
packet.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registerd to the Event.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registerd to the Event.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -468,12 +467,10 @@ MnpRecycleRxData (
|
|||
/**
|
||||
Queue the received packet into instance's receive queue.
|
||||
|
||||
@param Instance Pointer to the mnp instance context data.
|
||||
@param RxDataWrap Pointer to the Wrap structure containing the
|
||||
@param Instance Pointer to the mnp instance context data.
|
||||
@param RxDataWrap Pointer to the Wrap structure containing the
|
||||
received data and other information.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
MnpQueueRcvdPacket (
|
||||
|
@ -525,13 +522,13 @@ MnpQueueRcvdPacket (
|
|||
/**
|
||||
Match the received packet with the instance receive filters.
|
||||
|
||||
@param Instance Pointer to the mnp instance context data.
|
||||
@param RxData Pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA.
|
||||
@param GroupAddress Pointer to the GroupAddress, the GroupAddress is
|
||||
@param[in] Instance Pointer to the mnp instance context data.
|
||||
@param[in] RxData Pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA.
|
||||
@param[in] GroupAddress Pointer to the GroupAddress, the GroupAddress is
|
||||
non-NULL and it contains the destination multicast
|
||||
mac address of the received packet if the packet
|
||||
destinated to a multicast mac address.
|
||||
@param PktAttr The received packets attribute.
|
||||
@param[in] PktAttr The received packets attribute.
|
||||
|
||||
@return The received packet matches the instance's receive filters or not.
|
||||
|
||||
|
@ -603,18 +600,16 @@ MnpMatchPacket (
|
|||
/**
|
||||
Analyse the received packets.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Nbuf Pointer to the net buffer holding the received
|
||||
packet.
|
||||
@param RxData Pointer to the buffer used to save the analysed
|
||||
result in EFI_MANAGED_NETWORK_RECEIVE_DATA.
|
||||
@param GroupAddress Pointer to pointer to a MNP_GROUP_ADDRESS used to
|
||||
pass out the address of the multicast address the
|
||||
received packet destinated to.
|
||||
@param PktAttr Pointer to the buffer used to save the analysed
|
||||
packet attribute.
|
||||
|
||||
@return None.
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Nbuf Pointer to the net buffer holding the received
|
||||
packet.
|
||||
@param RxData Pointer to the buffer used to save the analysed
|
||||
result in EFI_MANAGED_NETWORK_RECEIVE_DATA.
|
||||
@param GroupAddress Pointer to pointer to a MNP_GROUP_ADDRESS used to
|
||||
pass out the address of the multicast address the
|
||||
received packet destinated to.
|
||||
@param PktAttr Pointer to the buffer used to save the analysed
|
||||
packet attribute.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -707,8 +702,8 @@ MnpAnalysePacket (
|
|||
/**
|
||||
Wrap the RxData.
|
||||
|
||||
@param Instance Pointer to the mnp instance context data.
|
||||
@param RxData Pointer to the receive data to wrap.
|
||||
@param[in] Instance Pointer to the mnp instance context data.
|
||||
@param[in] RxData Pointer to the receive data to wrap.
|
||||
|
||||
@return Pointer to a MNP_RXDATA_WRAP which wraps the RxData.
|
||||
|
||||
|
@ -763,11 +758,9 @@ MnpWrapRxData (
|
|||
Enqueue the received the packets to the instances belonging to the
|
||||
MnpServiceData.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Nbuf Pointer to the net buffer representing the received
|
||||
packet.
|
||||
|
||||
@return None.
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param Nbuf Pointer to the net buffer representing the received
|
||||
packet.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -840,7 +833,7 @@ MnpEnqueuePacket (
|
|||
/**
|
||||
Try to receive a packet and deliver it.
|
||||
|
||||
@param MnpServiceData Pointer to the mnp service context data.
|
||||
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||
|
||||
@retval EFI_SUCCESS add return value to function comment
|
||||
@retval EFI_NOT_STARTED The simple network protocol is not started.
|
||||
|
@ -992,10 +985,10 @@ EXIT:
|
|||
/**
|
||||
Remove the received packets if timeout occurs.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registered to the
|
||||
event.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registered to the
|
||||
event.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@ -1059,9 +1052,9 @@ MnpCheckPacketTimeout (
|
|||
Poll to receive the packets from Snp. This function is either called by upperlayer
|
||||
protocols/applications or the system poll timer notify mechanism.
|
||||
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registered to the
|
||||
event.
|
||||
@param Event The event this notify function registered to.
|
||||
@param Context Pointer to the context data registered to the
|
||||
event.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/** @file
|
||||
Implementation of Managed Network Protocol public services.
|
||||
Implementation of Managed Network Protocol public services.
|
||||
|
||||
Copyright (c) 2005 - 2007, Intel Corporation.<BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
|
@ -24,13 +25,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
The GetModeData() function is used to read the current mode data (operational
|
||||
parameters) from the MNP or the underlying SNP.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param MnpConfigData Pointer to storage for MNP operational parameters. Type
|
||||
EFI_MANAGED_NETWORK_CONFIG_DATA is defined in "Related
|
||||
Definitions" below.
|
||||
@param SnpModeData Pointer to storage for SNP operational parameters. This
|
||||
feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE
|
||||
is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[out] MnpConfigData Pointer to storage for MNP operational parameters. Type
|
||||
EFI_MANAGED_NETWORK_CONFIG_DATA is defined in "Related
|
||||
Definitions" below.
|
||||
@param[out] SnpModeData Pointer to storage for SNP operational parameters. This
|
||||
feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE
|
||||
is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
|
@ -113,14 +114,13 @@ MnpGetModeData (
|
|||
Note: Warning: Receive filter settings that overlap will consume extra
|
||||
processor and/or DMA resources and degrade system and network performance.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param MnpConfigData Pointer to configuration data that will be assigned
|
||||
to the MNP child driver instance. If NULL, the MNP
|
||||
child driver instance is reset to startup defaults
|
||||
and all pending transmit and receive requests are
|
||||
flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is
|
||||
defined in
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] MnpConfigData Pointer to configuration data that will be assigned
|
||||
to the MNP child driver instance. If NULL, the MNP
|
||||
child driver instance is reset to startup defaults
|
||||
and all pending transmit and receive requests are
|
||||
flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is
|
||||
defined in EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is
|
||||
|
@ -196,12 +196,12 @@ ON_EXIT:
|
|||
underlying EFI_SIMPLE_NETWORK.MCastIpToMac() function, which may also be
|
||||
unsupported in some MNP implementations.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
|
||||
Set to FALSE if IpAddress is an IPv4 multicast address.
|
||||
@param IpAddress Pointer to the multicast IP address (in network byte order)
|
||||
to convert.
|
||||
@param MacAddress Pointer to the resulting multicast MAC address.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
|
||||
Set to FALSE if IpAddress is an IPv4 multicast address.
|
||||
@param[in] IpAddress Pointer to the multicast IP address (in network byte order)
|
||||
to convert.
|
||||
@param[out] MacAddress Pointer to the resulting multicast MAC address.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:
|
||||
|
@ -303,11 +303,11 @@ ON_EXIT:
|
|||
Management Protocol (IGMP) packets. If JoinFlag is FALSE and MacAddress is
|
||||
NULL, then all joined groups are left.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param JoinFlag Set to TRUE to join this multicast group.
|
||||
Set to FALSE to leave this multicast group.
|
||||
@param MacAddress Pointer to the multicast MAC group (address) to join or
|
||||
leave.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] JoinFlag Set to TRUE to join this multicast group.
|
||||
Set to FALSE to leave this multicast group.
|
||||
@param[in] MacAddress Pointer to the multicast MAC group (address) to join or
|
||||
leave.
|
||||
|
||||
@retval EFI_SUCCESS The requested operation completed successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
|
@ -455,10 +455,10 @@ ON_EXIT:
|
|||
the underlying communications device and drivers.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param Token Pointer to a token associated with the transmit data
|
||||
descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN is
|
||||
defined in "Related Definitions" below.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token associated with the transmit data
|
||||
descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN is
|
||||
defined in "Related Definitions" below.
|
||||
|
||||
@retval EFI_SUCCESS The transmit completion token was cached.
|
||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
||||
|
@ -562,11 +562,11 @@ ON_EXIT:
|
|||
updates the Token.Status and Token.RxData fields and the Token.Event is
|
||||
signaled.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param Token Pointer to a token associated with the receive
|
||||
data descriptor. Type
|
||||
EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit().
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token associated with the receive
|
||||
data descriptor. Type
|
||||
EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit().
|
||||
|
||||
@retval EFI_SUCCESS The receive completion token was cached.
|
||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
||||
|
@ -655,11 +655,11 @@ ON_EXIT:
|
|||
the asynchronous operation has completed, this function will not signal the
|
||||
token and EFI_NOT_FOUND is returned.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param Token Pointer to a token that has been issued by
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all pending
|
||||
tokens are aborted.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that has been issued by
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
|
||||
EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all pending
|
||||
tokens are aborted.
|
||||
|
||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
||||
Token.Event was signaled. When Token is NULL,
|
||||
|
@ -733,7 +733,7 @@ ON_EXIT:
|
|||
applications that are experiencing packet loss should try calling the Poll()
|
||||
function more often.
|
||||
|
||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Incoming or outgoing data was processed.
|
||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
||||
|
|
|
@ -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 @@ UdpComponentNameGetDriverName (
|
|||
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 @@ UdpComponentNameGetDriverName (
|
|||
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 @@ UdpComponentNameGetDriverName (
|
|||
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 mUdpDriverNameTable[] = {
|
|||
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 mUdpDriverNameTable[] = {
|
|||
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 @@ UdpComponentNameGetDriverName (
|
|||
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 @@ UdpComponentNameGetDriverName (
|
|||
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 @@ UdpComponentNameGetDriverName (
|
|||
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, Intel Corporation
|
||||
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,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:
|
||||
|
||||
Udp4Driver.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
|
||||
|
@ -44,10 +37,10 @@ EFI_SERVICE_BINDING_PROTOCOL mUdp4ServiceBinding = {
|
|||
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
|
||||
|
@ -103,10 +96,10 @@ Udp4DriverBindingSupported (
|
|||
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
|
||||
|
@ -166,11 +159,11 @@ Udp4DriverBindingStart (
|
|||
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
|
||||
|
@ -244,14 +237,18 @@ Udp4DriverBindingStop (
|
|||
|
||||
|
||||
/**
|
||||
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
|
||||
|
@ -362,17 +359,20 @@ ON_ERROR:
|
|||
|
||||
|
||||
/**
|
||||
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
|
||||
|
||||
**/
|
||||
|
@ -483,8 +483,8 @@ Udp4ServiceBindingDestroyChild (
|
|||
The entry point for Udp4 driver which installs the driver binding
|
||||
and component name protocol on its ImageHandle.
|
||||
|
||||
@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.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
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,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:
|
||||
|
||||
Udp4Driver.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _UDP4_DRIVER_H_
|
||||
|
@ -35,10 +28,10 @@ Abstract:
|
|||
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
|
||||
|
@ -61,10 +54,10 @@ Udp4DriverBindingSupported (
|
|||
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
|
||||
|
@ -87,11 +80,11 @@ Udp4DriverBindingStart (
|
|||
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
|
||||
|
@ -107,14 +100,18 @@ Udp4DriverBindingStop (
|
|||
);
|
||||
|
||||
/**
|
||||
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
|
||||
|
@ -129,17 +126,20 @@ Udp4ServiceBindingCreateChild (
|
|||
);
|
||||
|
||||
/**
|
||||
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
|
||||
The implementation of the Udp4 protocol.
|
||||
|
||||
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:
|
||||
|
||||
Udp4Impl.c
|
||||
|
||||
Abstract:
|
||||
|
||||
The implementation of the Udp4 protocol.
|
||||
|
||||
|
||||
**/
|
||||
|
||||
|
||||
|
@ -29,11 +21,9 @@ UINT16 mUdp4RandomPort;
|
|||
This function checks and timeouts the I/O datagrams holding by the corresponding
|
||||
service context.
|
||||
|
||||
@param Event The event this function registered to.
|
||||
@param Context The context data registered during the creation of
|
||||
the Event.
|
||||
|
||||
@return None.
|
||||
@param[in] Event The event this function registered to.
|
||||
@param[in] Context The context data registered during the creation of
|
||||
the Event.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -46,10 +36,10 @@ Udp4CheckTimeout (
|
|||
/**
|
||||
This function finds the udp instance by the specified <Address, Port> pair.
|
||||
|
||||
@param InstanceList Pointer to the head of the list linking the udp
|
||||
instances.
|
||||
@param Address Pointer to the specified IPv4 address.
|
||||
@param Port The udp port number.
|
||||
@param[in] InstanceList Pointer to the head of the list linking the udp
|
||||
instances.
|
||||
@param[in] Address Pointer to the specified IPv4 address.
|
||||
@param[in] Port The udp port number.
|
||||
|
||||
@retval TRUE The specified <Address, Port> pair is found.
|
||||
@retval FALSE Otherwise.
|
||||
|
@ -67,12 +57,10 @@ Udp4FindInstanceByPort (
|
|||
interface. It's called to signal the udp TxToken when IpIo layer completes the
|
||||
transmitting of the udp datagram.
|
||||
|
||||
@param Status The completion status of the output udp datagram.
|
||||
@param Context Pointer to the context data.
|
||||
@param Sender Pointer to the Ip sender of the udp datagram.
|
||||
@param NotifyData Pointer to the notify data.
|
||||
|
||||
@return None.
|
||||
@param[in] Status The completion status of the output udp datagram.
|
||||
@param[in] Context Pointer to the context data.
|
||||
@param[in] Sender Pointer to the Ip sender of the udp datagram.
|
||||
@param[in] NotifyData Pointer to the notify data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -86,15 +74,13 @@ Udp4DgramSent (
|
|||
/**
|
||||
This function processes the received datagram passed up by the IpIo layer.
|
||||
|
||||
@param Status The status of this udp datagram.
|
||||
@param IcmpError The IcmpError code, only available when Status is
|
||||
@param[in] Status The status of this udp datagram.
|
||||
@param[in] IcmpError The IcmpError code, only available when Status is
|
||||
EFI_ICMP_ERROR.
|
||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA.
|
||||
@param Packet Pointer to the NET_BUF containing the received udp
|
||||
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA.
|
||||
@param[in] Packet Pointer to the NET_BUF containing the received udp
|
||||
datagram.
|
||||
@param Context Pointer to the context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Context Pointer to the context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -110,9 +96,9 @@ Udp4DgramRcvd (
|
|||
This function cancels the token specified by Arg in the Map. This is a callback
|
||||
used by Udp4InstanceCancelToken().
|
||||
|
||||
@param Map Pointer to the NET_MAP.
|
||||
@param Item Pointer to the NET_MAP_ITEM.
|
||||
@param Arg Pointer to the token to be cancelled, if NULL,
|
||||
@param[in] Map Pointer to the NET_MAP.
|
||||
@param[in] Item Pointer to the NET_MAP_ITEM.
|
||||
@param[in] Arg Pointer to the token to be cancelled, if NULL,
|
||||
the token specified by Item is cancelled.
|
||||
|
||||
@retval EFI_SUCCESS The token is cancelled if Arg is NULL or the token
|
||||
|
@ -132,8 +118,8 @@ Udp4CancelTokens (
|
|||
/**
|
||||
This function matches the received udp datagram with the Instance.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
@param Udp4Session Pointer to the EFI_UDP4_SESSION_DATA abstracted
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
@param[in] Udp4Session Pointer to the EFI_UDP4_SESSION_DATA abstracted
|
||||
from the received udp datagram.
|
||||
|
||||
@retval TRUE The udp datagram matches the receiving requirments of the
|
||||
|
@ -150,10 +136,8 @@ Udp4MatchDgram (
|
|||
/**
|
||||
This function removes the Wrap specified by Context and release relevant resources.
|
||||
|
||||
@param Event The Event this notify function registered to.
|
||||
@param Context Pointer to the context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Event The Event this notify function registered to.
|
||||
@param[in] Context Pointer to the context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -166,11 +150,11 @@ Udp4RecycleRxDataWrap (
|
|||
/**
|
||||
This function wraps the Packet and the RxData.
|
||||
|
||||
@param Instance Pointer to the instance context data.
|
||||
@param Packet Pointer to the buffer containing the received
|
||||
datagram.
|
||||
@param RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||
datagram.
|
||||
@param[in] Instance Pointer to the instance context data.
|
||||
@param[in] Packet Pointer to the buffer containing the received
|
||||
datagram.
|
||||
@param[in] RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||
datagram.
|
||||
|
||||
@return Pointer to the structure wrapping the RxData and the Packet.
|
||||
|
||||
|
@ -185,11 +169,11 @@ Udp4WrapRxData (
|
|||
/**
|
||||
This function enqueues the received datagram into the instances' receiving queues.
|
||||
|
||||
@param Udp4Service Pointer to the udp service context data.
|
||||
@param Packet Pointer to the buffer containing the received
|
||||
datagram.
|
||||
@param RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||
datagram.
|
||||
@param[in] Udp4Service Pointer to the udp service context data.
|
||||
@param[in] Packet Pointer to the buffer containing the received
|
||||
datagram.
|
||||
@param[in] RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||
datagram.
|
||||
|
||||
@return The times this datagram is enqueued.
|
||||
|
||||
|
@ -204,9 +188,7 @@ Udp4EnqueueDgram (
|
|||
/**
|
||||
This function delivers the datagrams enqueued in the instances.
|
||||
|
||||
@param Udp4Service Pointer to the udp service context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Udp4Service Pointer to the udp service context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -217,13 +199,11 @@ Udp4DeliverDgram (
|
|||
/**
|
||||
This function demultiplexes the received udp datagram to the apropriate instances.
|
||||
|
||||
@param Udp4Service Pointer to the udp service context data.
|
||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA abstrated from
|
||||
the received datagram.
|
||||
@param Packet Pointer to the buffer containing the received udp
|
||||
datagram.
|
||||
|
||||
@return None.
|
||||
@param[in] Udp4Service Pointer to the udp service context data.
|
||||
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA abstrated from
|
||||
the received datagram.
|
||||
@param[in] Packet Pointer to the buffer containing the received udp
|
||||
datagram.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -237,13 +217,11 @@ Udp4Demultiplex (
|
|||
This function handles the received Icmp Error message and demultiplexes it to the
|
||||
instance.
|
||||
|
||||
@param Udp4Service Pointer to the udp service context data.
|
||||
@param IcmpError The icmp error code.
|
||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA abstracted
|
||||
@param[in] Udp4Service Pointer to the udp service context data.
|
||||
@param[in] IcmpError The icmp error code.
|
||||
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA abstracted
|
||||
from the received Icmp Error packet.
|
||||
@param Packet Pointer to the Icmp Error packet.
|
||||
|
||||
@return None.
|
||||
@param[in] Packet Pointer to the Icmp Error packet.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -257,13 +235,11 @@ Udp4IcmpHandler (
|
|||
/**
|
||||
This function builds and sends out a icmp port unreachable message.
|
||||
|
||||
@param IpIo Pointer to the IP_IO instance.
|
||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA of the packet
|
||||
causes this icmp error message.
|
||||
@param Udp4Header Pointer to the udp header of the datagram causes
|
||||
this icmp error message.
|
||||
|
||||
@return None.
|
||||
@param[in] IpIo Pointer to the IP_IO instance.
|
||||
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA of the packet
|
||||
causes this icmp error message.
|
||||
@param[in] Udp4Header Pointer to the udp header of the datagram causes
|
||||
this icmp error message.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -376,9 +352,7 @@ ON_ERROR:
|
|||
/**
|
||||
Clean the Udp service context data.
|
||||
|
||||
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||
|
||||
@return None.
|
||||
@param[in] Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -407,11 +381,9 @@ Udp4CleanService (
|
|||
This function checks and timeouts the I/O datagrams holding by the corresponding
|
||||
service context.
|
||||
|
||||
@param Event The event this function registered to.
|
||||
@param Context The context data registered during the creation of
|
||||
the Event.
|
||||
|
||||
@return None.
|
||||
@param[in] Event The event this function registered to.
|
||||
@param[in] Context The context data registered during the creation of
|
||||
the Event.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -473,8 +445,6 @@ Udp4CheckTimeout (
|
|||
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||
@param Instance Pointer to the un-initialized UDP4_INSTANCE_DATA.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
Udp4InitInstance (
|
||||
|
@ -516,9 +486,7 @@ Udp4InitInstance (
|
|||
/**
|
||||
This function cleans the udp instance.
|
||||
|
||||
@param Instance Pointer to the UDP4_INSTANCE_DATA to clean.
|
||||
|
||||
@return None.
|
||||
@param[in] Instance Pointer to the UDP4_INSTANCE_DATA to clean.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -535,10 +503,10 @@ Udp4CleanInstance (
|
|||
/**
|
||||
This function finds the udp instance by the specified <Address, Port> pair.
|
||||
|
||||
@param InstanceList Pointer to the head of the list linking the udp
|
||||
instances.
|
||||
@param Address Pointer to the specified IPv4 address.
|
||||
@param Port The udp port number.
|
||||
@param[in] InstanceList Pointer to the head of the list linking the udp
|
||||
instances.
|
||||
@param[in] Address Pointer to the specified IPv4 address.
|
||||
@param[in] Port The udp port number.
|
||||
|
||||
@retval TRUE The specified <Address, Port> pair is found.
|
||||
@retval FALSE Otherwise.
|
||||
|
@ -672,9 +640,9 @@ Udp4Bind (
|
|||
This function is used to check whether the NewConfigData has any un-reconfigurable
|
||||
parameters changed compared to the OldConfigData.
|
||||
|
||||
@param OldConfigData Pointer to the current ConfigData the udp instance
|
||||
@param[in] OldConfigData Pointer to the current ConfigData the udp instance
|
||||
uses.
|
||||
@param NewConfigData Pointer to the new ConfigData.
|
||||
@param[in] NewConfigData Pointer to the new ConfigData.
|
||||
|
||||
@retval TRUE The instance is reconfigurable.
|
||||
@retval FALSE Otherwise.
|
||||
|
@ -753,10 +721,8 @@ Udp4IsReconfigurable (
|
|||
/**
|
||||
This function builds the Ip4 configdata from the Udp4ConfigData.
|
||||
|
||||
@param Udp4ConfigData Pointer to the EFI_UDP4_CONFIG_DATA.
|
||||
@param Ip4ConfigData Pointer to the EFI_IP4_CONFIG_DATA.
|
||||
|
||||
@return None.
|
||||
@param[in] Udp4ConfigData Pointer to the EFI_UDP4_CONFIG_DATA.
|
||||
@param[in, out] Ip4ConfigData Pointer to the EFI_IP4_CONFIG_DATA.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -784,8 +750,8 @@ Udp4BuildIp4ConfigData (
|
|||
/**
|
||||
This function validates the TxToken, it returns the error code according to the spec.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
@param TxToken Pointer to the token to be checked.
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
@param[in] TxToken Pointer to the token to be checked.
|
||||
|
||||
@retval EFI_SUCCESS The TxToken is valid.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE: This is
|
||||
|
@ -911,10 +877,10 @@ Udp4ValidateTxToken (
|
|||
/**
|
||||
This function checks whether the specified Token duplicates with the one in the Map.
|
||||
|
||||
@param Map Pointer to the NET_MAP.
|
||||
@param Item Pointer to the NET_MAP_ITEM contain the pointer to
|
||||
@param[in] Map Pointer to the NET_MAP.
|
||||
@param[in] Item Pointer to the NET_MAP_ITEM contain the pointer to
|
||||
the Token.
|
||||
@param Context Pointer to the Token to be checked.
|
||||
@param[in] Context Pointer to the Token to be checked.
|
||||
|
||||
@retval EFI_SUCCESS The Token specified by Context differs from the
|
||||
one in the Item.
|
||||
|
@ -950,11 +916,11 @@ Udp4TokenExist (
|
|||
This function calculates the checksum for the Packet, utilizing the pre-calculated
|
||||
pseudo HeadSum to reduce some overhead.
|
||||
|
||||
@param Packet Pointer to the NET_BUF contains the udp datagram.
|
||||
@param HeadSum Checksum of the pseudo header execpt the length
|
||||
@param[in] Packet Pointer to the NET_BUF contains the udp datagram.
|
||||
@param[in] HeadSum Checksum of the pseudo header execpt the length
|
||||
field.
|
||||
|
||||
@return The 16-bit checksum of this udp datagram.
|
||||
@retval The 16-bit checksum of this udp datagram.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
|
@ -977,8 +943,8 @@ Udp4Checksum (
|
|||
/**
|
||||
This function removes the specified Token from the TokenMap.
|
||||
|
||||
@param TokenMap Pointer to the NET_MAP containing the tokens.
|
||||
@param Token Pointer to the Token to be removed.
|
||||
@param TokenMap Pointer to the NET_MAP containing the tokens.
|
||||
@param Token Pointer to the Token to be removed.
|
||||
|
||||
@retval EFI_SUCCESS The specified Token is removed from the TokenMap.
|
||||
@retval EFI_NOT_FOUND The specified Token is not found in the TokenMap.
|
||||
|
@ -1015,12 +981,10 @@ Udp4RemoveToken (
|
|||
interface. It's called to signal the udp TxToken when IpIo layer completes the
|
||||
transmitting of the udp datagram.
|
||||
|
||||
@param Status The completion status of the output udp datagram.
|
||||
@param Context Pointer to the context data.
|
||||
@param Sender Pointer to the Ip sender of the udp datagram.
|
||||
@param NotifyData Pointer to the notify data.
|
||||
|
||||
@return None.
|
||||
@param[in] Status The completion status of the output udp datagram.
|
||||
@param[in] Context Pointer to the context data.
|
||||
@param[in] Sender Pointer to the Ip sender of the udp datagram.
|
||||
@param[in] NotifyData Pointer to the notify data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1051,15 +1015,13 @@ Udp4DgramSent (
|
|||
/**
|
||||
This function processes the received datagram passed up by the IpIo layer.
|
||||
|
||||
@param Status The status of this udp datagram.
|
||||
@param IcmpError The IcmpError code, only available when Status is
|
||||
@param[in] Status The status of this udp datagram.
|
||||
@param[in] IcmpError The IcmpError code, only available when Status is
|
||||
EFI_ICMP_ERROR.
|
||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA.
|
||||
@param Packet Pointer to the NET_BUF containing the received udp
|
||||
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA.
|
||||
@param[in] Packet Pointer to the NET_BUF containing the received udp
|
||||
datagram.
|
||||
@param Context Pointer to the context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Context Pointer to the context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1148,9 +1110,9 @@ Udp4LeaveGroup (
|
|||
This function cancels the token specified by Arg in the Map. This is a callback
|
||||
used by Udp4InstanceCancelToken().
|
||||
|
||||
@param Map Pointer to the NET_MAP.
|
||||
@param Item Pointer to the NET_MAP_ITEM.
|
||||
@param Arg Pointer to the token to be cancelled, if NULL,
|
||||
@param[in] Map Pointer to the NET_MAP.
|
||||
@param[in] Item Pointer to the NET_MAP_ITEM.
|
||||
@param[in] Arg Pointer to the token to be cancelled, if NULL,
|
||||
the token specified by Item is cancelled.
|
||||
|
||||
@retval EFI_SUCCESS The token is cancelled if Arg is NULL or the token
|
||||
|
@ -1208,9 +1170,7 @@ Udp4CancelTokens (
|
|||
/**
|
||||
This function removes all the Wrap datas in the RcvdDgramQue.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1238,8 +1198,8 @@ Udp4FlushRcvdDgram (
|
|||
/**
|
||||
Cancel Udp4 tokens from the Udp4 instance.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
@param Token Pointer to the token to be canceled, if NULL, all
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
@param[in] Token Pointer to the token to be canceled, if NULL, all
|
||||
tokens in this instance will be cancelled.
|
||||
|
||||
@retval EFI_SUCCESS The Token is cancelled.
|
||||
|
@ -1291,8 +1251,8 @@ Udp4InstanceCancelToken (
|
|||
/**
|
||||
This function matches the received udp datagram with the Instance.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
@param Udp4Session Pointer to the EFI_UDP4_SESSION_DATA abstracted
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
@param[in] Udp4Session Pointer to the EFI_UDP4_SESSION_DATA abstracted
|
||||
from the received udp datagram.
|
||||
|
||||
@retval TRUE The udp datagram matches the receiving requirments of the
|
||||
|
@ -1371,10 +1331,8 @@ Udp4MatchDgram (
|
|||
/**
|
||||
This function removes the Wrap specified by Context and release relevant resources.
|
||||
|
||||
@param Event The Event this notify function registered to.
|
||||
@param Context Pointer to the context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Event The Event this notify function registered to.
|
||||
@param[in] Context Pointer to the context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1410,11 +1368,11 @@ Udp4RecycleRxDataWrap (
|
|||
/**
|
||||
This function wraps the Packet and the RxData.
|
||||
|
||||
@param Instance Pointer to the instance context data.
|
||||
@param Packet Pointer to the buffer containing the received
|
||||
datagram.
|
||||
@param RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||
datagram.
|
||||
@param[in] Instance Pointer to the instance context data.
|
||||
@param[in] Packet Pointer to the buffer containing the received
|
||||
datagram.
|
||||
@param[in] RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||
datagram.
|
||||
|
||||
@return Pointer to the structure wrapping the RxData and the Packet.
|
||||
|
||||
|
@ -1467,11 +1425,11 @@ Udp4WrapRxData (
|
|||
/**
|
||||
This function enqueues the received datagram into the instances' receiving queues.
|
||||
|
||||
@param Udp4Service Pointer to the udp service context data.
|
||||
@param Packet Pointer to the buffer containing the received
|
||||
datagram.
|
||||
@param RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||
datagram.
|
||||
@param[in] Udp4Service Pointer to the udp service context data.
|
||||
@param[in] Packet Pointer to the buffer containing the received
|
||||
datagram.
|
||||
@param[in] RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||
datagram.
|
||||
|
||||
@return The times this datagram is enqueued.
|
||||
|
||||
|
@ -1524,9 +1482,7 @@ Udp4EnqueueDgram (
|
|||
/**
|
||||
This function delivers the received datagrams for the specified instance.
|
||||
|
||||
@param Instance Pointer to the instance context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Instance Pointer to the instance context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1590,9 +1546,7 @@ Udp4InstanceDeliverDgram (
|
|||
/**
|
||||
This function delivers the datagrams enqueued in the instances.
|
||||
|
||||
@param Udp4Service Pointer to the udp service context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Udp4Service Pointer to the udp service context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1624,13 +1578,11 @@ Udp4DeliverDgram (
|
|||
/**
|
||||
This function demultiplexes the received udp datagram to the apropriate instances.
|
||||
|
||||
@param Udp4Service Pointer to the udp service context data.
|
||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA abstrated from
|
||||
the received datagram.
|
||||
@param Packet Pointer to the buffer containing the received udp
|
||||
datagram.
|
||||
|
||||
@return None.
|
||||
@param[in] Udp4Service Pointer to the udp service context data.
|
||||
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA abstrated from
|
||||
the received datagram.
|
||||
@param[in] Packet Pointer to the buffer containing the received udp
|
||||
datagram.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1715,13 +1667,11 @@ Udp4Demultiplex (
|
|||
/**
|
||||
This function builds and sends out a icmp port unreachable message.
|
||||
|
||||
@param IpIo Pointer to the IP_IO instance.
|
||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA of the packet
|
||||
causes this icmp error message.
|
||||
@param Udp4Header Pointer to the udp header of the datagram causes
|
||||
this icmp error message.
|
||||
|
||||
@return None.
|
||||
@param[in] IpIo Pointer to the IP_IO instance.
|
||||
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA of the packet
|
||||
causes this icmp error message.
|
||||
@param[in] Udp4Header Pointer to the udp header of the datagram causes
|
||||
this icmp error message.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1817,13 +1767,11 @@ Udp4SendPortUnreach (
|
|||
This function handles the received Icmp Error message and demultiplexes it to the
|
||||
instance.
|
||||
|
||||
@param Udp4Service Pointer to the udp service context data.
|
||||
@param IcmpError The icmp error code.
|
||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA abstracted
|
||||
@param[in] Udp4Service Pointer to the udp service context data.
|
||||
@param[in] IcmpError The icmp error code.
|
||||
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA abstracted
|
||||
from the received Icmp Error packet.
|
||||
@param Packet Pointer to the Icmp Error packet.
|
||||
|
||||
@return None.
|
||||
@param[in] Packet Pointer to the Icmp Error packet.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1892,9 +1840,7 @@ Udp4IcmpHandler (
|
|||
/**
|
||||
This function reports the received ICMP error.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -1937,9 +1883,7 @@ Udp4ReportIcmpError (
|
|||
This function is a dummy ext-free function for the NET_BUF created for the output
|
||||
udp datagram.
|
||||
|
||||
@param Context Pointer to the context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Context Pointer to the context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -2089,9 +2033,7 @@ ON_ERROR:
|
|||
/**
|
||||
Clear the variable and free the resource.
|
||||
|
||||
@param Udp4Service Udp4 service data.
|
||||
|
||||
@return None.
|
||||
@param[[in] Udp4Service Udp4 service data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
EFI UDPv4 protocol implementation.
|
||||
|
||||
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,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:
|
||||
|
||||
Udp4Impl.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI UDPv4 protocol implementation
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _UDP4_IMPL_H_
|
||||
|
@ -171,8 +163,8 @@ Udp4GetModeData (
|
|||
With different parameters in UdpConfigData, Configure() can be used to bind
|
||||
this instance to specified port.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param UdpConfigData Pointer to the buffer to receive the current configuration data.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] UdpConfigData Pointer to the buffer to receive the current configuration data.
|
||||
|
||||
@retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
|
||||
|
@ -203,10 +195,10 @@ Udp4Configure (
|
|||
filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all
|
||||
currently joined groups are left.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one
|
||||
or all multicast groups.
|
||||
@param MulticastAddress Pointer to multicast group address to join or leave.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one
|
||||
or all multicast groups.
|
||||
@param[in] MulticastAddress Pointer to multicast group address to join or leave.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.
|
||||
|
@ -254,12 +246,12 @@ Udp4Groups (
|
|||
copies will be updated automatically whenever the IP driver reconfigures its
|
||||
instances; as a result, the previous modification to these copies will be lost.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param DeleteRoute Set to TRUE to delete this route from the routing table.
|
||||
Set to FALSE to add this route to the routing table.
|
||||
@param SubnetAddress The destination network address that needs to be routed.
|
||||
@param SubnetMask The subnet mask of SubnetAddress.
|
||||
@param GatewayAddress The gateway IP address for this route.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] DeleteRoute Set to TRUE to delete this route from the routing table.
|
||||
Set to FALSE to add this route to the routing table.
|
||||
@param[in] SubnetAddress The destination network address that needs to be routed.
|
||||
@param[in] SubnetMask The subnet mask of SubnetAddress.
|
||||
@param[in] GatewayAddress The gateway IP address for this route.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.
|
||||
|
@ -291,9 +283,9 @@ Udp4Routes (
|
|||
and context for the event will enable the user to receive the notification and
|
||||
transmitting status.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param Token Pointer to the completion token that will be placed into the
|
||||
transmit queue.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to the completion token that will be placed into the
|
||||
transmit queue.
|
||||
|
||||
@retval EFI_SUCCESS The data has been queued for transmission.
|
||||
@retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.
|
||||
|
@ -330,9 +322,9 @@ Udp4Transmit (
|
|||
will enable the user to receive the notification and receiving status. That
|
||||
notification function is guaranteed to not be re-entered.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param Token Pointer to a token that is associated with the receive data
|
||||
descriptor.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that is associated with
|
||||
the receive data descriptor.
|
||||
|
||||
@retval EFI_SUCCESS The receive completion token was cached.
|
||||
@retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.
|
||||
|
@ -364,11 +356,11 @@ Udp4Receive (
|
|||
the asynchronous operation has completed, this function will not signal the
|
||||
token and EFI_NOT_FOUND is returned.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param Token Pointer to a token that has been issued by
|
||||
EFI_UDP4_PROTOCOL.Transmit() or
|
||||
EFI_UDP4_PROTOCOL.Receive().If NULL, all pending
|
||||
tokens are aborted.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that has been issued by
|
||||
EFI_UDP4_PROTOCOL.Transmit() or
|
||||
EFI_UDP4_PROTOCOL.Receive().If NULL, all pending
|
||||
tokens are aborted.
|
||||
|
||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event
|
||||
was signaled. When Token is NULL, all pending requests are
|
||||
|
@ -401,7 +393,7 @@ Udp4Cancel (
|
|||
Drivers and applications that are experiencing packet loss should try calling
|
||||
the Poll() function more often.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Incoming or outgoing data was processed.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
|
@ -438,9 +430,7 @@ Udp4CreateService (
|
|||
/**
|
||||
Clean the Udp service context data.
|
||||
|
||||
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||
|
||||
@return None.
|
||||
@param[in] Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -454,8 +444,6 @@ Udp4CleanService (
|
|||
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||
@param Instance Pointer to the un-initialized UDP4_INSTANCE_DATA.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
Udp4InitInstance (
|
||||
|
@ -466,9 +454,7 @@ Udp4InitInstance (
|
|||
/**
|
||||
This function cleans the udp instance.
|
||||
|
||||
@param Instance Pointer to the UDP4_INSTANCE_DATA to clean.
|
||||
|
||||
@return None.
|
||||
@param[in] Instance Pointer to the UDP4_INSTANCE_DATA to clean.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -502,9 +488,9 @@ Udp4Bind (
|
|||
This function is used to check whether the NewConfigData has any un-reconfigurable
|
||||
parameters changed compared to the OldConfigData.
|
||||
|
||||
@param OldConfigData Pointer to the current ConfigData the udp instance
|
||||
@param[in] OldConfigData Pointer to the current ConfigData the udp instance
|
||||
uses.
|
||||
@param NewConfigData Pointer to the new ConfigData.
|
||||
@param[in] NewConfigData Pointer to the new ConfigData.
|
||||
|
||||
@retval TRUE The instance is reconfigurable.
|
||||
@retval FALSE Otherwise.
|
||||
|
@ -519,10 +505,8 @@ Udp4IsReconfigurable (
|
|||
/**
|
||||
This function builds the Ip4 configdata from the Udp4ConfigData.
|
||||
|
||||
@param Udp4ConfigData Pointer to the EFI_UDP4_CONFIG_DATA.
|
||||
@param Ip4ConfigData Pointer to the EFI_IP4_CONFIG_DATA.
|
||||
|
||||
@return None.
|
||||
@param[in] Udp4ConfigData Pointer to the EFI_UDP4_CONFIG_DATA.
|
||||
@param[in, out] Ip4ConfigData Pointer to the EFI_IP4_CONFIG_DATA.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -534,8 +518,8 @@ Udp4BuildIp4ConfigData (
|
|||
/**
|
||||
This function validates the TxToken, it returns the error code according to the spec.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
@param TxToken Pointer to the token to be checked.
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
@param[in] TxToken Pointer to the token to be checked.
|
||||
|
||||
@retval EFI_SUCCESS The TxToken is valid.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE: This is
|
||||
|
@ -566,10 +550,10 @@ Udp4ValidateTxToken (
|
|||
/**
|
||||
This function checks whether the specified Token duplicates with the one in the Map.
|
||||
|
||||
@param Map Pointer to the NET_MAP.
|
||||
@param Item Pointer to the NET_MAP_ITEM contain the pointer to
|
||||
@param[in] Map Pointer to the NET_MAP.
|
||||
@param[in] Item Pointer to the NET_MAP_ITEM contain the pointer to
|
||||
the Token.
|
||||
@param Context Pointer to the Token to be checked.
|
||||
@param[in] Context Pointer to the Token to be checked.
|
||||
|
||||
@retval EFI_SUCCESS The Token specified by Context differs from the
|
||||
one in the Item.
|
||||
|
@ -587,11 +571,11 @@ Udp4TokenExist (
|
|||
This function calculates the checksum for the Packet, utilizing the pre-calculated
|
||||
pseudo HeadSum to reduce some overhead.
|
||||
|
||||
@param Packet Pointer to the NET_BUF contains the udp datagram.
|
||||
@param HeadSum Checksum of the pseudo header execpt the length
|
||||
@param[in] Packet Pointer to the NET_BUF contains the udp datagram.
|
||||
@param[in] HeadSum Checksum of the pseudo header execpt the length
|
||||
field.
|
||||
|
||||
@return The 16-bit checksum of this udp datagram.
|
||||
@retval The 16-bit checksum of this udp datagram.
|
||||
|
||||
**/
|
||||
UINT16
|
||||
|
@ -603,8 +587,8 @@ Udp4Checksum (
|
|||
/**
|
||||
This function removes the specified Token from the TokenMap.
|
||||
|
||||
@param TokenMap Pointer to the NET_MAP containing the tokens.
|
||||
@param Token Pointer to the Token to be removed.
|
||||
@param TokenMap Pointer to the NET_MAP containing the tokens.
|
||||
@param Token Pointer to the Token to be removed.
|
||||
|
||||
@retval EFI_SUCCESS The specified Token is removed from the TokenMap.
|
||||
@retval EFI_NOT_FOUND The specified Token is not found in the TokenMap.
|
||||
|
@ -639,9 +623,7 @@ Udp4LeaveGroup (
|
|||
/**
|
||||
This function removes all the Wrap datas in the RcvdDgramQue.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -652,8 +634,8 @@ Udp4FlushRcvdDgram (
|
|||
/**
|
||||
Cancel Udp4 tokens from the Udp4 instance.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
@param Token Pointer to the token to be canceled, if NULL, all
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
@param[in] Token Pointer to the token to be canceled, if NULL, all
|
||||
tokens in this instance will be cancelled.
|
||||
|
||||
@retval EFI_SUCCESS The Token is cancelled.
|
||||
|
@ -669,9 +651,7 @@ Udp4InstanceCancelToken (
|
|||
/**
|
||||
This function delivers the received datagrams for the specified instance.
|
||||
|
||||
@param Instance Pointer to the instance context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Instance Pointer to the instance context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -682,9 +662,7 @@ Udp4InstanceDeliverDgram (
|
|||
/**
|
||||
This function reports the received ICMP error.
|
||||
|
||||
@param Instance Pointer to the udp instance context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Instance Pointer to the udp instance context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -696,9 +674,7 @@ Udp4ReportIcmpError (
|
|||
This function is a dummy ext-free function for the NET_BUF created for the output
|
||||
udp datagram.
|
||||
|
||||
@param Context Pointer to the context data.
|
||||
|
||||
@return None.
|
||||
@param[in] Context Pointer to the context data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
@ -725,9 +701,7 @@ Udp4SetVariableData (
|
|||
/**
|
||||
Clear the variable and free the resource.
|
||||
|
||||
@param Udp4Service Udp4 service data.
|
||||
|
||||
@return None.
|
||||
@param[[in] Udp4Service Udp4 service data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
|
|
|
@ -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:
|
||||
|
||||
Udp4Main.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
**/
|
||||
|
||||
#include "Udp4Impl.h"
|
||||
|
@ -114,8 +107,8 @@ Udp4GetModeData (
|
|||
With different parameters in UdpConfigData, Configure() can be used to bind
|
||||
this instance to specified port.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param UdpConfigData Pointer to the buffer to receive the current configuration data.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] UdpConfigData Pointer to the buffer to receive the current configuration data.
|
||||
|
||||
@retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
|
||||
|
@ -305,10 +298,10 @@ ON_EXIT:
|
|||
filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all
|
||||
currently joined groups are left.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one
|
||||
or all multicast groups.
|
||||
@param MulticastAddress Pointer to multicast group address to join or leave.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one
|
||||
or all multicast groups.
|
||||
@param[in] MulticastAddress Pointer to multicast group address to join or leave.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.
|
||||
|
@ -420,12 +413,12 @@ ON_EXIT:
|
|||
copies will be updated automatically whenever the IP driver reconfigures its
|
||||
instances; as a result, the previous modification to these copies will be lost.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param DeleteRoute Set to TRUE to delete this route from the routing table.
|
||||
Set to FALSE to add this route to the routing table.
|
||||
@param SubnetAddress The destination network address that needs to be routed.
|
||||
@param SubnetMask The subnet mask of SubnetAddress.
|
||||
@param GatewayAddress The gateway IP address for this route.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] DeleteRoute Set to TRUE to delete this route from the routing table.
|
||||
Set to FALSE to add this route to the routing table.
|
||||
@param[in] SubnetAddress The destination network address that needs to be routed.
|
||||
@param[in] SubnetMask The subnet mask of SubnetAddress.
|
||||
@param[in] GatewayAddress The gateway IP address for this route.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.
|
||||
|
@ -483,9 +476,9 @@ Udp4Routes (
|
|||
and context for the event will enable the user to receive the notification and
|
||||
transmitting status.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param Token Pointer to the completion token that will be placed into the
|
||||
transmit queue.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to the completion token that will be placed into the
|
||||
transmit queue.
|
||||
|
||||
@retval EFI_SUCCESS The data has been queued for transmission.
|
||||
@retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.
|
||||
|
@ -710,9 +703,9 @@ ON_EXIT:
|
|||
will enable the user to receive the notification and receiving status. That
|
||||
notification function is guaranteed to not be re-entered.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param Token Pointer to a token that is associated with the receive data
|
||||
descriptor.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that is associated with
|
||||
the receive data descriptor.
|
||||
|
||||
@retval EFI_SUCCESS The receive completion token was cached.
|
||||
@retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.
|
||||
|
@ -808,11 +801,11 @@ ON_EXIT:
|
|||
the asynchronous operation has completed, this function will not signal the
|
||||
token and EFI_NOT_FOUND is returned.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param Token Pointer to a token that has been issued by
|
||||
EFI_UDP4_PROTOCOL.Transmit() or
|
||||
EFI_UDP4_PROTOCOL.Receive().If NULL, all pending
|
||||
tokens are aborted.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] Token Pointer to a token that has been issued by
|
||||
EFI_UDP4_PROTOCOL.Transmit() or
|
||||
EFI_UDP4_PROTOCOL.Receive().If NULL, all pending
|
||||
tokens are aborted.
|
||||
|
||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event
|
||||
was signaled. When Token is NULL, all pending requests are
|
||||
|
@ -881,7 +874,7 @@ Udp4Cancel (
|
|||
Drivers and applications that are experiencing packet loss should try calling
|
||||
the Poll() function more often.
|
||||
|
||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Incoming or outgoing data was processed.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
|
|
Loading…
Reference in New Issue