code scrub fix
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7290 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,13 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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,
|
by This does not support the language specified by Language,
|
||||||
then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -46,7 +39,7 @@ Abstract:
|
|||||||
to the driver writer. Language is specified
|
to the driver writer. Language is specified
|
||||||
in RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
driver specified by This in the language
|
driver specified by This in the language
|
||||||
specified by Language.
|
specified by Language.
|
||||||
@ -85,15 +78,15 @@ DhcpComponentNameGetDriverName (
|
|||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
specified by This is managing. This handle
|
||||||
specifies the controller whose name is to be
|
specifies the controller whose name is to be
|
||||||
returned.
|
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
|
the name of. This is an optional parameter that
|
||||||
may be NULL. It will be NULL for device
|
may be NULL. It will be NULL for device
|
||||||
drivers. It will also be NULL for a bus drivers
|
drivers. It will also be NULL for a bus drivers
|
||||||
@ -102,7 +95,7 @@ DhcpComponentNameGetDriverName (
|
|||||||
driver that wishes to retrieve the name of a
|
driver that wishes to retrieve the name of a
|
||||||
child controller.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -111,7 +104,7 @@ DhcpComponentNameGetDriverName (
|
|||||||
to the driver writer. Language is specified in
|
to the driver writer. Language is specified in
|
||||||
RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
controller specified by ControllerHandle and
|
controller specified by ControllerHandle and
|
||||||
ChildHandle in the language specified by
|
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,
|
by This does not support the language specified by Language,
|
||||||
then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
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
|
to the driver writer. Language is specified
|
||||||
in RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
driver specified by This in the language
|
driver specified by This in the language
|
||||||
specified by Language.
|
specified by Language.
|
||||||
@ -250,15 +243,15 @@ DhcpComponentNameGetDriverName (
|
|||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
specified by This is managing. This handle
|
||||||
specifies the controller whose name is to be
|
specifies the controller whose name is to be
|
||||||
returned.
|
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
|
the name of. This is an optional parameter that
|
||||||
may be NULL. It will be NULL for device
|
may be NULL. It will be NULL for device
|
||||||
drivers. It will also be NULL for a bus drivers
|
drivers. It will also be NULL for a bus drivers
|
||||||
@ -267,7 +260,7 @@ DhcpComponentNameGetDriverName (
|
|||||||
driver that wishes to retrieve the name of a
|
driver that wishes to retrieve the name of a
|
||||||
child controller.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -276,7 +269,7 @@ DhcpComponentNameGetDriverName (
|
|||||||
to the driver writer. Language is specified in
|
to the driver writer. Language is specified in
|
||||||
RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
controller specified by ControllerHandle and
|
controller specified by ControllerHandle and
|
||||||
ChildHandle in the language specified by
|
ChildHandle in the language specified by
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,14 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Dhcp4Driver.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Dhcp4Impl.h"
|
#include "Dhcp4Impl.h"
|
||||||
@ -43,8 +35,8 @@ EFI_SERVICE_BINDING_PROTOCOL mDhcp4ServiceBindingTemplate = {
|
|||||||
|
|
||||||
Entry point of the DHCP driver to install various protocols.
|
Entry point of the DHCP driver to install various protocols.
|
||||||
|
|
||||||
@param ImageHandle The firmware allocated handle for the UEFI image.
|
@param[in] ImageHandle The firmware allocated handle for the UEFI image.
|
||||||
@param SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
@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
|
follow these calling restrictions. If any other agent wishes to call
|
||||||
Supported() it must also follow these calling restrictions.
|
Supported() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to test
|
@param[in] ControllerHandle Handle of device to test
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver supports this device
|
@retval EFI_SUCCESS This driver supports this device
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
Configure the default UDP child to receive all the DHCP traffics
|
||||||
on this network interface.
|
on this network interface.
|
||||||
|
|
||||||
@param UdpIo The UDP IO port to configure
|
@param[in] UdpIo The UDP IO port to configure
|
||||||
@param Context The context to the function
|
@param[in] Context The context to the function
|
||||||
|
|
||||||
@retval EFI_SUCCESS The UDP IO port is successfully configured.
|
@retval EFI_SUCCESS The UDP IO port is successfully configured.
|
||||||
@retval Others Failed to configure the UDP child.
|
@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
|
or partly destroyed. If a resource is destroyed, it is marked as so in
|
||||||
case the destroy failed and being called again later.
|
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.
|
@retval EFI_SUCCESS Always return success.
|
||||||
|
|
||||||
@ -189,11 +181,11 @@ Dhcp4CloseService (
|
|||||||
/**
|
/**
|
||||||
Create a new DHCP service binding instance for the controller.
|
Create a new DHCP service binding instance for the controller.
|
||||||
|
|
||||||
@param Controller The controller to install DHCP service binding
|
@param[in] Controller The controller to install DHCP service binding
|
||||||
protocol onto
|
protocol onto
|
||||||
@param ImageHandle The driver's image handle
|
@param[in] ImageHandle The driver's image handle
|
||||||
@param Service The variable to receive the created DHCP service
|
@param[out] Service The variable to receive the created DHCP service
|
||||||
instance.
|
instance.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource .
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource .
|
||||||
@retval EFI_SUCCESS The DHCP service instance is created.
|
@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
|
calling restrictions. If any other agent wishes to call Start() it
|
||||||
must also follow these calling restrictions.
|
must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to bind driver to
|
@param[in] ControllerHandle Handle of device to bind driver to
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
must follow these calling restrictions. If any other agent wishes
|
||||||
to call Stop() it must also follow these calling restrictions.
|
to call Stop() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to stop driver on
|
@param[in] ControllerHandle Handle of device to stop driver on
|
||||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||||
children is zero stop the entire bus driver.
|
children is zero stop the entire bus driver.
|
||||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||||
@retval other This driver was not removed from this device
|
@retval other This driver was not removed from this device
|
||||||
@ -453,8 +445,6 @@ Dhcp4DriverBindingStop (
|
|||||||
@param DhcpSb The dhcp service instance
|
@param DhcpSb The dhcp service instance
|
||||||
@param Instance The dhcp instance to initialize
|
@param Instance The dhcp instance to initialize
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpInitProtocol (
|
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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
then a new handle is created. If it is not NULL, then the
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
I/O services are added to the existing child handle.
|
|
||||||
|
|
||||||
@retval EFI_SUCCES The child handle was created with the I/O services
|
@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_INVALID_PARAMETER ChildHandle is NULL.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
||||||
the child
|
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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
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
|
@param ChildHandle Handle of the child to destroy
|
||||||
|
|
||||||
@retval EFI_SUCCES The I/O services were removed from the child handle
|
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
that are being removed.
|
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
|
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||||
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
|
because its services are being used.
|
||||||
I/O services are being used.
|
|
||||||
@retval other The child handle was not destroyed
|
@retval other The child handle was not destroyed
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Header for the DHCP4 driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#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
|
follow these calling restrictions. If any other agent wishes to call
|
||||||
Supported() it must also follow these calling restrictions.
|
Supported() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to test
|
@param[in] ControllerHandle Handle of device to test
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver supports this device
|
@retval EFI_SUCCESS This driver supports this device
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
calling restrictions. If any other agent wishes to call Start() it
|
||||||
must also follow these calling restrictions.
|
must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to bind driver to
|
@param[in] ControllerHandle Handle of device to bind driver to
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
must follow these calling restrictions. If any other agent wishes
|
||||||
to call Stop() it must also follow these calling restrictions.
|
to call Stop() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to stop driver on
|
@param[in] ControllerHandle Handle of device to stop driver on
|
||||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||||
children is zero stop the entire bus driver.
|
children is zero stop the entire bus driver.
|
||||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||||
@retval other This driver was not removed from this device
|
@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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
then a new handle is created. If it is not NULL, then the
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
I/O services are added to the existing child handle.
|
|
||||||
|
|
||||||
@retval EFI_SUCCES The child handle was created with the I/O services
|
@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_INVALID_PARAMETER ChildHandle is NULL.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
||||||
the child
|
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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
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
|
@param ChildHandle Handle of the child to destroy
|
||||||
|
|
||||||
@retval EFI_SUCCES The I/O services were removed from the child handle
|
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
that are being removed.
|
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
|
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||||
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
|
because its services are being used.
|
||||||
I/O services are being used.
|
|
||||||
@retval other The child handle was not destroyed
|
@retval other The child handle was not destroyed
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
This file implement the EFI_DHCP4_PROTOCOL interface.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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
|
The GetModeData() function returns the current operating mode and cached data
|
||||||
packet for the EFI DHCPv4 Protocol driver.
|
packet for the EFI DHCPv4 Protocol driver.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
|
@param[out] Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The mode data was returned.
|
@retval EFI_SUCCESS The mode data was returned.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@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
|
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.
|
driver, it must call this function with Dhcp4CfgData set to NULL.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
|
@param[in] Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or
|
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or
|
||||||
Dhcp4InitReboot state, if the original state of this driver
|
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
|
by EFI_DHCP4_PROTOCOL.Configure() will be called and the user can take this
|
||||||
opportunity to control the process.
|
opportunity to control the process.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param CompletionEvent If not NULL, indicates the event that will be signaled when the
|
@param[in] CompletionEvent If not NULL, indicates the event that will be signaled when the
|
||||||
EFI DHCPv4 Protocol driver is transferred into the
|
EFI DHCPv4 Protocol driver is transferred into the
|
||||||
Dhcp4Bound state or when the DHCP process is aborted.
|
Dhcp4Bound state or when the DHCP process is aborted.
|
||||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||||
check the completion status. If NULL,
|
check the completion status. If NULL,
|
||||||
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
|
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
|
||||||
is transferred into the Dhcp4Bound state or the process fails.
|
is transferred into the Dhcp4Bound state or the process fails.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The DHCP configuration process has started, or it has completed
|
@retval EFI_SUCCESS The DHCP configuration process has started, or it has completed
|
||||||
when CompletionEvent is NULL.
|
when CompletionEvent is NULL.
|
||||||
@ -154,16 +146,16 @@ EfiDhcp4Start (
|
|||||||
state and the previous configuration is restored. The outgoing and incoming packets
|
state and the previous configuration is restored. The outgoing and incoming packets
|
||||||
can be captured by the EFI_DHCP4_CALLBACK function.
|
can be captured by the EFI_DHCP4_CALLBACK function.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param RebindRequest If TRUE, this function broadcasts the request packets and enters
|
@param[in] RebindRequest If TRUE, this function broadcasts the request packets and enters
|
||||||
the Dhcp4Rebinding state. Otherwise, it sends a unicast
|
the Dhcp4Rebinding state. Otherwise, it sends a unicast
|
||||||
request packet and enters the Dhcp4Renewing state.
|
request packet and enters the Dhcp4Renewing state.
|
||||||
@param CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
|
@param[in] CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
|
||||||
completes or some error occurs.
|
completes or some error occurs.
|
||||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||||
check the completion status. If NULL,
|
check the completion status. If NULL,
|
||||||
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
|
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
|
||||||
until the DHCP process finishes.
|
until the DHCP process finishes.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the
|
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the
|
||||||
Dhcp4Renewing state or is back to the Dhcp4Bound state.
|
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
|
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.
|
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_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init phase.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||||
@ -221,7 +213,7 @@ EfiDhcp4Release (
|
|||||||
before DHCP configuration process can be started again. This function can be
|
before DHCP configuration process can be started again. This function can be
|
||||||
called when the EFI DHCPv4 Protocol driver is in any state.
|
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_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Stopped phase.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@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
|
does not change any state of the EFI DHCPv4 Protocol driver and can be used at
|
||||||
any time.
|
any time.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param SeedPacket Initial packet to be used as a base for building new packet.
|
@param[in] SeedPacket Initial packet to be used as a base for building new packet.
|
||||||
@param DeleteCount Number of opcodes in the DeleteList.
|
@param[in] DeleteCount Number of opcodes in the DeleteList.
|
||||||
@param DeleteList List of opcodes to be deleted from the seed packet.
|
@param[in] DeleteList List of opcodes to be deleted from the seed packet.
|
||||||
Ignored if DeleteCount is zero.
|
Ignored if DeleteCount is zero.
|
||||||
@param AppendCount Number of entries in the OptionList.
|
@param[in] AppendCount Number of entries in the OptionList.
|
||||||
@param AppendList Pointer to a DHCP option list to be appended to SeedPacket.
|
@param[in] AppendList Pointer to a DHCP option list to be appended to SeedPacket.
|
||||||
If SeedPacket also contains options in this list, they are
|
If SeedPacket also contains options in this list, they are
|
||||||
replaced by new options (except pad option). Ignored if
|
replaced by new options (except pad option). Ignored if
|
||||||
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
|
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
|
||||||
@param NewPacket Pointer to storage for the pointer to the new allocated packet.
|
@param[out] NewPacket Pointer to storage for the pointer to the new allocated packet.
|
||||||
Use the EFI Boot Service FreePool() on the resulting pointer
|
Use the EFI Boot Service FreePool() on the resulting pointer
|
||||||
when done with the packet.
|
when done with the packet.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The new packet was built.
|
@retval EFI_SUCCESS The new packet was built.
|
||||||
@retval EFI_OUT_OF_RESOURCES Storage for the new packet could not be allocated.
|
@retval EFI_OUT_OF_RESOURCES Storage for the new packet could not be allocated.
|
||||||
@ -272,15 +264,15 @@ EfiDhcp4Build (
|
|||||||
OUT EFI_DHCP4_PACKET **NewPacket
|
OUT EFI_DHCP4_PACKET **NewPacket
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Transmits a DHCP formatted packet and optionally waits for responses.
|
Transmits a DHCP formatted packet and optionally waits for responses.
|
||||||
|
|
||||||
The TransmitReceive() function is used to transmit a DHCP packet and optionally
|
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
|
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.
|
the EFI DHCPv4 Protocol driver and thus can be used at any time.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
@param[in] Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet was successfully queued for transmission.
|
@retval EFI_SUCCESS The packet was successfully queued for transmission.
|
||||||
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
|
@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
|
The GetModeData() function returns the current operating mode and cached data
|
||||||
packet for the EFI DHCPv4 Protocol driver.
|
packet for the EFI DHCPv4 Protocol driver.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
|
@param[out] Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The mode data was returned.
|
@retval EFI_SUCCESS The mode data was returned.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||||
@ -426,8 +418,6 @@ EfiDhcp4GetModeData (
|
|||||||
|
|
||||||
@param Config The DHCP configure data
|
@param Config The DHCP configure data
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpCleanConfigure (
|
DhcpCleanConfigure (
|
||||||
@ -462,8 +452,8 @@ DhcpCleanConfigure (
|
|||||||
Allocate memory for configure parameter such as timeout value for Dst,
|
Allocate memory for configure parameter such as timeout value for Dst,
|
||||||
then copy the configure parameter from Src to Dst.
|
then copy the configure parameter from Src to Dst.
|
||||||
|
|
||||||
@param Dst The destination DHCP configure data.
|
@param[out] Dst The destination DHCP configure data.
|
||||||
@param Src The source DHCP configure data.
|
@param[in] Src The source DHCP configure data.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
@retval EFI_SUCCESS The configure is copied.
|
@retval EFI_SUCCESS The configure is copied.
|
||||||
@ -560,8 +550,6 @@ ON_ERROR:
|
|||||||
|
|
||||||
@param DhcpSb The DHCP service instance.
|
@param DhcpSb The DHCP service instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpYieldControl (
|
DhcpYieldControl (
|
||||||
@ -620,8 +608,8 @@ DhcpYieldControl (
|
|||||||
wants to make it possible for another instance to configure the EFI DHCPv4 Protocol
|
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.
|
driver, it must call this function with Dhcp4CfgData set to NULL.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
|
@param[in] Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or
|
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or
|
||||||
Dhcp4InitReboot state, if the original state of this driver
|
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
|
by EFI_DHCP4_PROTOCOL.Configure() will be called and the user can take this
|
||||||
opportunity to control the process.
|
opportunity to control the process.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param CompletionEvent If not NULL, indicates the event that will be signaled when the
|
@param[in] CompletionEvent If not NULL, indicates the event that will be signaled when the
|
||||||
EFI DHCPv4 Protocol driver is transferred into the
|
EFI DHCPv4 Protocol driver is transferred into the
|
||||||
Dhcp4Bound state or when the DHCP process is aborted.
|
Dhcp4Bound state or when the DHCP process is aborted.
|
||||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||||
check the completion status. If NULL,
|
check the completion status. If NULL,
|
||||||
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
|
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
|
||||||
is transferred into the Dhcp4Bound state or the process fails.
|
is transferred into the Dhcp4Bound state or the process fails.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The DHCP configuration process has started, or it has completed
|
@retval EFI_SUCCESS The DHCP configuration process has started, or it has completed
|
||||||
when CompletionEvent is NULL.
|
when CompletionEvent is NULL.
|
||||||
@ -875,16 +863,16 @@ ON_ERROR:
|
|||||||
state and the previous configuration is restored. The outgoing and incoming packets
|
state and the previous configuration is restored. The outgoing and incoming packets
|
||||||
can be captured by the EFI_DHCP4_CALLBACK function.
|
can be captured by the EFI_DHCP4_CALLBACK function.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param RebindRequest If TRUE, this function broadcasts the request packets and enters
|
@param[in] RebindRequest If TRUE, this function broadcasts the request packets and enters
|
||||||
the Dhcp4Rebinding state. Otherwise, it sends a unicast
|
the Dhcp4Rebinding state. Otherwise, it sends a unicast
|
||||||
request packet and enters the Dhcp4Renewing state.
|
request packet and enters the Dhcp4Renewing state.
|
||||||
@param CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
|
@param[in] CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
|
||||||
completes or some error occurs.
|
completes or some error occurs.
|
||||||
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
|
||||||
check the completion status. If NULL,
|
check the completion status. If NULL,
|
||||||
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
|
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
|
||||||
until the DHCP process finishes.
|
until the DHCP process finishes.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the
|
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the
|
||||||
Dhcp4Renewing state or is back to the Dhcp4Bound state.
|
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
|
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.
|
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_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init phase.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@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
|
before DHCP configuration process can be started again. This function can be
|
||||||
called when the EFI DHCPv4 Protocol driver is in any state.
|
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_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Stopped phase.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@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
|
does not change any state of the EFI DHCPv4 Protocol driver and can be used at
|
||||||
any time.
|
any time.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param SeedPacket Initial packet to be used as a base for building new packet.
|
@param[in] SeedPacket Initial packet to be used as a base for building new packet.
|
||||||
@param DeleteCount Number of opcodes in the DeleteList.
|
@param[in] DeleteCount Number of opcodes in the DeleteList.
|
||||||
@param DeleteList List of opcodes to be deleted from the seed packet.
|
@param[in] DeleteList List of opcodes to be deleted from the seed packet.
|
||||||
Ignored if DeleteCount is zero.
|
Ignored if DeleteCount is zero.
|
||||||
@param AppendCount Number of entries in the OptionList.
|
@param[in] AppendCount Number of entries in the OptionList.
|
||||||
@param AppendList Pointer to a DHCP option list to be appended to SeedPacket.
|
@param[in] AppendList Pointer to a DHCP option list to be appended to SeedPacket.
|
||||||
If SeedPacket also contains options in this list, they are
|
If SeedPacket also contains options in this list, they are
|
||||||
replaced by new options (except pad option). Ignored if
|
replaced by new options (except pad option). Ignored if
|
||||||
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
|
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
|
||||||
@param NewPacket Pointer to storage for the pointer to the new allocated packet.
|
@param[out] NewPacket Pointer to storage for the pointer to the new allocated packet.
|
||||||
Use the EFI Boot Service FreePool() on the resulting pointer
|
Use the EFI Boot Service FreePool() on the resulting pointer
|
||||||
when done with the packet.
|
when done with the packet.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The new packet was built.
|
@retval EFI_SUCCESS The new packet was built.
|
||||||
@retval EFI_OUT_OF_RESOURCES Storage for the new packet could not be allocated.
|
@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.
|
Callback by UdpIoCreatePort() when creating UdpIo for this Dhcp4 instance.
|
||||||
|
|
||||||
@param UdpIo The UdpIo being created.
|
@param[in] UdpIo The UdpIo being created.
|
||||||
@param Context Dhcp4 instance.
|
@param[in] Context Dhcp4 instance.
|
||||||
|
|
||||||
@retval EFI_SUCCESS UdpIo is configured successfully.
|
@retval EFI_SUCCESS UdpIo is configured successfully.
|
||||||
@retval other Other error occurs.
|
@retval other Other error occurs.
|
||||||
@ -1261,7 +1249,6 @@ Dhcp4InstanceCreateUdpIo (
|
|||||||
|
|
||||||
@param Arg The context.
|
@param Arg The context.
|
||||||
|
|
||||||
@return None.
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpDummyExtFree (
|
DhcpDummyExtFree (
|
||||||
@ -1281,8 +1268,6 @@ DhcpDummyExtFree (
|
|||||||
@param IoStatus Status of the input.
|
@param IoStatus Status of the input.
|
||||||
@param Context Extra info for the input.
|
@param Context Extra info for the input.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
PxeDhcpInput (
|
PxeDhcpInput (
|
||||||
@ -1386,8 +1371,6 @@ RESTART:
|
|||||||
|
|
||||||
@param Instance Dhcp4 instance.
|
@param Instance Dhcp4 instance.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
PxeDhcpDone (
|
PxeDhcpDone (
|
||||||
@ -1439,8 +1422,8 @@ SIGNAL_USER:
|
|||||||
wait for the response from servers. This function does not change the state of
|
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.
|
the EFI DHCPv4 Protocol driver and thus can be used at any time.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
||||||
@param Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
@param[in] Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet was successfully queued for transmission.
|
@retval EFI_SUCCESS The packet was successfully queued for transmission.
|
||||||
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
|
@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
|
EFI_DHCP4_PACKET_OPTION array in the DHCP_PARSE_CONTEXT to point
|
||||||
the individual DHCP option in the packet.
|
the individual DHCP option in the packet.
|
||||||
|
|
||||||
@param Tag The DHCP option type
|
@param[in] Tag The DHCP option type
|
||||||
@param Len Length of the DHCP option data
|
@param[in] Len Length of the DHCP option data
|
||||||
@param Data The DHCP option data
|
@param[in] Data The DHCP option data
|
||||||
@param Context The context, to pass several parameters in.
|
@param[in] Context The context, to pass several parameters in.
|
||||||
|
|
||||||
@retval EFI_SUCCESS It always returns EFI_SUCCESS
|
@retval EFI_SUCCESS It always returns EFI_SUCCESS
|
||||||
|
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
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
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,20 +15,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#ifndef __EFI_DHCP4_IMPL_H__
|
||||||
@ -160,8 +152,6 @@ extern EFI_DHCP4_PROTOCOL mDhcp4ProtocolTemplate;
|
|||||||
|
|
||||||
@param DhcpSb The DHCP service instance.
|
@param DhcpSb The DHCP service instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpYieldControl (
|
DhcpYieldControl (
|
||||||
@ -173,8 +163,6 @@ DhcpYieldControl (
|
|||||||
|
|
||||||
@param Instance Dhcp4 instance.
|
@param Instance Dhcp4 instance.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
PxeDhcpDone (
|
PxeDhcpDone (
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
EFI DHCP protocol implementation.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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
|
Send an initial DISCOVER or REQUEST message according to the
|
||||||
DHCP service's current state.
|
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 EFI_SUCCESS The request has been sent
|
||||||
@retval other Some error occurs when sending the request.
|
@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
|
proper return value is selected to let the caller continue the
|
||||||
normal process.
|
normal process.
|
||||||
|
|
||||||
@param DhcpSb The DHCP service instance
|
@param[in] DhcpSb The DHCP service instance
|
||||||
@param Event The event as defined in the spec
|
@param[in] Event The event as defined in the spec
|
||||||
@param Packet The current packet trigger the event
|
@param[in] Packet The current packet trigger the event
|
||||||
@param NewPacket The user's return new packet
|
@param[out] NewPacket The user's return new packet
|
||||||
|
|
||||||
@retval EFI_NOT_READY Direct the caller to continue collecting the offer.
|
@retval EFI_NOT_READY Direct the caller to continue collecting the offer.
|
||||||
@retval EFI_SUCCESS The user function returns success.
|
@retval EFI_SUCCESS The user function returns success.
|
||||||
@ -143,8 +135,6 @@ DhcpCallUser (
|
|||||||
@param DhcpSb DHCP service instance
|
@param DhcpSb DHCP service instance
|
||||||
@param Which Which notify function to signal
|
@param Which Which notify function to signal
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpNotifyUser (
|
DhcpNotifyUser (
|
||||||
@ -249,8 +239,6 @@ DhcpSetState (
|
|||||||
|
|
||||||
@param DhcpSb The DHCP service instance.
|
@param DhcpSb The DHCP service instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpSetTransmitTimer (
|
DhcpSetTransmitTimer (
|
||||||
@ -284,9 +272,6 @@ DhcpSetTransmitTimer (
|
|||||||
@param DhcpSb The DHCP service instance
|
@param DhcpSb The DHCP service instance
|
||||||
@param Para The DHCP parameter extracted from the server's
|
@param Para The DHCP parameter extracted from the server's
|
||||||
response.
|
response.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpComputeLease (
|
DhcpComputeLease (
|
||||||
@ -319,8 +304,8 @@ DhcpComputeLease (
|
|||||||
DHCP driver needs this port to unicast packet to the server
|
DHCP driver needs this port to unicast packet to the server
|
||||||
such as DHCP release.
|
such as DHCP release.
|
||||||
|
|
||||||
@param UdpIo The UDP IO port to configure
|
@param[in] UdpIo The UDP IO port to configure
|
||||||
@param Context Dhcp service instance.
|
@param[in] Context Dhcp service instance.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The UDP IO port is successfully configured.
|
@retval EFI_SUCCESS The UDP IO port is successfully configured.
|
||||||
@retval Others It failed to configure the port.
|
@retval Others It failed to configure the port.
|
||||||
@ -448,8 +433,6 @@ DhcpLeaseAcquired (
|
|||||||
|
|
||||||
@param DhcpSb The DHCP instance service.
|
@param DhcpSb The DHCP instance service.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpCleanLease (
|
DhcpCleanLease (
|
||||||
@ -503,7 +486,7 @@ DhcpCleanLease (
|
|||||||
of BOOTP, the lease is recorded and user notified. If the offer is of
|
of BOOTP, the lease is recorded and user notified. If the offer is of
|
||||||
DHCP, it will request the offer from the server.
|
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.
|
@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
|
to this is: only call DhcpEndSession at the highest level, such as
|
||||||
DhcpInput, DhcpOnTimerTick...At the other level, just return error.
|
DhcpInput, DhcpOnTimerTick...At the other level, just return error.
|
||||||
|
|
||||||
@param DhcpSb The DHCP service instance
|
@param[in] DhcpSb The DHCP service instance
|
||||||
@param Status The result of the DHCP process.
|
@param[in] Status The result of the DHCP process.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -611,10 +592,10 @@ DhcpEndSession (
|
|||||||
/**
|
/**
|
||||||
Handle packets in DHCP select state.
|
Handle packets in DHCP select state.
|
||||||
|
|
||||||
@param DhcpSb The DHCP service instance
|
@param[in] DhcpSb The DHCP service instance
|
||||||
@param Packet The DHCP packet received
|
@param[in] Packet The DHCP packet received
|
||||||
@param Para The DHCP parameter extracted from the packet. That
|
@param[in] Para The DHCP parameter extracted from the packet. That
|
||||||
is, all the option value that we care.
|
is, all the option value that we care.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet is successfully processed.
|
@retval EFI_SUCCESS The packet is successfully processed.
|
||||||
@retval Others Some error occured.
|
@retval Others Some error occured.
|
||||||
@ -686,10 +667,10 @@ ON_EXIT:
|
|||||||
/**
|
/**
|
||||||
Handle packets in DHCP request state.
|
Handle packets in DHCP request state.
|
||||||
|
|
||||||
@param DhcpSb The DHCP service instance
|
@param[in] DhcpSb The DHCP service instance
|
||||||
@param Packet The DHCP packet received
|
@param[in] Packet The DHCP packet received
|
||||||
@param Para The DHCP parameter extracted from the packet. That
|
@param[in] Para The DHCP parameter extracted from the packet. That
|
||||||
is, all the option value that we care.
|
is, all the option value that we care.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet is successfully processed.
|
@retval EFI_SUCCESS The packet is successfully processed.
|
||||||
@retval Others Some error occured.
|
@retval Others Some error occured.
|
||||||
@ -779,10 +760,10 @@ ON_EXIT:
|
|||||||
/**
|
/**
|
||||||
Handle packets in DHCP renew/rebound state.
|
Handle packets in DHCP renew/rebound state.
|
||||||
|
|
||||||
@param DhcpSb The DHCP service instance
|
@param[in] DhcpSb The DHCP service instance
|
||||||
@param Packet The DHCP packet received
|
@param[in] Packet The DHCP packet received
|
||||||
@param Para The DHCP parameter extracted from the packet. That
|
@param[in] Para The DHCP parameter extracted from the packet. That
|
||||||
is, all the option value that we care.
|
is, all the option value that we care.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet is successfully processed.
|
@retval EFI_SUCCESS The packet is successfully processed.
|
||||||
@retval Others Some error occured.
|
@retval Others Some error occured.
|
||||||
@ -863,10 +844,10 @@ ON_EXIT:
|
|||||||
/**
|
/**
|
||||||
Handle packets in DHCP reboot state.
|
Handle packets in DHCP reboot state.
|
||||||
|
|
||||||
@param DhcpSb The DHCP service instance
|
@param[in] DhcpSb The DHCP service instance
|
||||||
@param Packet The DHCP packet received
|
@param[in] Packet The DHCP packet received
|
||||||
@param Para The DHCP parameter extracted from the packet. That
|
@param[in] Para The DHCP parameter extracted from the packet. That
|
||||||
is, all the option value that we care.
|
is, all the option value that we care.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet is successfully processed.
|
@retval EFI_SUCCESS The packet is successfully processed.
|
||||||
@retval Others Some error occured.
|
@retval Others Some error occured.
|
||||||
@ -959,8 +940,6 @@ ON_EXIT:
|
|||||||
@param IoStatus The status of the UDP receive
|
@param IoStatus The status of the UDP receive
|
||||||
@param Context The opaque parameter to the function.
|
@param Context The opaque parameter to the function.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpInput (
|
DhcpInput (
|
||||||
@ -1111,9 +1090,7 @@ RESTART:
|
|||||||
/**
|
/**
|
||||||
Release the packet.
|
Release the packet.
|
||||||
|
|
||||||
@param Arg The packet to release
|
@param[in] Arg The packet to release
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1133,8 +1110,6 @@ DhcpReleasePacket (
|
|||||||
@param IoStatus The status of the UDP receive
|
@param IoStatus The status of the UDP receive
|
||||||
@param Context The opaque parameter to the function.
|
@param Context The opaque parameter to the function.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpOnPacketSent (
|
DhcpOnPacketSent (
|
||||||
@ -1155,12 +1130,12 @@ DhcpOnPacketSent (
|
|||||||
the state (as defined in Figure 5. of the same RFC) before sending
|
the state (as defined in Figure 5. of the same RFC) before sending
|
||||||
a DHCP message. The table is adjusted accordingly.
|
a DHCP message. The table is adjusted accordingly.
|
||||||
|
|
||||||
@param DhcpSb The DHCP service instance
|
@param[in] DhcpSb The DHCP service instance
|
||||||
@param Seed The seed packet which the new packet is based on
|
@param[in] Seed The seed packet which the new packet is based on
|
||||||
@param Para The DHCP parameter of the Seed packet
|
@param[in] Para The DHCP parameter of the Seed packet
|
||||||
@param Type The message type to send
|
@param[in] Type The message type to send
|
||||||
@param Msg The human readable message to include in the packet
|
@param[in] Msg The human readable message to include in the packet
|
||||||
sent.
|
sent.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources for the packet
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources for the packet
|
||||||
@retval EFI_ACCESS_DENIED Failed to transmit the packet through UDP
|
@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
|
Retransmit a saved packet. Only DISCOVER and REQUEST messages
|
||||||
will be retransmitted.
|
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_ACCESS_DENIED Failed to transmit packet through UDP port
|
||||||
@retval EFI_SUCCESS The packet is retransmitted.
|
@retval EFI_SUCCESS The packet is retransmitted.
|
||||||
@ -1477,10 +1452,8 @@ DhcpRetransmit (
|
|||||||
and lease to determine the time to renew and rebind the lease.
|
and lease to determine the time to renew and rebind the lease.
|
||||||
DhcpOnTimerTick will be called once every second.
|
DhcpOnTimerTick will be called once every second.
|
||||||
|
|
||||||
@param Event The timer event
|
@param[in] Event The timer event
|
||||||
@param Context The context, which is the DHCP service instance.
|
@param[in] Context The context, which is the DHCP service instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
The DHCP4 protocol implementation.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#ifndef __EFI_DHCP4_IO_H__
|
||||||
@ -104,12 +95,12 @@ DhcpSetState (
|
|||||||
the state (as defined in Figure 5. of the same RFC) before sending
|
the state (as defined in Figure 5. of the same RFC) before sending
|
||||||
a DHCP message. The table is adjusted accordingly.
|
a DHCP message. The table is adjusted accordingly.
|
||||||
|
|
||||||
@param DhcpSb The DHCP service instance
|
@param[in] DhcpSb The DHCP service instance
|
||||||
@param Seed The seed packet which the new packet is based on
|
@param[in] Seed The seed packet which the new packet is based on
|
||||||
@param Para The DHCP parameter of the Seed packet
|
@param[in] Para The DHCP parameter of the Seed packet
|
||||||
@param Type The message type to send
|
@param[in] Type The message type to send
|
||||||
@param Msg The human readable message to include in the packet
|
@param[in] Msg The human readable message to include in the packet
|
||||||
sent.
|
sent.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources for the packet
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources for the packet
|
||||||
@retval EFI_ACCESS_DENIED Failed to transmit the packet through UDP
|
@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.
|
and lease to determine the time to renew and rebind the lease.
|
||||||
DhcpOnTimerTick will be called once every second.
|
DhcpOnTimerTick will be called once every second.
|
||||||
|
|
||||||
@param Event The timer event
|
@param[in] Event The timer event
|
||||||
@param Context The context, which is the DHCP service instance.
|
@param[in] Context The context, which is the DHCP service instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -155,8 +144,6 @@ DhcpOnTimerTick (
|
|||||||
@param IoStatus The status of the UDP receive
|
@param IoStatus The status of the UDP receive
|
||||||
@param Context The opaque parameter to the function.
|
@param Context The opaque parameter to the function.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpInput (
|
DhcpInput (
|
||||||
@ -170,7 +157,7 @@ DhcpInput (
|
|||||||
Send an initial DISCOVER or REQUEST message according to the
|
Send an initial DISCOVER or REQUEST message according to the
|
||||||
DHCP service's current state.
|
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 EFI_SUCCESS The request has been sent
|
||||||
@retval other Some error occurs when sending the request.
|
@retval other Some error occurs when sending the request.
|
||||||
@ -186,8 +173,6 @@ DhcpInitRequest (
|
|||||||
|
|
||||||
@param DhcpSb The DHCP instance service.
|
@param DhcpSb The DHCP instance service.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpCleanLease (
|
DhcpCleanLease (
|
||||||
@ -202,8 +187,6 @@ DhcpCleanLease (
|
|||||||
@param IoStatus The status of the UDP receive
|
@param IoStatus The status of the UDP receive
|
||||||
@param Context The opaque parameter to the function.
|
@param Context The opaque parameter to the function.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
DhcpOnPacketSent (
|
DhcpOnPacketSent (
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Function to validate, parse, process the DHCP options.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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"
|
#include "Dhcp4Impl.h"
|
||||||
@ -120,7 +112,7 @@ DHCP_OPTION_FORMAT DhcpOptionFormats[] = {
|
|||||||
Binary search the DhcpOptionFormats array to find the format
|
Binary search the DhcpOptionFormats array to find the format
|
||||||
information about a specific option.
|
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.
|
@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.
|
Validate whether a single DHCP option is valid according to its format.
|
||||||
|
|
||||||
@param Format The option's format
|
@param[in] Format The option's format
|
||||||
@param OptValue The value of the option
|
@param[in] OptValue The value of the option
|
||||||
@param Len The length of the option value
|
@param[in] Len The length of the option value
|
||||||
|
|
||||||
@retval TRUE The option is valid.
|
@retval TRUE The option is valid.
|
||||||
@retval FALSE Otherwise.
|
@retval FALSE Otherwise.
|
||||||
@ -238,10 +230,10 @@ DhcpOptionIsValid (
|
|||||||
Extract the client interested options, all the parameters are
|
Extract the client interested options, all the parameters are
|
||||||
converted to host byte order.
|
converted to host byte order.
|
||||||
|
|
||||||
@param Tag The DHCP option tag
|
@param[in] Tag The DHCP option tag
|
||||||
@param Len The length of the option
|
@param[in] Len The length of the option
|
||||||
@param Data The value of the DHCP option
|
@param[in] Data The value of the DHCP option
|
||||||
@param Para The variable to save the interested parameter
|
@param[out] Para The variable to save the interested parameter
|
||||||
|
|
||||||
@retval EFI_SUCCESS The DHCP option is successfully extracted.
|
@retval EFI_SUCCESS The DHCP option is successfully extracted.
|
||||||
@retval EFI_INVALID_PARAMETER The DHCP option is mal-formated
|
@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
|
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.
|
name. Each option buffer is required to end with DHCP_TAG_EOP.
|
||||||
|
|
||||||
@param Buffer The buffer which contains DHCP options
|
@param[in] Buffer The buffer which contains DHCP options
|
||||||
@param BufLen The length of the buffer
|
@param[in] BufLen The length of the buffer
|
||||||
@param Check The callback function for each option found
|
@param[in] Check The callback function for each option found
|
||||||
@param Context The opaque parameter for the Check
|
@param[in] Context The opaque parameter for the Check
|
||||||
@param Overload Variable to save the value of DHCP_TAG_OVERLOAD
|
@param[out] Overload Variable to save the value of DHCP_TAG_OVERLOAD
|
||||||
option.
|
option.
|
||||||
|
|
||||||
@retval EFI_SUCCESS All the options are valid
|
@retval EFI_SUCCESS All the options are valid
|
||||||
@retval EFI_INVALID_PARAMETER The options are mal-formated.
|
@retval EFI_INVALID_PARAMETER The options are mal-formated.
|
||||||
@ -324,7 +316,7 @@ EFI_STATUS
|
|||||||
DhcpIterateBufferOptions (
|
DhcpIterateBufferOptions (
|
||||||
IN UINT8 *Buffer,
|
IN UINT8 *Buffer,
|
||||||
IN INTN BufLen,
|
IN INTN BufLen,
|
||||||
IN DHCP_CHECK_OPTION Check, OPTIONAL
|
IN DHCP_CHECK_OPTION Check OPTIONAL,
|
||||||
IN VOID *Context,
|
IN VOID *Context,
|
||||||
OUT UINT8 *Overload OPTIONAL
|
OUT UINT8 *Overload OPTIONAL
|
||||||
)
|
)
|
||||||
@ -385,10 +377,10 @@ DhcpIterateBufferOptions (
|
|||||||
the options in FILENAME and SERVERNAME fields. One option may be
|
the options in FILENAME and SERVERNAME fields. One option may be
|
||||||
encoded in several places. See RFC 3396 Encoding Long Options in DHCP
|
encoded in several places. See RFC 3396 Encoding Long Options in DHCP
|
||||||
|
|
||||||
@param Packet The DHCP packet to check the options for
|
@param[in] Packet The DHCP packet to check the options for
|
||||||
@param Check The callback function to be called for each option
|
@param[in] Check The callback function to be called for each option
|
||||||
found
|
found
|
||||||
@param Context The opaque parameter for Check
|
@param[in] Context The opaque parameter for Check
|
||||||
|
|
||||||
@retval EFI_SUCCESS The DHCP packet's options are well formated
|
@retval EFI_SUCCESS The DHCP packet's options are well formated
|
||||||
@retval EFI_INVALID_PARAMETER The DHCP packet's options are not 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
|
length. It just adds the data length of all the occurances of this
|
||||||
Tag. Context is an array of 256 DHCP_OPTION_COUNT.
|
Tag. Context is an array of 256 DHCP_OPTION_COUNT.
|
||||||
|
|
||||||
@param Tag The current option to check
|
@param[in] Tag The current option to check
|
||||||
@param Len The length of the option data
|
@param[in] Len The length of the option data
|
||||||
@param Data The option data
|
@param[in] Data The option data
|
||||||
@param Context The context, which is a array of 256
|
@param[in] Context The context, which is a array of 256
|
||||||
DHCP_OPTION_COUNT.
|
DHCP_OPTION_COUNT.
|
||||||
|
|
||||||
@retval EFI_SUCCESS It always returns EFI_SUCCESS.
|
@retval EFI_SUCCESS It always returns EFI_SUCCESS.
|
||||||
|
|
||||||
@ -485,11 +477,11 @@ DhcpGetOptionLen (
|
|||||||
Call back function to DhcpIterateOptions to consolidate each option's
|
Call back function to DhcpIterateOptions to consolidate each option's
|
||||||
data. There are maybe several occurrence of the same option.
|
data. There are maybe several occurrence of the same option.
|
||||||
|
|
||||||
@param Tag The option to consolidate its data
|
@param[in] Tag The option to consolidate its data
|
||||||
@param Len The length of option data
|
@param[in] Len The length of option data
|
||||||
@param Data The data of the option's current occurance
|
@param[in] Data The data of the option's current occurance
|
||||||
@param Context The context, which is DHCP_OPTION_CONTEXT. This
|
@param[in] Context The context, which is DHCP_OPTION_CONTEXT. This
|
||||||
array is just a wrap to pass THREE parameters.
|
array is just a wrap to pass THREE parameters.
|
||||||
|
|
||||||
@retval EFI_SUCCESS It always returns EFI_SUCCESS
|
@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
|
with DhcpFillOption to fill each option's data to its position in the
|
||||||
buffer.
|
buffer.
|
||||||
|
|
||||||
@param Packet The DHCP packet to parse the options
|
@param[in] Packet The DHCP packet to parse the options
|
||||||
@param Count The number of valid dhcp options present in the
|
@param[out] Count The number of valid dhcp options present in the
|
||||||
packet
|
packet
|
||||||
@param OptionPoint The array that contains the DHCP options. Caller
|
@param[out] OptionPoint The array that contains the DHCP options. Caller
|
||||||
should free it.
|
should free it.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to parse the packet.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to parse the packet.
|
||||||
@retval EFI_INVALID_PARAMETER The options are mal-formated
|
@retval EFI_INVALID_PARAMETER The options are mal-formated
|
||||||
@ -648,8 +640,8 @@ ON_EXIT:
|
|||||||
Validate the packet's options. If necessary, allocate
|
Validate the packet's options. If necessary, allocate
|
||||||
and fill in the interested parameters.
|
and fill in the interested parameters.
|
||||||
|
|
||||||
@param Packet The packet to validate the options
|
@param[in] Packet The packet to validate the options
|
||||||
@param Para The variable to save the DHCP parameters.
|
@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_OUT_OF_RESOURCES Failed to allocate memory to validate the packet.
|
||||||
@retval EFI_INVALID_PARAMETER The options are mal-formated
|
@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
|
Append an option to the memory, if the option is longer than
|
||||||
255 bytes, splits it into several options.
|
255 bytes, splits it into several options.
|
||||||
|
|
||||||
@param Buf The buffer to append the option to
|
@param[out] Buf The buffer to append the option to
|
||||||
@param Tag The option's tag
|
@param[in] Tag The option's tag
|
||||||
@param DataLen The length of the option's data
|
@param[in] DataLen The length of the option's data
|
||||||
@param Data The option's data
|
@param[in] Data The option's data
|
||||||
|
|
||||||
@return The position to append the next option
|
@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
|
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.
|
appended. The caller should free the NewPacket when finished using it.
|
||||||
|
|
||||||
@param SeedPacket The seed packet to start with
|
@param[in] SeedPacket The seed packet to start with
|
||||||
@param DeleteCount The number of options to delete
|
@param[in] DeleteCount The number of options to delete
|
||||||
@param DeleteList The options to delete from the packet
|
@param[in] DeleteList The options to delete from the packet
|
||||||
@param AppendCount The number of options to append
|
@param[in] AppendCount The number of options to append
|
||||||
@param AppendList The options to append to the packet
|
@param[in] AppendList The options to append to the packet
|
||||||
@param NewPacket The new packet, allocated and built by this
|
@param[out] NewPacket The new packet, allocated and built by this
|
||||||
function.
|
function.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory
|
||||||
@retval EFI_INVALID_PARAMETER The options in SeekPacket are mal-formated
|
@retval EFI_INVALID_PARAMETER The options in SeekPacket are mal-formated
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
To validate, parse and process the DHCP options.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#ifndef __EFI_DHCP4_OPTION_H__
|
||||||
@ -233,10 +224,10 @@ EFI_STATUS
|
|||||||
the options in FILENAME and SERVERNAME fields. One option may be
|
the options in FILENAME and SERVERNAME fields. One option may be
|
||||||
encoded in several places. See RFC 3396 Encoding Long Options in DHCP
|
encoded in several places. See RFC 3396 Encoding Long Options in DHCP
|
||||||
|
|
||||||
@param Packet The DHCP packet to check the options for
|
@param[in] Packet The DHCP packet to check the options for
|
||||||
@param Check The callback function to be called for each option
|
@param[in] Check The callback function to be called for each option
|
||||||
found
|
found
|
||||||
@param Context The opaque parameter for Check
|
@param[in] Context The opaque parameter for Check
|
||||||
|
|
||||||
@retval EFI_SUCCESS The DHCP packet's options are well formated
|
@retval EFI_SUCCESS The DHCP packet's options are well formated
|
||||||
@retval EFI_INVALID_PARAMETER The DHCP packet's options are not 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
|
Validate the packet's options. If necessary, allocate
|
||||||
and fill in the interested parameters.
|
and fill in the interested parameters.
|
||||||
|
|
||||||
@param Packet The packet to validate the options
|
@param[in] Packet The packet to validate the options
|
||||||
@param Para The variable to save the DHCP parameters.
|
@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_OUT_OF_RESOURCES Failed to allocate memory to validate the packet.
|
||||||
@retval EFI_INVALID_PARAMETER The options are mal-formated
|
@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
|
with DhcpFillOption to fill each option's data to its position in the
|
||||||
buffer.
|
buffer.
|
||||||
|
|
||||||
@param Packet The DHCP packet to parse the options
|
@param[in] Packet The DHCP packet to parse the options
|
||||||
@param Count The number of valid dhcp options present in the
|
@param[out] Count The number of valid dhcp options present in the
|
||||||
packet
|
packet
|
||||||
@param OptionPoint The array that contains the DHCP options. Caller
|
@param[out] OptionPoint The array that contains the DHCP options. Caller
|
||||||
should free it.
|
should free it.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to parse the packet.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to parse the packet.
|
||||||
@retval EFI_INVALID_PARAMETER The options are mal-formated
|
@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
|
Append an option to the memory, if the option is longer than
|
||||||
255 bytes, splits it into several options.
|
255 bytes, splits it into several options.
|
||||||
|
|
||||||
@param Buf The buffer to append the option to
|
@param[out] Buf The buffer to append the option to
|
||||||
@param Tag The option's tag
|
@param[in] Tag The option's tag
|
||||||
@param DataLen The length of the option's data
|
@param[in] DataLen The length of the option's data
|
||||||
@param Data The option's data
|
@param[in] Data The option's data
|
||||||
|
|
||||||
@return The position to append the next option
|
@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
|
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.
|
appended. The caller should free the NewPacket when finished using it.
|
||||||
|
|
||||||
@param SeedPacket The seed packet to start with
|
@param[in] SeedPacket The seed packet to start with
|
||||||
@param DeleteCount The number of options to delete
|
@param[in] DeleteCount The number of options to delete
|
||||||
@param DeleteList The options to delete from the packet
|
@param[in] DeleteList The options to delete from the packet
|
||||||
@param AppendCount The number of options to append
|
@param[in] AppendCount The number of options to append
|
||||||
@param AppendList The options to append to the packet
|
@param[in] AppendList The options to append to the packet
|
||||||
@param NewPacket The new packet, allocated and built by this
|
@param[out] NewPacket The new packet, allocated and built by this
|
||||||
function.
|
function.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory
|
||||||
@retval EFI_INVALID_PARAMETER The options in SeekPacket are mal-formated
|
@retval EFI_INVALID_PARAMETER The options in SeekPacket are mal-formated
|
||||||
|
@ -204,7 +204,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
EfiNicIp4ConfigSetInfo (
|
EfiNicIp4ConfigSetInfo (
|
||||||
IN EFI_NIC_IP4_CONFIG_PROTOCOL *This,
|
IN EFI_NIC_IP4_CONFIG_PROTOCOL *This,
|
||||||
IN NIC_IP4_CONFIG_INFO *NicConfig, OPTIONAL
|
IN NIC_IP4_CONFIG_INFO *NicConfig OPTIONAL,
|
||||||
IN BOOLEAN Reconfig
|
IN BOOLEAN Reconfig
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Routines used to operate the Ip4 configure variable
|
Routines used to operate the Ip4 configure variable.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
@ -261,7 +261,7 @@ Ip4ConfigFindNicVariable (
|
|||||||
**/
|
**/
|
||||||
IP4_CONFIG_VARIABLE *
|
IP4_CONFIG_VARIABLE *
|
||||||
Ip4ConfigModifyVariable (
|
Ip4ConfigModifyVariable (
|
||||||
IN IP4_CONFIG_VARIABLE *Variable, OPTIONAL
|
IN IP4_CONFIG_VARIABLE *Variable OPTIONAL,
|
||||||
IN NIC_ADDR *NicAddr,
|
IN NIC_ADDR *NicAddr,
|
||||||
IN NIC_IP4_CONFIG_INFO *Config OPTIONAL
|
IN NIC_IP4_CONFIG_INFO *Config OPTIONAL
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Routines used to operate the Ip4 configure variable
|
Routines used to operate the Ip4 configure variable.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
@ -123,7 +123,7 @@ Ip4ConfigFindNicVariable (
|
|||||||
**/
|
**/
|
||||||
IP4_CONFIG_VARIABLE *
|
IP4_CONFIG_VARIABLE *
|
||||||
Ip4ConfigModifyVariable (
|
Ip4ConfigModifyVariable (
|
||||||
IN IP4_CONFIG_VARIABLE *Variable, OPTIONAL
|
IN IP4_CONFIG_VARIABLE *Variable OPTIONAL,
|
||||||
IN NIC_ADDR *NicAddr,
|
IN NIC_ADDR *NicAddr,
|
||||||
IN NIC_IP4_CONFIG_INFO *Config OPTIONAL
|
IN NIC_IP4_CONFIG_INFO *Config OPTIONAL
|
||||||
);
|
);
|
||||||
|
@ -1,22 +1,14 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2005 - 2007, Intel Corporation
|
Copyright (c) 2005 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
ComponentName.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
@ -34,10 +26,10 @@ Abstract:
|
|||||||
by This does not support the language specified by Language,
|
by This does not support the language specified by Language,
|
||||||
then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -46,7 +38,7 @@ Abstract:
|
|||||||
to the driver writer. Language is specified
|
to the driver writer. Language is specified
|
||||||
in RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
driver specified by This in the language
|
driver specified by This in the language
|
||||||
specified by Language.
|
specified by Language.
|
||||||
@ -85,15 +77,15 @@ Ip4ComponentNameGetDriverName (
|
|||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
specified by This is managing. This handle
|
||||||
specifies the controller whose name is to be
|
specifies the controller whose name is to be
|
||||||
returned.
|
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
|
the name of. This is an optional parameter that
|
||||||
may be NULL. It will be NULL for device
|
may be NULL. It will be NULL for device
|
||||||
drivers. It will also be NULL for a bus drivers
|
drivers. It will also be NULL for a bus drivers
|
||||||
@ -102,7 +94,7 @@ Ip4ComponentNameGetDriverName (
|
|||||||
driver that wishes to retrieve the name of a
|
driver that wishes to retrieve the name of a
|
||||||
child controller.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -111,7 +103,7 @@ Ip4ComponentNameGetDriverName (
|
|||||||
to the driver writer. Language is specified in
|
to the driver writer. Language is specified in
|
||||||
RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
controller specified by ControllerHandle and
|
controller specified by ControllerHandle and
|
||||||
ChildHandle in the language specified by
|
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,
|
by This does not support the language specified by Language,
|
||||||
then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
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
|
to the driver writer. Language is specified
|
||||||
in RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
driver specified by This in the language
|
driver specified by This in the language
|
||||||
specified by Language.
|
specified by Language.
|
||||||
@ -251,15 +243,15 @@ Ip4ComponentNameGetDriverName (
|
|||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
specified by This is managing. This handle
|
||||||
specifies the controller whose name is to be
|
specifies the controller whose name is to be
|
||||||
returned.
|
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
|
the name of. This is an optional parameter that
|
||||||
may be NULL. It will be NULL for device
|
may be NULL. It will be NULL for device
|
||||||
drivers. It will also be NULL for a bus drivers
|
drivers. It will also be NULL for a bus drivers
|
||||||
@ -268,7 +260,7 @@ Ip4ComponentNameGetDriverName (
|
|||||||
driver that wishes to retrieve the name of a
|
driver that wishes to retrieve the name of a
|
||||||
child controller.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -277,7 +269,7 @@ Ip4ComponentNameGetDriverName (
|
|||||||
to the driver writer. Language is specified in
|
to the driver writer. Language is specified in
|
||||||
RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
controller specified by ControllerHandle and
|
controller specified by ControllerHandle and
|
||||||
ChildHandle in the language specified by
|
ChildHandle in the language specified by
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,14 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Common.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
@ -26,8 +18,8 @@ Abstract:
|
|||||||
Return the cast type (Unicast/Boradcast) specific to an
|
Return the cast type (Unicast/Boradcast) specific to an
|
||||||
interface. All the addresses are host byte ordered.
|
interface. All the addresses are host byte ordered.
|
||||||
|
|
||||||
@param IpAddr The IP address to classify in host byte order
|
@param[in] IpAddr The IP address to classify in host byte order
|
||||||
@param IpIf The interface that IpAddr received from
|
@param[in] IpIf The interface that IpAddr received from
|
||||||
|
|
||||||
@return The cast type of this IP address specific to the interface.
|
@return The cast type of this IP address specific to the interface.
|
||||||
@retval IP4_LOCAL_HOST The IpAddr equals to the interface's address
|
@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
|
This isn't the same as link layer cast type. For example, DHCP
|
||||||
server may send local broadcast to the local unicast MAC.
|
server may send local broadcast to the local unicast MAC.
|
||||||
|
|
||||||
@param IpSb The IP4 service binding instance that received the
|
@param[in] IpSb The IP4 service binding instance that received the
|
||||||
packet
|
packet
|
||||||
@param Dst The destination address in the packet (host byte
|
@param[in] Dst The destination address in the packet (host byte
|
||||||
order)
|
order)
|
||||||
@param Src The source 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
|
@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
|
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.
|
Find an interface whose configured IP address is Ip.
|
||||||
|
|
||||||
@param IpSb The IP4 service binding instance
|
@param[in] IpSb The IP4 service binding instance
|
||||||
@param Ip The Ip address (host byte order) to find
|
@param[in] Ip The Ip address (host byte order) to find
|
||||||
|
|
||||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
@return The IP4_INTERFACE point if found, otherwise NULL
|
||||||
|
|
||||||
@ -165,8 +157,8 @@ Ip4FindInterface (
|
|||||||
/**
|
/**
|
||||||
Find an interface that Ip is on that connected network.
|
Find an interface that Ip is on that connected network.
|
||||||
|
|
||||||
@param IpSb The IP4 service binding instance
|
@param[in] IpSb The IP4 service binding instance
|
||||||
@param Ip The Ip address (host byte order) to find
|
@param[in] Ip The Ip address (host byte order) to find
|
||||||
|
|
||||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
@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.
|
Find an interface of the service with the same Ip/Netmask pair.
|
||||||
|
|
||||||
@param IpSb Ip4 service binding instance
|
@param[in] IpSb Ip4 service binding instance
|
||||||
@param Ip The Ip adress to find (host byte order)
|
@param[in] Ip The Ip adress to find (host byte order)
|
||||||
@param Netmask The network to find (host byte order)
|
@param[in] Netmask The network to find (host byte order)
|
||||||
|
|
||||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
@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
|
Mnp's McastIpToMac to find the MAC address in stead of
|
||||||
hard code the NIC to be Ethernet.
|
hard code the NIC to be Ethernet.
|
||||||
|
|
||||||
@param Mnp The Mnp instance to get the MAC address.
|
@param[in] Mnp The Mnp instance to get the MAC address.
|
||||||
@param Multicast The multicast IP address to translate.
|
@param[in] Multicast The multicast IP address to translate.
|
||||||
@param Mac The buffer to hold the translated address.
|
@param[out] Mac The buffer to hold the translated address.
|
||||||
|
|
||||||
@retval EFI_SUCCESS if the multicast IP is successfully translated to a
|
@retval EFI_SUCCESS if the multicast IP is successfully translated to a
|
||||||
multicast MAC address.
|
multicast MAC address.
|
||||||
@ -257,7 +249,7 @@ Ip4GetMulticastMac (
|
|||||||
In spite of its name, it can also be used to convert from
|
In spite of its name, it can also be used to convert from
|
||||||
host to network byte order.
|
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
|
@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
|
Save the list of all of the IPv4 addresses and subnet masks that are currently
|
||||||
being used to volatile variable storage.
|
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_SUCCESS Successfully set variable.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources to set the 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.
|
Clear the variable and free the resource.
|
||||||
|
|
||||||
@param IpSb Ip4 service binding instance
|
@param[in] IpSb Ip4 service binding instance
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Common definition for IP4.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#ifndef __EFI_IP4_COMMON_H__
|
||||||
@ -90,8 +81,8 @@ typedef enum {
|
|||||||
Return the cast type (Unicast/Boradcast) specific to an
|
Return the cast type (Unicast/Boradcast) specific to an
|
||||||
interface. All the addresses are host byte ordered.
|
interface. All the addresses are host byte ordered.
|
||||||
|
|
||||||
@param IpAddr The IP address to classify in host byte order
|
@param[in] IpAddr The IP address to classify in host byte order
|
||||||
@param IpIf The interface that IpAddr received from
|
@param[in] IpIf The interface that IpAddr received from
|
||||||
|
|
||||||
@return The cast type of this IP address specific to the interface.
|
@return The cast type of this IP address specific to the interface.
|
||||||
@retval IP4_LOCAL_HOST The IpAddr equals to the interface's address
|
@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
|
This isn't the same as link layer cast type. For example, DHCP
|
||||||
server may send local broadcast to the local unicast MAC.
|
server may send local broadcast to the local unicast MAC.
|
||||||
|
|
||||||
@param IpSb The IP4 service binding instance that received the
|
@param[in] IpSb The IP4 service binding instance that received the
|
||||||
packet
|
packet
|
||||||
@param Dst The destination address in the packet (host byte
|
@param[in] Dst The destination address in the packet (host byte
|
||||||
order)
|
order)
|
||||||
@param Src The source 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
|
@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
|
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.
|
Find an interface whose configured IP address is Ip.
|
||||||
|
|
||||||
@param IpSb The IP4 service binding instance
|
@param[in] IpSb The IP4 service binding instance
|
||||||
@param Ip The Ip address (host byte order) to find
|
@param[in] Ip The Ip address (host byte order) to find
|
||||||
|
|
||||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
@return The IP4_INTERFACE point if found, otherwise NULL
|
||||||
|
|
||||||
@ -148,8 +139,8 @@ Ip4FindInterface (
|
|||||||
/**
|
/**
|
||||||
Find an interface that Ip is on that connected network.
|
Find an interface that Ip is on that connected network.
|
||||||
|
|
||||||
@param IpSb The IP4 service binding instance
|
@param[in] IpSb The IP4 service binding instance
|
||||||
@param Ip The Ip address (host byte order) to find
|
@param[in] Ip The Ip address (host byte order) to find
|
||||||
|
|
||||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
@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.
|
Find an interface of the service with the same Ip/Netmask pair.
|
||||||
|
|
||||||
@param IpSb Ip4 service binding instance
|
@param[in] IpSb Ip4 service binding instance
|
||||||
@param Ip The Ip adress to find (host byte order)
|
@param[in] Ip The Ip adress to find (host byte order)
|
||||||
@param Netmask The network to find (host byte order)
|
@param[in] Netmask The network to find (host byte order)
|
||||||
|
|
||||||
@return The IP4_INTERFACE point if found, otherwise NULL
|
@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
|
Mnp's McastIpToMac to find the MAC address in stead of
|
||||||
hard code the NIC to be Ethernet.
|
hard code the NIC to be Ethernet.
|
||||||
|
|
||||||
@param Mnp The Mnp instance to get the MAC address.
|
@param[in] Mnp The Mnp instance to get the MAC address.
|
||||||
@param Multicast The multicast IP address to translate.
|
@param[in] Multicast The multicast IP address to translate.
|
||||||
@param Mac The buffer to hold the translated address.
|
@param[out] Mac The buffer to hold the translated address.
|
||||||
|
|
||||||
@retval EFI_SUCCESS if the multicast IP is successfully translated to a
|
@retval EFI_SUCCESS if the multicast IP is successfully translated to a
|
||||||
multicast MAC address.
|
multicast MAC address.
|
||||||
@ -203,7 +194,7 @@ Ip4GetMulticastMac (
|
|||||||
In spite of its name, it can also be used to convert from
|
In spite of its name, it can also be used to convert from
|
||||||
host to network byte order.
|
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
|
@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
|
Save the list of all of the IPv4 addresses and subnet masks that are currently
|
||||||
being used to volatile variable storage.
|
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_SUCCESS Successfully set variable.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources to set the 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.
|
Clear the variable and free the resource.
|
||||||
|
|
||||||
@param IpSb Ip4 service binding instance
|
@param[in] IpSb Ip4 service binding instance
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
The driver binding and service binding protocol for IP4 driver.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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"
|
#include "Ip4Impl.h"
|
||||||
@ -39,8 +31,8 @@ EFI_DRIVER_BINDING_PROTOCOL gIp4DriverBinding = {
|
|||||||
The entry point for IP4 driver which install the driver
|
The entry point for IP4 driver which install the driver
|
||||||
binding and component name protocol on its image.
|
binding and component name protocol on its image.
|
||||||
|
|
||||||
@param ImageHandle The firmware allocated handle for the UEFI image.
|
@param[in] ImageHandle The firmware allocated handle for the UEFI image.
|
||||||
@param SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
@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
|
follow these calling restrictions. If any other agent wishes to call
|
||||||
Supported() it must also follow these calling restrictions.
|
Supported() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to test
|
@param[in] ControllerHandle Handle of device to test
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver supports this device
|
@retval EFI_SUCCESS This driver supports this device
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
destroyed, it is marked as that in case the destory failed and
|
||||||
being called again later.
|
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 EFI_SUCCESS The resource used by the instance are cleaned up
|
||||||
@retval other Failed to clean up some of the resources.
|
@retval other Failed to clean up some of the resources.
|
||||||
@ -144,11 +136,11 @@ Ip4CleanService (
|
|||||||
/**
|
/**
|
||||||
Create a new IP4 driver service binding private instance.
|
Create a new IP4 driver service binding private instance.
|
||||||
|
|
||||||
@param Controller The controller that has MNP service binding
|
@param Controller The controller that has MNP service binding
|
||||||
installed
|
installed
|
||||||
@param ImageHandle The IP4 driver's image handle
|
@param ImageHandle The IP4 driver's image handle
|
||||||
@param Service The variable to receive the newly created IP4
|
@param Service The variable to receive the newly created IP4
|
||||||
service.
|
service.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate some resource
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate some resource
|
||||||
@retval EFI_SUCCESS A new IP4 service binding private is created.
|
@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
|
destroyed, it is marked as that in case the destory failed and
|
||||||
being called again later.
|
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 EFI_SUCCESS The resource used by the instance are cleaned up
|
||||||
@retval other Failed to clean up some of the resources.
|
@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
|
calling restrictions. If any other agent wishes to call Start() it
|
||||||
must also follow these calling restrictions.
|
must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to bind driver to
|
@param[in] ControllerHandle Handle of device to bind driver to
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
must follow these calling restrictions. If any other agent wishes
|
||||||
to call Stop() it must also follow these calling restrictions.
|
to call Stop() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to stop driver on
|
@param[in] ControllerHandle Handle of device to stop driver on
|
||||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number
|
||||||
children is zero stop the entire bus driver.
|
of children is zero stop the entire bus driver.
|
||||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||||
@retval other This driver was not removed from this device
|
@retval other This driver was not removed from this device
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
then a new handle is created. If it is not NULL, then the
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
I/O services are added to the existing child handle.
|
|
||||||
|
|
||||||
@retval EFI_SUCCES The child handle was created with the I/O services
|
@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_INVALID_PARAMETER ChildHandle is NULL.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
||||||
the child
|
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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
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
|
@param ChildHandle Handle of the child to destroy
|
||||||
|
|
||||||
@retval EFI_SUCCES The I/O services were removed from the child handle
|
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
that are being removed.
|
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
|
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||||
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
|
because its services are being used.
|
||||||
I/O services are being used.
|
|
||||||
@retval other The child handle was not destroyed
|
@retval other The child handle was not destroyed
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2005 - 2007, Intel Corporation
|
Copyright (c) 2005 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,14 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Driver.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __EFI_IP4_DRIVER_H__
|
#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
|
The entry point for IP4 driver which install the driver
|
||||||
binding and component name protocol on its image.
|
binding and component name protocol on its image.
|
||||||
|
|
||||||
@param ImageHandle The firmware allocated handle for the UEFI image.
|
@param[in] ImageHandle The firmware allocated handle for the UEFI image.
|
||||||
@param SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
@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
|
follow these calling restrictions. If any other agent wishes to call
|
||||||
Supported() it must also follow these calling restrictions.
|
Supported() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to test
|
@param[in] ControllerHandle Handle of device to test
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver supports this device
|
@retval EFI_SUCCESS This driver supports this device
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
calling restrictions. If any other agent wishes to call Start() it
|
||||||
must also follow these calling restrictions.
|
must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to bind driver to
|
@param[in] ControllerHandle Handle of device to bind driver to
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
must follow these calling restrictions. If any other agent wishes
|
||||||
to call Stop() it must also follow these calling restrictions.
|
to call Stop() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to stop driver on
|
@param[in] ControllerHandle Handle of device to stop driver on
|
||||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number
|
||||||
children is zero stop the entire bus driver.
|
of children is zero stop the entire bus driver.
|
||||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||||
@retval other This driver was not removed from this device
|
@retval other This driver was not removed from this device
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -139,14 +131,18 @@ Ip4DriverBindingStop (
|
|||||||
// Function ptototypes for the ServiceBinding Prococol
|
// 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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
then a new handle is created. If it is not NULL, then the
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
I/O services are added to the existing child handle.
|
|
||||||
|
|
||||||
@retval EFI_SUCCES The child handle was created with the I/O services
|
@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_INVALID_PARAMETER ChildHandle is NULL.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
||||||
the child
|
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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
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
|
@param ChildHandle Handle of the child to destroy
|
||||||
|
|
||||||
@retval EFI_SUCCES The I/O services were removed from the child handle
|
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
that are being removed.
|
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
|
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||||
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
|
because its services are being used.
|
||||||
I/O services are being used.
|
|
||||||
@retval other The child handle was not destroyed
|
@retval other The child handle was not destroyed
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,14 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Icmp.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
@ -88,12 +80,12 @@ mIp4SupportedIcmp[23] = {
|
|||||||
message SHOULD be treated identically to a Host Redirect
|
message SHOULD be treated identically to a Host Redirect
|
||||||
message;"
|
message;"
|
||||||
|
|
||||||
@param IpSb The IP4 service binding instance that received the
|
@param[in] IpSb The IP4 service binding instance that received
|
||||||
packet
|
the packet.
|
||||||
@param Head The IP head of the received ICMPpacket.
|
@param[in] Head The IP head of the received ICMPpacket.
|
||||||
@param Packet The content of the ICMP redirect packet with IP
|
@param[in] Packet The content of the ICMP redirect packet with IP
|
||||||
head removed.
|
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.
|
something is wrong.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER The parameter is invalid
|
@retval EFI_INVALID_PARAMETER The parameter is invalid
|
||||||
@ -166,9 +158,9 @@ Ip4ProcessIcmpRedirect (
|
|||||||
update call Ip4ProcessIcmpRedirect to update the IP instance's
|
update call Ip4ProcessIcmpRedirect to update the IP instance's
|
||||||
route cache, otherwise, deliver the packet to upper layer.
|
route cache, otherwise, deliver the packet to upper layer.
|
||||||
|
|
||||||
@param IpSb The IP service that received the packet.
|
@param[in] IpSb The IP service that received the packet.
|
||||||
@param Head The IP head of the ICMP error packet
|
@param[in] Head The IP head of the ICMP error packet
|
||||||
@param Packet The content of the ICMP error with IP head
|
@param[in] Packet The content of the ICMP error with IP head
|
||||||
removed.
|
removed.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The ICMP error is processed successfully.
|
@retval EFI_SUCCESS The ICMP error is processed successfully.
|
||||||
@ -208,9 +200,9 @@ Ip4ProcessIcmpError (
|
|||||||
/**
|
/**
|
||||||
Replay an ICMP echo request.
|
Replay an ICMP echo request.
|
||||||
|
|
||||||
@param IpSb The IP service that receivd the packet
|
@param[in] IpSb The IP service that receivd the packet
|
||||||
@param Head The IP head of the ICMP error packet
|
@param[in] Head The IP head of the ICMP error packet
|
||||||
@param Packet The content of the ICMP error with IP head
|
@param[in] Packet The content of the ICMP error with IP head
|
||||||
removed.
|
removed.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource.
|
@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
|
Process the ICMP query message. If it is an ICMP echo
|
||||||
request, answer it. Otherwise deliver it to upper layer.
|
request, answer it. Otherwise deliver it to upper layer.
|
||||||
|
|
||||||
@param IpSb The IP service that receivd the packet
|
@param[in] IpSb The IP service that receivd the packet
|
||||||
@param Head The IP head of the ICMP query packet
|
@param[in] Head The IP head of the ICMP query packet
|
||||||
@param Packet The content of the ICMP query with IP head
|
@param[in] Packet The content of the ICMP query with IP head
|
||||||
removed.
|
removed.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER The packet is invalid
|
@retval EFI_INVALID_PARAMETER The packet is invalid
|
||||||
@ -324,9 +316,9 @@ Ip4ProcessIcmpQuery (
|
|||||||
then according to the message types, process it as query or
|
then according to the message types, process it as query or
|
||||||
error packet.
|
error packet.
|
||||||
|
|
||||||
@param IpSb The IP service that receivd the packet
|
@param[in] IpSb The IP service that receivd the packet
|
||||||
@param Head The IP head of the ICMP query packet
|
@param[in] Head The IP head of the ICMP query packet
|
||||||
@param Packet The content of the ICMP query with IP head
|
@param[in] Packet The content of the ICMP query with IP head
|
||||||
removed.
|
removed.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER The packet is malformated.
|
@retval EFI_INVALID_PARAMETER The packet is malformated.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Header file for ICMP protocol.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#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
|
then according to the message types, process it as query or
|
||||||
error packet.
|
error packet.
|
||||||
|
|
||||||
@param IpSb The IP service that receivd the packet
|
@param[in] IpSb The IP service that receivd the packet
|
||||||
@param Head The IP head of the ICMP query packet
|
@param[in] Head The IP head of the ICMP query packet
|
||||||
@param Packet The content of the ICMP query with IP head
|
@param[in] Packet The content of the ICMP query with IP head
|
||||||
removed.
|
removed.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER The packet is malformated.
|
@retval EFI_INVALID_PARAMETER The packet is malformated.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Implement IP4 pesudo interface.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2007, Intel Corporation
|
Copyright (c) 2005 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4If.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Implement IP4 pesudo interface.
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
@ -33,9 +24,7 @@ EFI_MAC_ADDRESS mZeroMacAddress;
|
|||||||
Callback funtion when frame transmission is finished. It will
|
Callback funtion when frame transmission is finished. It will
|
||||||
call the frame owner's callback function to tell it the result.
|
call the frame owner's callback function to tell it the result.
|
||||||
|
|
||||||
@param Context Context which is point to the token.
|
@param[in] Context Context which is point to the token.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -47,10 +36,8 @@ Ip4OnFrameSentDpc (
|
|||||||
/**
|
/**
|
||||||
Request Ip4OnFrameSentDpc as a DPC at TPL_CALLBACK.
|
Request Ip4OnFrameSentDpc as a DPC at TPL_CALLBACK.
|
||||||
|
|
||||||
@param Event The transmit token's event.
|
@param[in] Event The transmit token's event.
|
||||||
@param Context Context which is point to the token.
|
@param[in] Context Context which is point to the token.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -65,11 +52,9 @@ Ip4OnFrameSent (
|
|||||||
all the queued frame if the ARP requests failed. Or transmit them
|
all the queued frame if the ARP requests failed. Or transmit them
|
||||||
if the request succeed.
|
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
|
queue
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -80,11 +65,9 @@ Ip4OnArpResolvedDpc (
|
|||||||
/**
|
/**
|
||||||
Request Ip4OnArpResolvedDpc as a DPC at TPL_CALLBACK.
|
Request Ip4OnArpResolvedDpc as a DPC at TPL_CALLBACK.
|
||||||
|
|
||||||
@param Event The Arp request event.
|
@param Event The Arp request event.
|
||||||
@param Context The context of the callback, a point to the ARP
|
@param Context The context of the callback, a point to the ARP
|
||||||
queue.
|
queue.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -104,8 +87,6 @@ Ip4OnArpResolved (
|
|||||||
|
|
||||||
@param Context Context for the callback.
|
@param Context Context for the callback.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -114,14 +95,11 @@ Ip4OnFrameReceivedDpc (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Request Ip4OnFrameReceivedDpc as a DPC at TPL_CALLBACK.
|
Request Ip4OnFrameReceivedDpc as a DPC at TPL_CALLBACK.
|
||||||
|
|
||||||
@param Event The receive event delivered to MNP for receive.
|
@param Event The receive event delivered to MNP for receive.
|
||||||
@param Context Context for the callback.
|
@param Context Context for the callback.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -134,13 +112,11 @@ Ip4OnFrameReceived (
|
|||||||
Remove all the frames on the ARP queue that pass the FrameToCancel,
|
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.
|
that is, either FrameToCancel is NULL or it returns true for the frame.
|
||||||
|
|
||||||
@param ArpQue ARP frame to remove the frames from.
|
@param[in] ArpQue ARP frame to remove the frames from.
|
||||||
@param IoStatus The status returned to the cancelled frames'
|
@param[in] IoStatus The status returned to the cancelled frames'
|
||||||
callback function.
|
callback function.
|
||||||
@param FrameToCancel Function to select which frame to cancel.
|
@param[in] FrameToCancel Function to select which frame to cancel.
|
||||||
@param Context Opaque parameter to the FrameToCancel.
|
@param[in] Context Opaque parameter to the FrameToCancel.
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -155,15 +131,16 @@ Ip4CancelFrameArp (
|
|||||||
/**
|
/**
|
||||||
Wrap a transmit request into a newly allocated IP4_LINK_TX_TOKEN.
|
Wrap a transmit request into a newly allocated IP4_LINK_TX_TOKEN.
|
||||||
|
|
||||||
@param Interface The interface to send out to.
|
@param[in] Interface The interface to send out to.
|
||||||
@param IpInstance The IpInstance that transmit the packet. NULL if
|
@param[in] IpInstance The IpInstance that transmit the packet. NULL if
|
||||||
the packet is sent by the IP4 driver itself.
|
the packet is sent by the IP4 driver itself.
|
||||||
@param Packet The packet to transmit
|
@param[in] Packet The packet to transmit
|
||||||
@param CallBack Call back function to execute if transmission
|
@param[in] CallBack Call back function to execute if transmission
|
||||||
finished.
|
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 *
|
IP4_LINK_TX_TOKEN *
|
||||||
@ -237,9 +214,7 @@ Ip4WrapLinkTxToken (
|
|||||||
Free the link layer transmit token. It will close the event
|
Free the link layer transmit token. It will close the event
|
||||||
then free the memory used.
|
then free the memory used.
|
||||||
|
|
||||||
@param Token Token to free
|
@param[in] Token Token to free
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -257,8 +232,8 @@ Ip4FreeLinkTxToken (
|
|||||||
/**
|
/**
|
||||||
Create an IP_ARP_QUE structure to request ARP service.
|
Create an IP_ARP_QUE structure to request ARP service.
|
||||||
|
|
||||||
@param Interface The interface to send ARP from.
|
@param[in] Interface The interface to send ARP from.
|
||||||
@param DestIp The destination IP (host byte order) to request MAC
|
@param[in] DestIp The destination IP (host byte order) to request MAC
|
||||||
for
|
for
|
||||||
|
|
||||||
@return Point to newly created IP4_ARP_QUE if succeed, otherwise NULL.
|
@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.
|
Remove all the transmit requests queued on the ARP queue, then free it.
|
||||||
|
|
||||||
@param ArpQue Arp queue to free
|
@param[in] ArpQue Arp queue to free
|
||||||
@param IoStatus The transmit status returned to transmit requests'
|
@param[in] IoStatus The transmit status returned to transmit requests'
|
||||||
callback.
|
callback.
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4FreeArpQue (
|
Ip4FreeArpQue (
|
||||||
@ -336,11 +309,11 @@ Ip4FreeArpQue (
|
|||||||
/**
|
/**
|
||||||
Create a link layer receive token to wrap the receive request
|
Create a link layer receive token to wrap the receive request
|
||||||
|
|
||||||
@param Interface The interface to receive from
|
@param[in] Interface The interface to receive from
|
||||||
@param IpInstance The instance that request the receive (NULL for IP4
|
@param[in] IpInstance The instance that request the receive (NULL for IP4
|
||||||
driver itself)
|
driver itself)
|
||||||
@param CallBack Call back function to execute when finished.
|
@param[in] CallBack Call back function to execute when finished.
|
||||||
@param Context Opaque parameters to the callback
|
@param[in] Context Opaque parameters to the callback
|
||||||
|
|
||||||
@return Point to created IP4_LINK_RX_TOKEN if succeed, otherwise NULL.
|
@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
|
Free the link layer request token. It will close the event
|
||||||
then free the memory used.
|
then free the memory used.
|
||||||
|
|
||||||
@param Token Request token to free
|
@param[in] Token Request token to free.
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -415,13 +386,11 @@ Ip4FreeFrameRxToken (
|
|||||||
Remove all the frames on the ARP queue that pass the FrameToCancel,
|
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.
|
that is, either FrameToCancel is NULL or it returns true for the frame.
|
||||||
|
|
||||||
@param ArpQue ARP frame to remove the frames from.
|
@param[in] ArpQue ARP frame to remove the frames from.
|
||||||
@param IoStatus The status returned to the cancelled frames'
|
@param[in] IoStatus The status returned to the cancelled frames'
|
||||||
callback function.
|
callback function.
|
||||||
@param FrameToCancel Function to select which frame to cancel.
|
@param[in] FrameToCancel Function to select which frame to cancel.
|
||||||
@param Context Opaque parameter to the FrameToCancel.
|
@param[in] Context Opaque parameter to the FrameToCancel.
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -454,14 +423,12 @@ Ip4CancelFrameArp (
|
|||||||
either queued on ARP queues or that have already been delivered to
|
either queued on ARP queues or that have already been delivered to
|
||||||
MNP and not yet recycled.
|
MNP and not yet recycled.
|
||||||
|
|
||||||
@param Interface Interface to remove the frames from
|
@param[in] Interface Interface to remove the frames from
|
||||||
@param IoStatus The transmit status returned to the frames'
|
@param[in] IoStatus The transmit status returned to the frames'
|
||||||
callback
|
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
|
select all
|
||||||
@param Context Opaque parameters passed to FrameToCancel
|
@param[in] Context Opaque parameters passed to FrameToCancel
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -508,11 +475,11 @@ Ip4CancelFrames (
|
|||||||
Create an IP4_INTERFACE. Delay the creation of ARP instance until
|
Create an IP4_INTERFACE. Delay the creation of ARP instance until
|
||||||
the interface is configured.
|
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
|
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.
|
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.
|
@return Point to the created IP4_INTERFACE, otherwise NULL.
|
||||||
|
|
||||||
@ -575,9 +542,9 @@ Ip4CreateInterface (
|
|||||||
Set the interface's address, create and configure
|
Set the interface's address, create and configure
|
||||||
the ARP child if necessary.
|
the ARP child if necessary.
|
||||||
|
|
||||||
@param Interface The interface to set the address
|
@param Interface The interface to set the address
|
||||||
@param IpAddr The interface's IP address
|
@param IpAddr The interface's IP address
|
||||||
@param SubnetMask The interface's netmask
|
@param SubnetMask The interface's netmask
|
||||||
|
|
||||||
@retval EFI_SUCCESS The interface is configured with Ip/netmask pair,
|
@retval EFI_SUCCESS The interface is configured with Ip/netmask pair,
|
||||||
and a ARP is created for it.
|
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.
|
Filter function to cancel all the frame related to an IP instance.
|
||||||
|
|
||||||
@param Frame The transmit request to test whether to cancel
|
@param[in] Frame The transmit request to test whether to cancel
|
||||||
@param Context The context which is the Ip instance that issued
|
@param[in] Context The context which is the Ip instance that issued
|
||||||
the transmit.
|
the transmit.
|
||||||
|
|
||||||
@retval TRUE The frame belongs to this instance and is to be
|
@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
|
packet and update the upper layer's transmit request status, say
|
||||||
that from the UDP.
|
that from the UDP.
|
||||||
|
|
||||||
@param Interface The interface used by the IpInstance
|
@param[in] Interface The interface used by the IpInstance
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -754,8 +719,8 @@ Ip4CancelReceive (
|
|||||||
Because the IpInstance is optional, the caller must remove
|
Because the IpInstance is optional, the caller must remove
|
||||||
IpInstance from the interface's instance list itself.
|
IpInstance from the interface's instance list itself.
|
||||||
|
|
||||||
@param Interface The interface used by the IpInstance
|
@param[in] Interface The interface used by the IpInstance
|
||||||
@param IpInstance The Ip instance that free the interface. NULL if
|
@param[in] IpInstance The Ip instance that free the interface. NULL if
|
||||||
the Ip driver is releasing the default interface.
|
the Ip driver is releasing the default interface.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The interface use IpInstance is freed.
|
@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
|
all the queued frame if the ARP requests failed. Or transmit them
|
||||||
if the request succeed.
|
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
|
queue
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -893,11 +856,9 @@ Ip4OnArpResolvedDpc (
|
|||||||
/**
|
/**
|
||||||
Request Ip4OnArpResolvedDpc as a DPC at TPL_CALLBACK.
|
Request Ip4OnArpResolvedDpc as a DPC at TPL_CALLBACK.
|
||||||
|
|
||||||
@param Event The Arp request event.
|
@param Event The Arp request event.
|
||||||
@param Context The context of the callback, a point to the ARP
|
@param Context The context of the callback, a point to the ARP
|
||||||
queue.
|
queue.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -919,9 +880,7 @@ Ip4OnArpResolved (
|
|||||||
Callback funtion when frame transmission is finished. It will
|
Callback funtion when frame transmission is finished. It will
|
||||||
call the frame owner's callback function to tell it the result.
|
call the frame owner's callback function to tell it the result.
|
||||||
|
|
||||||
@param Context Context which is point to the token.
|
@param[in] Context Context which is point to the token.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -951,10 +910,8 @@ Ip4OnFrameSentDpc (
|
|||||||
/**
|
/**
|
||||||
Request Ip4OnFrameSentDpc as a DPC at TPL_CALLBACK.
|
Request Ip4OnFrameSentDpc as a DPC at TPL_CALLBACK.
|
||||||
|
|
||||||
@param Event The transmit token's event.
|
@param[in] Event The transmit token's event.
|
||||||
@param Context Context which is point to the token.
|
@param[in] Context Context which is point to the token.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -979,14 +936,14 @@ Ip4OnFrameSent (
|
|||||||
If some error happened, the CallBack won't be called. So, the caller
|
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.
|
must test the return value, and take action when there is an error.
|
||||||
|
|
||||||
@param Interface The interface to send the frame from
|
@param[in] Interface The interface to send the frame from
|
||||||
@param IpInstance The IP child that request the transmission. NULL
|
@param[in] IpInstance The IP child that request the transmission. NULL
|
||||||
if it is the IP4 driver itself.
|
if it is the IP4 driver itself.
|
||||||
@param Packet The packet to transmit.
|
@param[in] Packet The packet to transmit.
|
||||||
@param NextHop The immediate destination to transmit the packet
|
@param[in] NextHop The immediate destination to transmit the packet
|
||||||
to.
|
to.
|
||||||
@param CallBack Function to call back when transmit finished.
|
@param[in] CallBack Function to call back when transmit finished.
|
||||||
@param Context Opaque parameter to the call back.
|
@param[in] Context Opaque parameter to the call back.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to send the frame
|
@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
|
@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.
|
Call back function when the received packet is freed.
|
||||||
Check Ip4OnFrameReceived for information.
|
Check Ip4OnFrameReceived for information.
|
||||||
|
|
||||||
@param Context Context, which is the IP4_LINK_RX_TOKEN.
|
@param Context Context, which is the IP4_LINK_RX_TOKEN.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1157,8 +1112,6 @@ Ip4RecycleFrame (
|
|||||||
|
|
||||||
@param Context Context for the callback.
|
@param Context Context for the callback.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -1218,14 +1171,11 @@ Ip4OnFrameReceivedDpc (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Request Ip4OnFrameReceivedDpc as a DPC at TPL_CALLBACK.
|
Request Ip4OnFrameReceivedDpc as a DPC at TPL_CALLBACK.
|
||||||
|
|
||||||
@param Event The receive event delivered to MNP for receive.
|
@param Event The receive event delivered to MNP for receive.
|
||||||
@param Context Context for the callback.
|
@param Context Context for the callback.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -1244,11 +1194,11 @@ Ip4OnFrameReceived (
|
|||||||
/**
|
/**
|
||||||
Request to receive the packet from the interface.
|
Request to receive the packet from the interface.
|
||||||
|
|
||||||
@param Interface The interface to receive the frames from
|
@param[in] Interface The interface to receive the frames from
|
||||||
@param IpInstance The instance that requests the receive. NULL for
|
@param[in] IpInstance The instance that requests the receive. NULL for
|
||||||
the driver itself.
|
the driver itself.
|
||||||
@param CallBack Function to call when receive finished.
|
@param[in] CallBack Function to call when receive finished.
|
||||||
@param Context Opaque parameter to the callback
|
@param[in] Context Opaque parameter to the callback
|
||||||
|
|
||||||
@retval EFI_ALREADY_STARTED There is already a pending receive request.
|
@retval EFI_ALREADY_STARTED There is already a pending receive request.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to receive
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to receive
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Definition for IP4 pesudo interface structure.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#ifndef __EFI_IP4_IF_H__
|
||||||
@ -40,24 +31,24 @@ typedef enum {
|
|||||||
When transmitting, the Netbuf is from IP4, and provided
|
When transmitting, the Netbuf is from IP4, and provided
|
||||||
to the callback as a reference. Flag isn't used.
|
to the callback as a reference. Flag isn't used.
|
||||||
|
|
||||||
@param IpInstance The instance that sent or received the packet.
|
@param[in] IpInstance The instance that sent or received the packet.
|
||||||
IpInstance can be NULL which means that it is the IP4 driver
|
IpInstance can be NULL which means that it is the IP4 driver
|
||||||
itself sending the packets. IP4 driver may send packets that
|
itself sending the packets. IP4 driver may send packets that
|
||||||
don't belong to any instance, such as ICMP errors, ICMP echo
|
don't belong to any instance, such as ICMP errors, ICMP echo
|
||||||
responses, or IGMP packets. IpInstance is used as a tag in
|
responses, or IGMP packets. IpInstance is used as a tag in
|
||||||
this module.
|
this module.
|
||||||
@param Packet The sent or received packet.
|
@param[in] Packet The sent or received packet.
|
||||||
@param IoStatus Status of sending or receiving.
|
@param[in] IoStatus Status of sending or receiving.
|
||||||
@param LinkFlag Indicate if the frame is received as link broadcast/multicast.
|
@param[in] LinkFlag Indicate if the frame is received as link broadcast/multicast.
|
||||||
When transmitting, it is not used.
|
When transmitting, it is not used.
|
||||||
@param Context Additional data for callback.
|
@param[in] Context Additional data for callback.
|
||||||
|
|
||||||
@return None.
|
@retval None.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
(*IP4_FRAME_CALLBACK)(
|
(*IP4_FRAME_CALLBACK)(
|
||||||
IN IP4_PROTOCOL *IpInstance, OPTIONAL
|
IN IP4_PROTOCOL *IpInstance OPTIONAL,
|
||||||
IN NET_BUF *Packet,
|
IN NET_BUF *Packet,
|
||||||
IN EFI_STATUS IoStatus,
|
IN EFI_STATUS IoStatus,
|
||||||
IN UINT32 LinkFlag,
|
IN UINT32 LinkFlag,
|
||||||
@ -202,11 +193,11 @@ struct _IP4_INTERFACE {
|
|||||||
Create an IP4_INTERFACE. Delay the creation of ARP instance until
|
Create an IP4_INTERFACE. Delay the creation of ARP instance until
|
||||||
the interface is configured.
|
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
|
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.
|
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.
|
@return Point to the created IP4_INTERFACE, otherwise NULL.
|
||||||
|
|
||||||
@ -222,9 +213,9 @@ Ip4CreateInterface (
|
|||||||
Set the interface's address, create and configure
|
Set the interface's address, create and configure
|
||||||
the ARP child if necessary.
|
the ARP child if necessary.
|
||||||
|
|
||||||
@param Interface The interface to set the address
|
@param Interface The interface to set the address
|
||||||
@param IpAddr The interface's IP address
|
@param IpAddr The interface's IP address
|
||||||
@param SubnetMask The interface's netmask
|
@param SubnetMask The interface's netmask
|
||||||
|
|
||||||
@retval EFI_SUCCESS The interface is configured with Ip/netmask pair,
|
@retval EFI_SUCCESS The interface is configured with Ip/netmask pair,
|
||||||
and a ARP is created for it.
|
and a ARP is created for it.
|
||||||
@ -245,8 +236,8 @@ Ip4SetAddress (
|
|||||||
Because the IpInstance is optional, the caller must remove
|
Because the IpInstance is optional, the caller must remove
|
||||||
IpInstance from the interface's instance list itself.
|
IpInstance from the interface's instance list itself.
|
||||||
|
|
||||||
@param Interface The interface used by the IpInstance
|
@param[in] Interface The interface used by the IpInstance
|
||||||
@param IpInstance The Ip instance that free the interface. NULL if
|
@param[in] IpInstance The Ip instance that free the interface. NULL if
|
||||||
the Ip driver is releasing the default interface.
|
the Ip driver is releasing the default interface.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The interface use IpInstance is freed.
|
@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
|
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.
|
must test the return value, and take action when there is an error.
|
||||||
|
|
||||||
@param Interface The interface to send the frame from
|
@param[in] Interface The interface to send the frame from
|
||||||
@param IpInstance The IP child that request the transmission. NULL
|
@param[in] IpInstance The IP child that request the transmission. NULL
|
||||||
if it is the IP4 driver itself.
|
if it is the IP4 driver itself.
|
||||||
@param Packet The packet to transmit.
|
@param[in] Packet The packet to transmit.
|
||||||
@param NextHop The immediate destination to transmit the packet
|
@param[in] NextHop The immediate destination to transmit the packet
|
||||||
to.
|
to.
|
||||||
@param CallBack Function to call back when transmit finished.
|
@param[in] CallBack Function to call back when transmit finished.
|
||||||
@param Context Opaque parameter to the call back.
|
@param[in] Context Opaque parameter to the call back.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to send the frame
|
@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
|
@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
|
either queued on ARP queues or that have already been delivered to
|
||||||
MNP and not yet recycled.
|
MNP and not yet recycled.
|
||||||
|
|
||||||
@param Interface Interface to remove the frames from
|
@param[in] Interface Interface to remove the frames from
|
||||||
@param IoStatus The transmit status returned to the frames'
|
@param[in] IoStatus The transmit status returned to the frames'
|
||||||
callback
|
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
|
select all
|
||||||
@param Context Opaque parameters passed to FrameToCancel
|
@param[in] Context Opaque parameters passed to FrameToCancel
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -322,9 +311,7 @@ Ip4CancelFrames (
|
|||||||
packet and update the upper layer's transmit request status, say
|
packet and update the upper layer's transmit request status, say
|
||||||
that from the UDP.
|
that from the UDP.
|
||||||
|
|
||||||
@param Interface The interface used by the IpInstance
|
@param[in] Interface The interface used by the IpInstance
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -335,11 +322,11 @@ Ip4CancelReceive (
|
|||||||
/**
|
/**
|
||||||
Request to receive the packet from the interface.
|
Request to receive the packet from the interface.
|
||||||
|
|
||||||
@param Interface The interface to receive the frames from
|
@param[in] Interface The interface to receive the frames from
|
||||||
@param IpInstance The instance that requests the receive. NULL for
|
@param[in] IpInstance The instance that requests the receive. NULL for
|
||||||
the driver itself.
|
the driver itself.
|
||||||
@param CallBack Function to call when receive finished.
|
@param[in] CallBack Function to call when receive finished.
|
||||||
@param Context Opaque parameter to the callback
|
@param[in] Context Opaque parameter to the callback
|
||||||
|
|
||||||
@retval EFI_ALREADY_STARTED There is already a pending receive request.
|
@retval EFI_ALREADY_STARTED There is already a pending receive request.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to receive
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to receive
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
This file implements the RFC2236: IGMP v2.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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"
|
#include "Ip4Impl.h"
|
||||||
@ -34,7 +25,7 @@ UINT32 mRouteAlertOption = 0x00000494;
|
|||||||
Init the IGMP control data of the IP4 service instance, configure
|
Init the IGMP control data of the IP4 service instance, configure
|
||||||
MNP to receive ALL SYSTEM multicast.
|
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_SUCCESS IGMP of the IpSb is successfully initialized.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to initialize IGMP.
|
@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
|
Find the IGMP_GROUP structure which contains the status of multicast
|
||||||
group Address in this IGMP control block
|
group Address in this IGMP control block
|
||||||
|
|
||||||
@param IgmpCtrl The IGMP control block to search from
|
@param[in] IgmpCtrl The IGMP control block to search from
|
||||||
@param Address The multicast address to search
|
@param[in] Address The multicast address to search
|
||||||
|
|
||||||
@return NULL if the multicast address isn't in the IGMP control block. Otherwise
|
@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
|
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
|
same MAC address. Several IP4 multicast address may be mapped to
|
||||||
the same MAC address.
|
the same MAC address.
|
||||||
|
|
||||||
@param IgmpCtrl The IGMP control block to search in
|
@param[in] IgmpCtrl The IGMP control block to search in
|
||||||
@param Mac The MAC address to search
|
@param[in] Mac The MAC address to search
|
||||||
|
|
||||||
@return The number of the IP4 multicast group that mapped to the same
|
@return The number of the IP4 multicast group that mapped to the same
|
||||||
multicast group Mac.
|
multicast group Mac.
|
||||||
@ -162,12 +153,12 @@ Ip4FindMac (
|
|||||||
/**
|
/**
|
||||||
Send an IGMP protocol message to the Dst, such as IGMP v1 membership report.
|
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
|
transmission
|
||||||
@param Dst The destinaton to send to
|
@param[in] Dst The destinaton to send to
|
||||||
@param Type The IGMP message type, such as IGMP v1 membership
|
@param[in] Type The IGMP message type, such as IGMP v1 membership
|
||||||
report
|
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_OUT_OF_RESOURCES Failed to allocate memory to build the message
|
||||||
@retval EFI_SUCCESS The IGMP message is successfully send
|
@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
|
Send an IGMP membership report. Depends on whether the server is
|
||||||
v1 or v2, it will send either a V1 or V2 membership report.
|
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.
|
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_OUT_OF_RESOURCES Failed to allocate memory to build the message
|
||||||
@retval EFI_SUCCESS The IGMP report message is successfully send
|
@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
|
Join the multicast group on behalf of this IP4 child
|
||||||
|
|
||||||
@param IpInstance The IP4 child that wants to join the group
|
@param[in] IpInstance The IP4 child that wants to join the group
|
||||||
@param Address The group to join
|
@param[in] Address The group to join
|
||||||
|
|
||||||
@retval EFI_SUCCESS Successfully join the multicast group
|
@retval EFI_SUCCESS Successfully join the multicast group
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources
|
||||||
@ -339,9 +330,9 @@ ON_ERROR:
|
|||||||
/**
|
/**
|
||||||
Leave the IP4 multicast group on behalf of IpInstance.
|
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
|
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_NOT_FOUND The IP4 service instance isn't in the group
|
||||||
@retval EFI_SUCCESS Successfully leave the multicast group.
|
@retval EFI_SUCCESS Successfully leave the multicast group.
|
||||||
@ -409,9 +400,9 @@ Ip4LeaveGroup (
|
|||||||
/**
|
/**
|
||||||
Handle the received IGMP message for the IP4 service instance.
|
Handle the received IGMP message for the IP4 service instance.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that received the message
|
@param[in] IpSb The IP4 service instance that received the message
|
||||||
@param Head The IP4 header of the received message
|
@param[in] Head The IP4 header of the received message
|
||||||
@param Packet The IGMP message, without IP4 header
|
@param[in] Packet The IGMP message, without IP4 header
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER The IGMP message is malformated.
|
@retval EFI_INVALID_PARAMETER The IGMP message is malformated.
|
||||||
@retval EFI_SUCCESS The IGMP message is successfully processed.
|
@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
|
2. Decrease the report timer for each IGMP group in "delaying
|
||||||
member" state.
|
member" state.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that is ticking
|
@param[in] IpSb The IP4 service instance that is ticking
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -561,9 +550,9 @@ Ip4IgmpTicking (
|
|||||||
assume the byte order of the both Source and Addr, the
|
assume the byte order of the both Source and Addr, the
|
||||||
network byte order is used by the caller.
|
network byte order is used by the caller.
|
||||||
|
|
||||||
@param Source The array of group addresses to add to
|
@param[in] Source The array of group addresses to add to
|
||||||
@param Count The number of group addresses in the Source
|
@param[in] Count The number of group addresses in the Source
|
||||||
@param Addr The IP4 multicast address to add
|
@param[in] Addr The IP4 multicast address to add
|
||||||
|
|
||||||
@return NULL if failed to allocate memory for the new groups,
|
@return NULL if failed to allocate memory for the new groups,
|
||||||
otherwise the new combined group addresses.
|
otherwise the new combined group addresses.
|
||||||
@ -597,9 +586,9 @@ Ip4CombineGroups (
|
|||||||
both Groups and Addr, the network byte order is used by
|
both Groups and Addr, the network byte order is used by
|
||||||
the caller.
|
the caller.
|
||||||
|
|
||||||
@param Groups The array of group addresses to remove from
|
@param Groups The array of group addresses to remove from
|
||||||
@param Count The number of group addresses in the Groups
|
@param Count The number of group addresses in the Groups
|
||||||
@param Addr The IP4 multicast address to remove
|
@param Addr The IP4 multicast address to remove
|
||||||
|
|
||||||
@return The nubmer of group addresses in the Groups after remove.
|
@return The nubmer of group addresses in the Groups after remove.
|
||||||
It is Count if the Addr isn't in the Groups.
|
It is Count if the Addr isn't in the Groups.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,14 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Igmp.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __EFI_IP4_IGMP_H__
|
#ifndef __EFI_IP4_IGMP_H__
|
||||||
@ -73,7 +65,7 @@ typedef enum {
|
|||||||
Init the IGMP control data of the IP4 service instance, configure
|
Init the IGMP control data of the IP4 service instance, configure
|
||||||
MNP to receive ALL SYSTEM multicast.
|
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_SUCCESS IGMP of the IpSb is successfully initialized.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to initialize IGMP.
|
@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
|
Join the multicast group on behalf of this IP4 child
|
||||||
|
|
||||||
@param IpInstance The IP4 child that wants to join the group
|
@param[in] IpInstance The IP4 child that wants to join the group
|
||||||
@param Address The group to join
|
@param[in] Address The group to join
|
||||||
|
|
||||||
@retval EFI_SUCCESS Successfully join the multicast group
|
@retval EFI_SUCCESS Successfully join the multicast group
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources
|
||||||
@ -105,9 +97,9 @@ Ip4JoinGroup (
|
|||||||
/**
|
/**
|
||||||
Leave the IP4 multicast group on behalf of IpInstance.
|
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
|
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_NOT_FOUND The IP4 service instance isn't in the group
|
||||||
@retval EFI_SUCCESS Successfully leave the multicast group.
|
@retval EFI_SUCCESS Successfully leave the multicast group.
|
||||||
@ -123,9 +115,9 @@ Ip4LeaveGroup (
|
|||||||
/**
|
/**
|
||||||
Handle the received IGMP message for the IP4 service instance.
|
Handle the received IGMP message for the IP4 service instance.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that received the message
|
@param[in] IpSb The IP4 service instance that received the message
|
||||||
@param Head The IP4 header of the received message
|
@param[in] Head The IP4 header of the received message
|
||||||
@param Packet The IGMP message, without IP4 header
|
@param[in] Packet The IGMP message, without IP4 header
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER The IGMP message is malformated.
|
@retval EFI_INVALID_PARAMETER The IGMP message is malformated.
|
||||||
@retval EFI_SUCCESS The IGMP message is successfully processed.
|
@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
|
2. Decrease the report timer for each IGMP group in "delaying
|
||||||
member" state.
|
member" state.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that is ticking
|
@param[in] IpSb The IP4 service instance that is ticking
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -163,9 +153,9 @@ Ip4IgmpTicking (
|
|||||||
assume the byte order of the both Source and Addr, the
|
assume the byte order of the both Source and Addr, the
|
||||||
network byte order is used by the caller.
|
network byte order is used by the caller.
|
||||||
|
|
||||||
@param Source The array of group addresses to add to
|
@param[in] Source The array of group addresses to add to
|
||||||
@param Count The number of group addresses in the Source
|
@param[in] Count The number of group addresses in the Source
|
||||||
@param Addr The IP4 multicast address to add
|
@param[in] Addr The IP4 multicast address to add
|
||||||
|
|
||||||
@return NULL if failed to allocate memory for the new groups,
|
@return NULL if failed to allocate memory for the new groups,
|
||||||
otherwise the new combined group addresses.
|
otherwise the new combined group addresses.
|
||||||
@ -184,9 +174,9 @@ Ip4CombineGroups (
|
|||||||
both Groups and Addr, the network byte order is used by
|
both Groups and Addr, the network byte order is used by
|
||||||
the caller.
|
the caller.
|
||||||
|
|
||||||
@param Groups The array of group addresses to remove from
|
@param Groups The array of group addresses to remove from
|
||||||
@param Count The number of group addresses in the Groups
|
@param Count The number of group addresses in the Groups
|
||||||
@param Addr The IP4 multicast address to remove
|
@param Addr The IP4 multicast address to remove
|
||||||
|
|
||||||
@return The nubmer of group addresses in the Groups after remove.
|
@return The nubmer of group addresses in the Groups after remove.
|
||||||
It is Count if the Addr isn't in the Groups.
|
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
|
Find the IGMP_GROUP structure which contains the status of multicast
|
||||||
group Address in this IGMP control block
|
group Address in this IGMP control block
|
||||||
|
|
||||||
@param IgmpCtrl The IGMP control block to search from
|
@param[in] IgmpCtrl The IGMP control block to search from
|
||||||
@param Address The multicast address to search
|
@param[in] Address The multicast address to search
|
||||||
|
|
||||||
@return NULL if the multicast address isn't in the IGMP control block. Otherwise
|
@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
|
the point to the IGMP_GROUP which contains the status of multicast group
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2005 - 2007, Intel Corporation
|
Copyright (c) 2005 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,14 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Impl.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
@ -29,10 +21,10 @@ Abstract:
|
|||||||
function is used optionally to retrieve the operational mode data of underlying
|
function is used optionally to retrieve the operational mode data of underlying
|
||||||
networks or drivers.
|
networks or drivers.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
|
@param[out] Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
|
||||||
@param MnpConfigData Pointer to the managed network configuration data structure.
|
@param[out] MnpConfigData Pointer to the managed network configuration data structure.
|
||||||
@param SnpModeData Pointer to the simple network mode data structure.
|
@param[out] SnpModeData Pointer to the simple network mode data structure.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@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
|
requests will be cancelled. Their completion token status will be set to EFI_ABORTED
|
||||||
and their events will be signaled.
|
and their events will be signaled.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
|
@param[in] IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The driver instance was successfully opened.
|
@retval EFI_SUCCESS The driver instance was successfully opened.
|
||||||
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
|
@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.
|
If JoinFlag is FALSE and GroupAddress is NULL, all joined groups will be left.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
|
@param[in] JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
|
||||||
@param GroupAddress Pointer to the IPv4 multicast address.
|
@param[in] GroupAddress Pointer to the IPv4 multicast address.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following is TRUE:
|
@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
|
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.
|
instances. As a result, client modification to the routing table will be lost.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param DeleteRoute Set to TRUE to delete this route from the routing table. Set to
|
@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
|
FALSE to add this route to the routing table. SubnetAddress
|
||||||
and SubnetMask are used as the key to each route entry.
|
and SubnetMask are used as the key to each route entry.
|
||||||
@param SubnetAddress The address of the subnet that needs to be routed.
|
@param[in] SubnetAddress The address of the subnet that needs to be routed.
|
||||||
@param SubnetMask The subnet mask of SubnetAddress.
|
@param[in] SubnetMask The subnet mask of SubnetAddress.
|
||||||
@param GatewayAddress The unicast gateway IPv4 address for this route.
|
@param[in] GatewayAddress The unicast gateway IPv4 address for this route.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_NOT_STARTED The driver instance has not been started.
|
@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
|
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.
|
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[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param Token Pointer to the transmit token.
|
@param[in] Token Pointer to the transmit token.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The data has been queued for transmission.
|
@retval EFI_SUCCESS The data has been queued for transmission.
|
||||||
@retval EFI_NOT_STARTED This instance has not been started.
|
@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
|
driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event
|
||||||
is signaled.
|
is signaled.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that is associated with the receive data descriptor.
|
@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_SUCCESS The receive completion token was cached.
|
||||||
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
|
@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
|
asynchronous operation has completed, this function will not signal the token
|
||||||
and EFI_NOT_FOUND is returned.
|
and EFI_NOT_FOUND is returned.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that has been issued by
|
@param[in] Token Pointer to a token that has been issued by
|
||||||
EFI_IP4_PROTOCOL.Transmit() or
|
EFI_IP4_PROTOCOL.Transmit() or
|
||||||
EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
|
EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
|
||||||
tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
|
tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
|
||||||
defined in EFI_IP4_PROTOCOL.Transmit().
|
defined in EFI_IP4_PROTOCOL.Transmit().
|
||||||
|
|
||||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
||||||
Token.->Event was signaled. When Token is NULL, all
|
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
|
experiencing packet loss should try calling the EFI_IP4_PROTOCOL.Poll() function
|
||||||
more often.
|
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_SUCCESS Incoming or outgoing data was processed.
|
||||||
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
|
@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
|
function is used optionally to retrieve the operational mode data of underlying
|
||||||
networks or drivers.
|
networks or drivers.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
|
@param[out] Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
|
||||||
@param MnpConfigData Pointer to the managed network configuration data structure.
|
@param[out] MnpConfigData Pointer to the managed network configuration data structure.
|
||||||
@param SnpModeData Pointer to the simple network mode data structure.
|
@param[out] SnpModeData Pointer to the simple network mode data structure.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||||
@ -468,8 +460,8 @@ EfiIp4GetModeData (
|
|||||||
reconfigure the MNP. If Force is TRUE, the MNP is configured no
|
reconfigure the MNP. If Force is TRUE, the MNP is configured no
|
||||||
matter whether that is changed or not.
|
matter whether that is changed or not.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that is to be changed.
|
@param[in] IpSb The IP4 service instance that is to be changed.
|
||||||
@param Force Force the configuration or not.
|
@param[in] Force Force the configuration or not.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The MNP is successfully configured/reconfigured.
|
@retval EFI_SUCCESS The MNP is successfully configured/reconfigured.
|
||||||
@retval Others Configuration failed.
|
@retval Others Configuration failed.
|
||||||
@ -547,9 +539,7 @@ Ip4ServiceConfigMnp (
|
|||||||
it will configure the default interface and default route table
|
it will configure the default interface and default route table
|
||||||
with the configuration information retrieved by IP4_CONFIGURE.
|
with the configuration information retrieved by IP4_CONFIGURE.
|
||||||
|
|
||||||
@param Context The IP4 service binding instance.
|
@param[in] Context The IP4 service binding instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -692,14 +682,11 @@ ON_EXIT:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Request Ip4AutoConfigCallBackDpc as a DPC at TPL_CALLBACK.
|
Request Ip4AutoConfigCallBackDpc as a DPC at TPL_CALLBACK.
|
||||||
|
|
||||||
@param Event The event that is signalled.
|
@param Event The event that is signalled.
|
||||||
@param Context The IP4 service binding instance.
|
@param Context The IP4 service binding instance.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -725,7 +712,7 @@ Ip4AutoConfigCallBack (
|
|||||||
It will locates the EFI_IP4_CONFIG_PROTOCOL, then start the
|
It will locates the EFI_IP4_CONFIG_PROTOCOL, then start the
|
||||||
auto configuration.
|
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 EFI_SUCCESS The auto configuration is successfull started
|
||||||
@retval Others Failed to start auto configuration.
|
@retval Others Failed to start auto configuration.
|
||||||
@ -822,8 +809,6 @@ CLOSE_DONE_EVENT:
|
|||||||
@param IpSb The IP4 service instance.
|
@param IpSb The IP4 service instance.
|
||||||
@param IpInstance The IP4 child instance.
|
@param IpInstance The IP4 child instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4InitProtocol (
|
Ip4InitProtocol (
|
||||||
@ -857,8 +842,8 @@ Ip4InitProtocol (
|
|||||||
for the first time. The caller should validate the configuration
|
for the first time. The caller should validate the configuration
|
||||||
before deliver them to it. It also don't do configure NULL.
|
before deliver them to it. It also don't do configure NULL.
|
||||||
|
|
||||||
@param IpInstance The IP4 child to configure.
|
@param[in, out] IpInstance The IP4 child to configure.
|
||||||
@param Config The configure data.
|
@param[in] Config The configure data.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The IP4 child is successfully configured.
|
@retval EFI_SUCCESS The IP4 child is successfully configured.
|
||||||
@retval EFI_DEVICE_ERROR Failed to free the pending transive or to
|
@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.
|
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_SUCCESS The IP4 child is cleaned up
|
||||||
@retval EFI_DEVICE_ERROR Some resources failed to be released
|
@retval EFI_DEVICE_ERROR Some resources failed to be released
|
||||||
@ -1080,8 +1065,8 @@ Ip4CleanProtocol (
|
|||||||
address. Only continuous netmasks are supported. and check
|
address. Only continuous netmasks are supported. and check
|
||||||
that StationAddress is a unicast address on the newtwork.
|
that StationAddress is a unicast address on the newtwork.
|
||||||
|
|
||||||
@param Ip The IP address to validate
|
@param[in] Ip The IP address to validate
|
||||||
@param Netmask The netmaks of the IP
|
@param[in] Netmask The netmaks of the IP
|
||||||
|
|
||||||
@retval TRUE The Ip/Netmask pair is valid
|
@retval TRUE The Ip/Netmask pair is valid
|
||||||
@retval FALSE The Ip/Netmask pair is invalid
|
@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
|
requests will be cancelled. Their completion token status will be set to EFI_ABORTED
|
||||||
and their events will be signaled.
|
and their events will be signaled.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
|
@param[in] IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The driver instance was successfully opened.
|
@retval EFI_SUCCESS The driver instance was successfully opened.
|
||||||
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
|
@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
|
Change the IP4 child's multicast setting. The caller
|
||||||
should make sure that the parameters is valid.
|
should make sure that the parameters is valid.
|
||||||
|
|
||||||
@param IpInstance The IP4 child to change the setting.
|
@param[in] IpInstance The IP4 child to change the setting.
|
||||||
@param JoinFlag TRUE to join the group, otherwise leave it
|
@param[in] JoinFlag TRUE to join the group, otherwise leave it
|
||||||
@param GroupAddress The target group address
|
@param[in] GroupAddress The target group address
|
||||||
|
|
||||||
@retval EFI_ALREADY_STARTED Want to join the group, but already a member of it
|
@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.
|
@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.
|
If JoinFlag is FALSE and GroupAddress is NULL, all joined groups will be left.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
|
@param[in] JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
|
||||||
@param GroupAddress Pointer to the IPv4 multicast address.
|
@param[in] GroupAddress Pointer to the IPv4 multicast address.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following is TRUE:
|
@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
|
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.
|
instances. As a result, client modification to the routing table will be lost.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param DeleteRoute Set to TRUE to delete this route from the routing table. Set to
|
@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
|
FALSE to add this route to the routing table. SubnetAddress
|
||||||
and SubnetMask are used as the key to each route entry.
|
and SubnetMask are used as the key to each route entry.
|
||||||
@param SubnetAddress The address of the subnet that needs to be routed.
|
@param[in] SubnetAddress The address of the subnet that needs to be routed.
|
||||||
@param SubnetMask The subnet mask of SubnetAddress.
|
@param[in] SubnetMask The subnet mask of SubnetAddress.
|
||||||
@param GatewayAddress The unicast gateway IPv4 address for this route.
|
@param[in] GatewayAddress The unicast gateway IPv4 address for this route.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_NOT_STARTED The driver instance has not been started.
|
@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
|
Check whether the user's token or event has already
|
||||||
been enqueued on IP4's list.
|
been enqueued on IP4's list.
|
||||||
|
|
||||||
@param Map The container of either user's transmit or receive
|
@param[in] Map The container of either user's transmit or receive
|
||||||
token.
|
token.
|
||||||
@param Item Current item to check against
|
@param[in] Item Current item to check against
|
||||||
@param Context The Token to check againist.
|
@param[in] Context The Token to check againist.
|
||||||
|
|
||||||
@retval EFI_ACCESS_DENIED The token or event has already been enqueued in IP
|
@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
|
@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.
|
Validate the user's token against current station address.
|
||||||
|
|
||||||
@param Token User's token to validate
|
@param[in] Token User's token to validate
|
||||||
@param IpIf The IP4 child's interface.
|
@param[in] IpIf The IP4 child's interface.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Some parameters are invalid
|
@retval EFI_INVALID_PARAMETER Some parameters are invalid
|
||||||
@retval EFI_BAD_BUFFER_SIZE The user's option/data is too long.
|
@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
|
are bound together. Check the comments in Ip4Output for information
|
||||||
about IP fragmentation.
|
about IP fragmentation.
|
||||||
|
|
||||||
@param Context The token's wrap
|
@param[in] Context The token's wrap
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1809,8 +1792,6 @@ Ip4FreeTxToken (
|
|||||||
@param Flag Not used during transmission
|
@param Flag Not used during transmission
|
||||||
@param Context The token's wrap.
|
@param Context The token's wrap.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4OnPacketSent (
|
Ip4OnPacketSent (
|
||||||
@ -1850,8 +1831,8 @@ Ip4OnPacketSent (
|
|||||||
EFI IPv4 Protocol instance. Whenever the packet in the token is sent out or some
|
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.
|
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[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param Token Pointer to the transmit token.
|
@param[in] Token Pointer to the transmit token.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The data has been queued for transmission.
|
@retval EFI_SUCCESS The data has been queued for transmission.
|
||||||
@retval EFI_NOT_STARTED This instance has not been started.
|
@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
|
driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event
|
||||||
is signaled.
|
is signaled.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that is associated with the receive data descriptor.
|
@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_SUCCESS The receive completion token was cached.
|
||||||
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
|
@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
|
Because Ip4CancelPacket and other functions are all called in
|
||||||
line, so, after Ip4CancelPacket returns, the Item has been freed.
|
line, so, after Ip4CancelPacket returns, the Item has been freed.
|
||||||
|
|
||||||
@param Map The IP4 child's transmit queue
|
@param[in] Map The IP4 child's transmit queue
|
||||||
@param Item The current transmitted packet to test.
|
@param[in] Item The current transmitted packet to test.
|
||||||
@param Context The user's token to cancel.
|
@param[in] Context The user's token to cancel.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Continue to check the next Item.
|
@retval EFI_SUCCESS Continue to check the next Item.
|
||||||
@retval EFI_ABORTED The user's Token (Token != NULL) is cancelled.
|
@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
|
Cancel the receive request. This is quiet simple, because
|
||||||
it is only enqueued in our local receive map.
|
it is only enqueued in our local receive map.
|
||||||
|
|
||||||
@param Map The IP4 child's receive queue
|
@param[in] Map The IP4 child's receive queue
|
||||||
@param Item Current receive request to cancel.
|
@param[in] Item Current receive request to cancel.
|
||||||
@param Context The user's token to cancel
|
@param[in] Context The user's token to cancel
|
||||||
|
|
||||||
@retval EFI_SUCCESS Continue to check the next receive request on the
|
@retval EFI_SUCCESS Continue to check the next receive request on the
|
||||||
queue.
|
queue.
|
||||||
@ -2239,8 +2220,8 @@ Ip4CancelRxTokens (
|
|||||||
/**
|
/**
|
||||||
Cancel the user's receive/transmit request.
|
Cancel the user's receive/transmit request.
|
||||||
|
|
||||||
@param IpInstance The IP4 child
|
@param[in] IpInstance The IP4 child
|
||||||
@param Token The token to cancel. If NULL, all token will be
|
@param[in] Token The token to cancel. If NULL, all token will be
|
||||||
cancelled.
|
cancelled.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The token is cancelled
|
@retval EFI_SUCCESS The token is cancelled
|
||||||
@ -2322,12 +2303,12 @@ Ip4Cancel (
|
|||||||
asynchronous operation has completed, this function will not signal the token
|
asynchronous operation has completed, this function will not signal the token
|
||||||
and EFI_NOT_FOUND is returned.
|
and EFI_NOT_FOUND is returned.
|
||||||
|
|
||||||
@param This Pointer to the EFI_IP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_IP4_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that has been issued by
|
@param[in] Token Pointer to a token that has been issued by
|
||||||
EFI_IP4_PROTOCOL.Transmit() or
|
EFI_IP4_PROTOCOL.Transmit() or
|
||||||
EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
|
EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
|
||||||
tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
|
tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
|
||||||
defined in EFI_IP4_PROTOCOL.Transmit().
|
defined in EFI_IP4_PROTOCOL.Transmit().
|
||||||
|
|
||||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
||||||
Token.->Event was signaled. When Token is NULL, all
|
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
|
experiencing packet loss should try calling the EFI_IP4_PROTOCOL.Poll() function
|
||||||
more often.
|
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_SUCCESS Incoming or outgoing data was processed.
|
||||||
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
|
@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
|
received-but-not-delivered and transmitted-but-not-recycle
|
||||||
packets.
|
packets.
|
||||||
|
|
||||||
@param Map The IP4 child's transmit map.
|
@param[in] Map The IP4 child's transmit map.
|
||||||
@param Item Current transmitted packet
|
@param[in] Item Current transmitted packet
|
||||||
@param Context Not used.
|
@param[in] Context Not used.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Always returns EFI_SUCCESS
|
@retval EFI_SUCCESS Always returns EFI_SUCCESS
|
||||||
|
|
||||||
@ -2473,10 +2454,8 @@ Ip4SentPacketTicking (
|
|||||||
transmitted-but-not-recycle packets, and provides time input
|
transmitted-but-not-recycle packets, and provides time input
|
||||||
for its IGMP protocol.
|
for its IGMP protocol.
|
||||||
|
|
||||||
@param Event The IP4 service instance's heart beat timer.
|
@param[in] Event The IP4 service instance's heart beat timer.
|
||||||
@param Context The IP4 service instance.
|
@param[in] Context The IP4 service instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Ip4 internal functions and type defintions.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2007, Intel Corporation
|
Copyright (c) 2005 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#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
|
reconfigure the MNP. If Force is TRUE, the MNP is configured no
|
||||||
matter whether that is changed or not.
|
matter whether that is changed or not.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that is to be changed.
|
@param[in] IpSb The IP4 service instance that is to be changed.
|
||||||
@param Force Force the configuration or not.
|
@param[in] Force Force the configuration or not.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The MNP is successfully configured/reconfigured.
|
@retval EFI_SUCCESS The MNP is successfully configured/reconfigured.
|
||||||
@retval Others Configuration failed.
|
@retval Others Configuration failed.
|
||||||
@ -246,8 +238,6 @@ Ip4ServiceConfigMnp (
|
|||||||
@param IpSb The IP4 service instance.
|
@param IpSb The IP4 service instance.
|
||||||
@param IpInstance The IP4 child instance.
|
@param IpInstance The IP4 child instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4InitProtocol (
|
Ip4InitProtocol (
|
||||||
@ -258,7 +248,7 @@ Ip4InitProtocol (
|
|||||||
/**
|
/**
|
||||||
Clean up the IP4 child, release all the resources used by it.
|
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_SUCCESS The IP4 child is cleaned up
|
||||||
@retval EFI_DEVICE_ERROR Some resources failed to be released
|
@retval EFI_DEVICE_ERROR Some resources failed to be released
|
||||||
@ -272,8 +262,8 @@ Ip4CleanProtocol (
|
|||||||
/**
|
/**
|
||||||
Cancel the user's receive/transmit request.
|
Cancel the user's receive/transmit request.
|
||||||
|
|
||||||
@param IpInstance The IP4 child
|
@param[in] IpInstance The IP4 child
|
||||||
@param Token The token to cancel. If NULL, all token will be
|
@param[in] Token The token to cancel. If NULL, all token will be
|
||||||
cancelled.
|
cancelled.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The token is cancelled
|
@retval EFI_SUCCESS The token is cancelled
|
||||||
@ -292,9 +282,9 @@ Ip4Cancel (
|
|||||||
Change the IP4 child's multicast setting. The caller
|
Change the IP4 child's multicast setting. The caller
|
||||||
should make sure that the parameters is valid.
|
should make sure that the parameters is valid.
|
||||||
|
|
||||||
@param IpInstance The IP4 child to change the setting.
|
@param[in] IpInstance The IP4 child to change the setting.
|
||||||
@param JoinFlag TRUE to join the group, otherwise leave it
|
@param[in] JoinFlag TRUE to join the group, otherwise leave it
|
||||||
@param GroupAddress The target group address
|
@param[in] GroupAddress The target group address
|
||||||
|
|
||||||
@retval EFI_ALREADY_STARTED Want to join the group, but already a member of it
|
@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.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate some resources.
|
||||||
@ -316,10 +306,8 @@ Ip4Groups (
|
|||||||
transmitted-but-not-recycle packets, and provides time input
|
transmitted-but-not-recycle packets, and provides time input
|
||||||
for its IGMP protocol.
|
for its IGMP protocol.
|
||||||
|
|
||||||
@param Event The IP4 service instance's heart beat timer.
|
@param[in] Event The IP4 service instance's heart beat timer.
|
||||||
@param Context The IP4 service instance.
|
@param[in] Context The IP4 service instance.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -336,9 +324,9 @@ Ip4TimerTicking (
|
|||||||
received-but-not-delivered and transmitted-but-not-recycle
|
received-but-not-delivered and transmitted-but-not-recycle
|
||||||
packets.
|
packets.
|
||||||
|
|
||||||
@param Map The IP4 child's transmit map.
|
@param[in] Map The IP4 child's transmit map.
|
||||||
@param Item Current transmitted packet
|
@param[in] Item Current transmitted packet
|
||||||
@param Context Not used.
|
@param[in] Context Not used.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Always returns EFI_SUCCESS
|
@retval EFI_SUCCESS Always returns EFI_SUCCESS
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
IP4 input process.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2007, Intel Corporation
|
Copyright (c) 2005 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Input.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
IP4 input process.
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
@ -28,13 +20,13 @@ Abstract:
|
|||||||
(Dst, Src, Id, Protocol). The default life for the packet is
|
(Dst, Src, Id, Protocol). The default life for the packet is
|
||||||
120 seconds.
|
120 seconds.
|
||||||
|
|
||||||
@param Dst The destination address
|
@param[in] Dst The destination address
|
||||||
@param Src The source address
|
@param[in] Src The source address
|
||||||
@param Id The ID field in IP header
|
@param[in] Id The ID field in IP header
|
||||||
@param Protocol The protocol 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 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 *
|
IP4_ASSEMBLE_ENTRY *
|
||||||
@ -74,9 +66,7 @@ Ip4CreateAssembleEntry (
|
|||||||
/**
|
/**
|
||||||
Release all the fragments of a packet, then free the assemble entry.
|
Release all the fragments of a packet, then free the assemble entry.
|
||||||
|
|
||||||
@param Assemble The assemble entry to free
|
@param[in] Assemble The assemble entry to free
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -103,9 +93,7 @@ Ip4FreeAssembleEntry (
|
|||||||
Initialize an already allocated assemble table. This is generally
|
Initialize an already allocated assemble table. This is generally
|
||||||
the assemble table embedded in the IP4 service instance.
|
the assemble table embedded in the IP4 service instance.
|
||||||
|
|
||||||
@param Table The assemble table to initialize.
|
@param[in, out] Table The assemble table to initialize.
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -125,9 +113,7 @@ Ip4InitAssembleTable (
|
|||||||
Clean up the assemble table: remove all the fragments
|
Clean up the assemble table: remove all the fragments
|
||||||
and assemble entries.
|
and assemble entries.
|
||||||
|
|
||||||
@param Table The assemble table to clean up
|
@param[in] Table The assemble table to clean up
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -159,8 +145,6 @@ Ip4CleanAssembleTable (
|
|||||||
@param Start The sequence of the first byte to fit in
|
@param Start The sequence of the first byte to fit in
|
||||||
@param End One beyond the sequence of last byte to fit in.
|
@param End One beyond the sequence of last byte to fit in.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4TrimPacket (
|
Ip4TrimPacket (
|
||||||
@ -200,9 +184,7 @@ Ip4TrimPacket (
|
|||||||
the assembled packet's OnFree. It will free the assemble entry,
|
the assembled packet's OnFree. It will free the assemble entry,
|
||||||
which in turn will free all the fragments of the packet.
|
which in turn will free all the fragments of the packet.
|
||||||
|
|
||||||
@param Arg The assemble entry to free
|
@param[in] Arg The assemble entry to free
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -448,15 +430,13 @@ DROP:
|
|||||||
The IP4 input routine. It is called by the IP4_INTERFACE when a
|
The IP4 input routine. It is called by the IP4_INTERFACE when a
|
||||||
IP4 fragment is received from MNP.
|
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.
|
it is NULL.
|
||||||
@param Packet The IP4 packet received.
|
@param[in] Packet The IP4 packet received.
|
||||||
@param IoStatus The return status of receive request.
|
@param[in] IoStatus The return status of receive request.
|
||||||
@param Flag The link layer flag for the packet received, such
|
@param[in] Flag The link layer flag for the packet received, such
|
||||||
as multicast.
|
as multicast.
|
||||||
@param Context The IP4 service instance that own the MNP.
|
@param[in] Context The IP4 service instance that own the MNP.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -625,9 +605,9 @@ DROP:
|
|||||||
/**
|
/**
|
||||||
Check whether this IP child accepts the packet.
|
Check whether this IP child accepts the packet.
|
||||||
|
|
||||||
@param IpInstance The IP child to check
|
@param[in] IpInstance The IP child to check
|
||||||
@param Head The IP header of the packet
|
@param[in] Head The IP header of the packet
|
||||||
@param Packet The data of the packet
|
@param[in] Packet The data of the packet
|
||||||
|
|
||||||
@retval TRUE If the child wants to receive the packet.
|
@retval TRUE If the child wants to receive the packet.
|
||||||
@retval FALSE Otherwise.
|
@retval FALSE Otherwise.
|
||||||
@ -730,9 +710,9 @@ Ip4InstanceFrameAcceptable (
|
|||||||
packet is acceptable to it. Here the data of the packet is
|
packet is acceptable to it. Here the data of the packet is
|
||||||
shared, but the net buffer isn't.
|
shared, but the net buffer isn't.
|
||||||
|
|
||||||
@param IpInstance The IP4 child to enqueue the packet to
|
@param[in] IpInstance The IP4 child to enqueue the packet to
|
||||||
@param Head The IP header of the received packet
|
@param[in] Head The IP header of the received packet
|
||||||
@param Packet The data 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_NOT_STARTED The IP child hasn't been configured.
|
||||||
@retval EFI_INVALID_PARAMETER The child doesn't want to receive the packet
|
@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
|
The signal handle of IP4's recycle event. It is called back
|
||||||
when the upper layer release the packet.
|
when the upper layer release the packet.
|
||||||
|
|
||||||
@param Event The IP4's recycle event.
|
@param Event The IP4's recycle event.
|
||||||
@param Context The context of the handle, which is a
|
@param Context The context of the handle, which is a
|
||||||
IP4_RXDATA_WRAP
|
IP4_RXDATA_WRAP
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -824,10 +802,11 @@ Ip4OnRecyclePacket (
|
|||||||
to the upper layer. Upper layer will signal the recycle event in
|
to the upper layer. Upper layer will signal the recycle event in
|
||||||
it when it is done with the packet.
|
it when it is done with the packet.
|
||||||
|
|
||||||
@param IpInstance The IP4 child to receive the packet
|
@param[in] IpInstance The IP4 child to receive the packet
|
||||||
@param Packet The packet to deliver up.
|
@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 *
|
IP4_RXDATA_WRAP *
|
||||||
@ -900,7 +879,7 @@ Ip4WrapRxData (
|
|||||||
duplicate it to a non-shared packet, release the shared packet, then
|
duplicate it to a non-shared packet, release the shared packet, then
|
||||||
deliver the non-shared packet up.
|
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
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources to deliver the
|
||||||
packets.
|
packets.
|
||||||
@ -996,10 +975,10 @@ Ip4InstanceDeliverPacket (
|
|||||||
Enqueue a received packet to all the IP children that share
|
Enqueue a received packet to all the IP children that share
|
||||||
the same interface.
|
the same interface.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that receive the packet
|
@param[in] IpSb The IP4 service instance that receive the packet
|
||||||
@param Head The header of the received packet
|
@param[in] Head The header of the received packet
|
||||||
@param Packet The data of the received packet
|
@param[in] Packet The data of the received packet
|
||||||
@param IpIf The interface to enqueue the packet to
|
@param[in] IpIf The interface to enqueue the packet to
|
||||||
|
|
||||||
@return The number of the IP4 children that accepts the packet
|
@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.
|
Deliver the packet for each IP4 child on the interface.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that received the packet
|
@param[in] IpSb The IP4 service instance that received the packet
|
||||||
@param IpIf The IP4 interface to deliver the packet.
|
@param[in] IpIf The IP4 interface to deliver the packet.
|
||||||
|
|
||||||
@retval EFI_SUCCESS It always returns EFI_SUCCESS now
|
@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
|
child wants to consume the packet because each IP child needs
|
||||||
its own copy of the packet to make changes.
|
its own copy of the packet to make changes.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that received the packet
|
@param[in] IpSb The IP4 service instance that received the packet
|
||||||
@param Head The header of the received packet
|
@param[in] Head The header of the received packet
|
||||||
@param Packet The data 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_NOT_FOUND No IP child accepts the packet
|
||||||
@retval EFI_SUCCESS The packet is enqueued or delivered to some IP
|
@retval EFI_SUCCESS The packet is enqueued or delivered to some IP
|
||||||
@ -1180,9 +1159,7 @@ Ip4Demultiplex (
|
|||||||
/**
|
/**
|
||||||
Timeout the fragment and enqueued packets.
|
Timeout the fragment and enqueued packets.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance to timeout
|
@param[in] IpSb The IP4 service instance to timeout
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,13 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Input.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __EFI_IP4_INPUT_H__
|
#ifndef __EFI_IP4_INPUT_H__
|
||||||
@ -95,9 +88,7 @@ typedef struct {
|
|||||||
Initialize an already allocated assemble table. This is generally
|
Initialize an already allocated assemble table. This is generally
|
||||||
the assemble table embedded in the IP4 service instance.
|
the assemble table embedded in the IP4 service instance.
|
||||||
|
|
||||||
@param Table The assemble table to initialize.
|
@param[in, out] Table The assemble table to initialize.
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -109,9 +100,7 @@ Ip4InitAssembleTable (
|
|||||||
Clean up the assemble table: remove all the fragments
|
Clean up the assemble table: remove all the fragments
|
||||||
and assemble entries.
|
and assemble entries.
|
||||||
|
|
||||||
@param Table The assemble table to clean up
|
@param[in] Table The assemble table to clean up
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -123,15 +112,13 @@ Ip4CleanAssembleTable (
|
|||||||
The IP4 input routine. It is called by the IP4_INTERFACE when a
|
The IP4 input routine. It is called by the IP4_INTERFACE when a
|
||||||
IP4 fragment is received from MNP.
|
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.
|
it is NULL.
|
||||||
@param Packet The IP4 packet received.
|
@param[in] Packet The IP4 packet received.
|
||||||
@param IoStatus The return status of receive request.
|
@param[in] IoStatus The return status of receive request.
|
||||||
@param Flag The link layer flag for the packet received, such
|
@param[in] Flag The link layer flag for the packet received, such
|
||||||
as multicast.
|
as multicast.
|
||||||
@param Context The IP4 service instance that own the MNP.
|
@param[in] Context The IP4 service instance that own the MNP.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -152,9 +139,9 @@ Ip4AccpetFrame (
|
|||||||
child wants to consume the packet because each IP child needs
|
child wants to consume the packet because each IP child needs
|
||||||
its own copy of the packet to make changes.
|
its own copy of the packet to make changes.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that received the packet
|
@param[in] IpSb The IP4 service instance that received the packet
|
||||||
@param Head The header of the received packet
|
@param[in] Head The header of the received packet
|
||||||
@param Packet The data 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_NOT_FOUND No IP child accepts the packet
|
||||||
@retval EFI_SUCCESS The packet is enqueued or delivered to some IP
|
@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
|
Enqueue a received packet to all the IP children that share
|
||||||
the same interface.
|
the same interface.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance that receive the packet
|
@param[in] IpSb The IP4 service instance that receive the packet
|
||||||
@param Head The header of the received packet
|
@param[in] Head The header of the received packet
|
||||||
@param Packet The data of the received packet
|
@param[in] Packet The data of the received packet
|
||||||
@param IpIf The interface to enqueue the packet to
|
@param[in] IpIf The interface to enqueue the packet to
|
||||||
|
|
||||||
@return The number of the IP4 children that accepts the packet
|
@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
|
duplicate it to a non-shared packet, release the shared packet, then
|
||||||
deliver the non-shared packet up.
|
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
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources to deliver the
|
||||||
packets.
|
packets.
|
||||||
@ -210,9 +197,7 @@ Ip4InstanceDeliverPacket (
|
|||||||
/**
|
/**
|
||||||
Timeout the fragment and enqueued packets.
|
Timeout the fragment and enqueued packets.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance to timeout
|
@param[in] IpSb The IP4 service instance to timeout
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
IP4 option support functions.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Option.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
IP4 option support functions
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
@ -28,9 +20,9 @@ Abstract:
|
|||||||
and will transmit. It will compute the ICMP error message fields
|
and will transmit. It will compute the ICMP error message fields
|
||||||
if the option is mal-formated. But this information isn't used.
|
if the option is mal-formated. But this information isn't used.
|
||||||
|
|
||||||
@param Option The first byte of the option
|
@param[in] Option The first byte of the option
|
||||||
@param OptionLen The length of the whole option
|
@param[in] OptionLen The length of the whole option
|
||||||
@param Rcvd The option is from the packet we received if TRUE,
|
@param[in] Rcvd The option is from the packet we received if TRUE,
|
||||||
otherwise the option we wants to transmit.
|
otherwise the option we wants to transmit.
|
||||||
|
|
||||||
@retval TRUE The option is properly formatted
|
@retval TRUE The option is properly formatted
|
||||||
@ -127,11 +119,11 @@ Ip4OptionIsValid (
|
|||||||
fragments.
|
fragments.
|
||||||
2. Pad the options copied over to aligned to 4 bytes.
|
2. Pad the options copied over to aligned to 4 bytes.
|
||||||
|
|
||||||
@param Option The original option to copy from
|
@param[in] Option The original option to copy from
|
||||||
@param OptionLen The length of the original option
|
@param[in] OptionLen The length of the original option
|
||||||
@param FirstFragment Whether it is the first fragment
|
@param[in] FirstFragment Whether it is the first fragment
|
||||||
@param Buf The buffer to copy options to. NULL
|
@param[in, out] Buf The buffer to copy options to. NULL
|
||||||
@param BufLen The length of the buffer
|
@param[in, out] BufLen The length of the buffer
|
||||||
|
|
||||||
@retval EFI_SUCCESS The options are copied over
|
@retval EFI_SUCCESS The options are copied over
|
||||||
@retval EFI_BUFFER_TOO_SMALL Buf is NULL or BufLen provided is too small.
|
@retval EFI_BUFFER_TOO_SMALL Buf is NULL or BufLen provided is too small.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
IP4 option support routines.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#ifndef __EFI_IP4_OPTION_H__
|
||||||
@ -39,9 +30,9 @@ typedef enum {
|
|||||||
and will transmit. It will compute the ICMP error message fields
|
and will transmit. It will compute the ICMP error message fields
|
||||||
if the option is mal-formated. But this information isn't used.
|
if the option is mal-formated. But this information isn't used.
|
||||||
|
|
||||||
@param Option The first byte of the option
|
@param[in] Option The first byte of the option
|
||||||
@param OptionLen The length of the whole option
|
@param[in] OptionLen The length of the whole option
|
||||||
@param Rcvd The option is from the packet we received if TRUE,
|
@param[in] Rcvd The option is from the packet we received if TRUE,
|
||||||
otherwise the option we wants to transmit.
|
otherwise the option we wants to transmit.
|
||||||
|
|
||||||
@retval TRUE The option is properly formatted
|
@retval TRUE The option is properly formatted
|
||||||
@ -62,11 +53,11 @@ Ip4OptionIsValid (
|
|||||||
fragments.
|
fragments.
|
||||||
2. Pad the options copied over to aligned to 4 bytes.
|
2. Pad the options copied over to aligned to 4 bytes.
|
||||||
|
|
||||||
@param Option The original option to copy from
|
@param[in] Option The original option to copy from
|
||||||
@param OptionLen The length of the original option
|
@param[in] OptionLen The length of the original option
|
||||||
@param FirstFragment Whether it is the first fragment
|
@param[in] FirstFragment Whether it is the first fragment
|
||||||
@param Buf The buffer to copy options to. NULL
|
@param[in, out] Buf The buffer to copy options to. NULL
|
||||||
@param BufLen The length of the buffer
|
@param[in, out] BufLen The length of the buffer
|
||||||
|
|
||||||
@retval EFI_SUCCESS The options are copied over
|
@retval EFI_SUCCESS The options are copied over
|
||||||
@retval EFI_BUFFER_TOO_SMALL Buf is NULL or BufLen provided is too small.
|
@retval EFI_BUFFER_TOO_SMALL Buf is NULL or BufLen provided is too small.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Transmit the IP4 packet.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Output.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Transmit the IP4 packet
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
@ -29,14 +21,14 @@ UINT16 mIp4Id;
|
|||||||
Prepend an IP4 head to the Packet. It will copy the options and
|
Prepend an IP4 head to the Packet. It will copy the options and
|
||||||
build the IP4 header fields. Used for IP4 fragmentation.
|
build the IP4 header fields. Used for IP4 fragmentation.
|
||||||
|
|
||||||
@param Packet The packet to prepend IP4 header to
|
@param Packet The packet to prepend IP4 header to
|
||||||
@param Head The caller supplied header. The caller should set
|
@param Head The caller supplied header. The caller should set
|
||||||
the following header fields: Tos, TotalLen, Id,
|
the following header fields: Tos, TotalLen, Id,
|
||||||
Fragment, Ttl, Protocol, Src and Dst. All the fields
|
Fragment, Ttl, Protocol, Src and Dst. All the fields
|
||||||
are in host byte order. This function will fill in
|
are in host byte order. This function will fill in
|
||||||
the Ver, HeadLen, and checksum.
|
the Ver, HeadLen, and checksum.
|
||||||
@param Option The orginal IP4 option to copy from
|
@param Option The orginal IP4 option to copy from
|
||||||
@param OptLen The length of the IP4 option
|
@param OptLen The length of the IP4 option
|
||||||
|
|
||||||
@retval EFI_BAD_BUFFER_SIZE There is no enought room in the head space of
|
@retval EFI_BAD_BUFFER_SIZE There is no enought room in the head space of
|
||||||
Packet.
|
Packet.
|
||||||
@ -101,9 +93,9 @@ Ip4PrependHead (
|
|||||||
itself, that is, not by the requests of IP4 child's consumer. Such
|
itself, that is, not by the requests of IP4 child's consumer. Such
|
||||||
packets include the ICMP echo replies, and other ICMP error packets.
|
packets include the ICMP echo replies, and other ICMP error packets.
|
||||||
|
|
||||||
@param IpSb The IP4 service that wants to send the packets.
|
@param[in] IpSb The IP4 service that wants to send the packets.
|
||||||
@param Dst The destination of the packet
|
@param[in] Dst The destination of the packet
|
||||||
@param Src The source of the packet
|
@param[in] Src The source of the packet
|
||||||
|
|
||||||
@return NULL if no proper interface is found, otherwise the interface that
|
@return NULL if no proper interface is found, otherwise the interface that
|
||||||
can be used to send the system packet from.
|
can be used to send the system packet from.
|
||||||
@ -170,8 +162,6 @@ Ip4SelectInterface (
|
|||||||
for reference.
|
for reference.
|
||||||
@param Context The context provided by us
|
@param Context The context provided by us
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4SysPacketSent (
|
Ip4SysPacketSent (
|
||||||
@ -192,24 +182,24 @@ Ip4SysPacketSent (
|
|||||||
(IpInstance == NULL). It will route the packet, fragment it,
|
(IpInstance == NULL). It will route the packet, fragment it,
|
||||||
then transmit all the fragments through some interface.
|
then transmit all the fragments through some interface.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance to transmit the packet
|
@param[in] IpSb The IP4 service instance to transmit the packet
|
||||||
@param IpInstance The IP4 child that issues the transmission. It is
|
@param[in] IpInstance The IP4 child that issues the transmission. It is
|
||||||
NULL if the packet is from the system.
|
NULL if the packet is from the system.
|
||||||
@param Packet The user data to send, excluding the IP header.
|
@param[in] Packet The user data to send, excluding the IP header.
|
||||||
@param Head The caller supplied header. The caller should set
|
@param[in] Head The caller supplied header. The caller should set
|
||||||
the following header fields: Tos, TotalLen, Id, tl,
|
the following header fields: Tos, TotalLen, Id, tl,
|
||||||
Fragment, Protocol, Src and Dst. All the fields are
|
Fragment, Protocol, Src and Dst. All the fields are
|
||||||
in host byte order. This function will fill in the
|
in host byte order. This function will fill in the
|
||||||
Ver, HeadLen, Fragment, and checksum. The Fragment
|
Ver, HeadLen, Fragment, and checksum. The Fragment
|
||||||
only need to include the DF flag. Ip4Output will
|
only need to include the DF flag. Ip4Output will
|
||||||
compute the MF and offset for you.
|
compute the MF and offset for you.
|
||||||
@param Option The original option to append to the IP headers
|
@param[in] Option The original option to append to the IP headers
|
||||||
@param OptLen The length of the option
|
@param[in] OptLen The length of the option
|
||||||
@param GateWay The next hop address to transmit packet to.
|
@param[in] GateWay The next hop address to transmit packet to.
|
||||||
255.255.255.255 means broadcast.
|
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.
|
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_NO_MAPPING There is no interface to the destination.
|
||||||
@retval EFI_NOT_FOUND There is no route 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 filter function to find a packet and all its fragments.
|
||||||
The packet's fragments have their Context set to the packet.
|
The packet's fragments have their Context set to the packet.
|
||||||
|
|
||||||
@param Frame The frames hold by the low level interface
|
@param[in] Frame The frames hold by the low level interface
|
||||||
@param Context Context to the function, which is the packet.
|
@param[in] Context Context to the function, which is the packet.
|
||||||
|
|
||||||
@retval TRUE This is the packet to cancel or its fragments.
|
@retval TRUE This is the packet to cancel or its fragments.
|
||||||
@retval FALSE This is unrelated packet.
|
@retval FALSE This is unrelated packet.
|
||||||
@ -442,8 +432,6 @@ Ip4CancelPacketFragments (
|
|||||||
@param Packet The Packet to cancel
|
@param Packet The Packet to cancel
|
||||||
@param IoStatus The status returns to the sender.
|
@param IoStatus The status returns to the sender.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4CancelPacket (
|
Ip4CancelPacket (
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,13 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Output.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __EFI_IP4_OUTPUT_H__
|
#ifndef __EFI_IP4_OUTPUT_H__
|
||||||
@ -33,8 +26,6 @@ Abstract:
|
|||||||
for reference.
|
for reference.
|
||||||
@param Context The context provided by us
|
@param Context The context provided by us
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4SysPacketSent (
|
Ip4SysPacketSent (
|
||||||
@ -51,24 +42,24 @@ Ip4SysPacketSent (
|
|||||||
(IpInstance == NULL). It will route the packet, fragment it,
|
(IpInstance == NULL). It will route the packet, fragment it,
|
||||||
then transmit all the fragments through some interface.
|
then transmit all the fragments through some interface.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance to transmit the packet
|
@param[in] IpSb The IP4 service instance to transmit the packet
|
||||||
@param IpInstance The IP4 child that issues the transmission. It is
|
@param[in] IpInstance The IP4 child that issues the transmission. It is
|
||||||
NULL if the packet is from the system.
|
NULL if the packet is from the system.
|
||||||
@param Packet The user data to send, excluding the IP header.
|
@param[in] Packet The user data to send, excluding the IP header.
|
||||||
@param Head The caller supplied header. The caller should set
|
@param[in] Head The caller supplied header. The caller should set
|
||||||
the following header fields: Tos, TotalLen, Id, tl,
|
the following header fields: Tos, TotalLen, Id, tl,
|
||||||
Fragment, Protocol, Src and Dst. All the fields are
|
Fragment, Protocol, Src and Dst. All the fields are
|
||||||
in host byte order. This function will fill in the
|
in host byte order. This function will fill in the
|
||||||
Ver, HeadLen, Fragment, and checksum. The Fragment
|
Ver, HeadLen, Fragment, and checksum. The Fragment
|
||||||
only need to include the DF flag. Ip4Output will
|
only need to include the DF flag. Ip4Output will
|
||||||
compute the MF and offset for you.
|
compute the MF and offset for you.
|
||||||
@param Option The original option to append to the IP headers
|
@param[in] Option The original option to append to the IP headers
|
||||||
@param OptLen The length of the option
|
@param[in] OptLen The length of the option
|
||||||
@param GateWay The next hop address to transmit packet to.
|
@param[in] GateWay The next hop address to transmit packet to.
|
||||||
255.255.255.255 means broadcast.
|
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.
|
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_NO_MAPPING There is no interface to the destination.
|
||||||
@retval EFI_NOT_FOUND There is no route 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 Packet The Packet to cancel
|
||||||
@param IoStatus The status returns to the sender.
|
@param IoStatus The status returns to the sender.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4CancelPacket (
|
Ip4CancelPacket (
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,14 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Ip4Route.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
@ -26,9 +18,9 @@ Abstract:
|
|||||||
Allocate a route entry then initialize it with the Dest/Netmaks
|
Allocate a route entry then initialize it with the Dest/Netmaks
|
||||||
and Gateway.
|
and Gateway.
|
||||||
|
|
||||||
@param Dest The destination network
|
@param[in] Dest The destination network
|
||||||
@param Netmask The destination network mask
|
@param[in] Netmask The destination network mask
|
||||||
@param GateWay The nexthop address
|
@param[in] GateWay The nexthop address
|
||||||
|
|
||||||
@return NULL if failed to allocate memeory, otherwise the newly created
|
@return NULL if failed to allocate memeory, otherwise the newly created
|
||||||
route entry.
|
route entry.
|
||||||
@ -66,8 +58,6 @@ Ip4CreateRouteEntry (
|
|||||||
|
|
||||||
@param RtEntry The route entry to free.
|
@param RtEntry The route entry to free.
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4FreeRouteEntry (
|
Ip4FreeRouteEntry (
|
||||||
@ -85,11 +75,11 @@ Ip4FreeRouteEntry (
|
|||||||
/**
|
/**
|
||||||
Allocate and initialize an IP4 route cache entry.
|
Allocate and initialize an IP4 route cache entry.
|
||||||
|
|
||||||
@param Dst The destination address
|
@param[in] Dst The destination address
|
||||||
@param Src The source address
|
@param[in] Src The source address
|
||||||
@param GateWay The next hop address
|
@param[in] GateWay The next hop address
|
||||||
@param Tag The tag from the caller. This marks all the cache
|
@param[in] Tag The tag from the caller. This marks all the cache
|
||||||
entries spawned from one route table entry.
|
entries spawned from one route table entry.
|
||||||
|
|
||||||
@return NULL if failed to allocate memory for the cache, other point
|
@return NULL if failed to allocate memory for the cache, other point
|
||||||
to the created route cache entry.
|
to the created route cache entry.
|
||||||
@ -128,8 +118,6 @@ Ip4CreateRouteCacheEntry (
|
|||||||
|
|
||||||
@param RtCacheEntry The route cache entry to free.
|
@param RtCacheEntry The route cache entry to free.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4FreeRouteCacheEntry (
|
Ip4FreeRouteCacheEntry (
|
||||||
@ -147,9 +135,7 @@ Ip4FreeRouteCacheEntry (
|
|||||||
/**
|
/**
|
||||||
Initialize an empty route cache table.
|
Initialize an empty route cache table.
|
||||||
|
|
||||||
@param RtCache The rotue cache table to initialize.
|
@param[in, out] RtCache The rotue cache table to initialize.
|
||||||
|
|
||||||
@return NONE
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -169,9 +155,7 @@ Ip4InitRouteCache (
|
|||||||
Clean up a route cache, that is free all the route cache
|
Clean up a route cache, that is free all the route cache
|
||||||
entries enqueued in the cache.
|
entries enqueued in the cache.
|
||||||
|
|
||||||
@param RtCache The route cache table to clean up
|
@param[in] RtCache The route cache table to clean up
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -235,9 +219,7 @@ Ip4CreateRouteTable (
|
|||||||
Free the route table and its associated route cache. Route
|
Free the route table and its associated route cache. Route
|
||||||
table is reference counted.
|
table is reference counted.
|
||||||
|
|
||||||
@param RtTable The route table to free.
|
@param[in] RtTable The route table to free.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -284,8 +266,6 @@ Ip4FreeRouteTable (
|
|||||||
@param RtCache Route cache to remove the entries from
|
@param RtCache Route cache to remove the entries from
|
||||||
@param Tag The Tag of the entries to remove
|
@param Tag The Tag of the entries to remove
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4PurgeRouteCache (
|
Ip4PurgeRouteCache (
|
||||||
@ -316,10 +296,10 @@ Ip4PurgeRouteCache (
|
|||||||
Add a route entry to the route table. All the IP4_ADDRs are in
|
Add a route entry to the route table. All the IP4_ADDRs are in
|
||||||
host byte order.
|
host byte order.
|
||||||
|
|
||||||
@param RtTable Route table to add route to
|
@param[in, out] RtTable Route table to add route to
|
||||||
@param Dest The destination of the network
|
@param[in] Dest The destination of the network
|
||||||
@param Netmask The netmask of the destination
|
@param[in] Netmask The netmask of the destination
|
||||||
@param Gateway The next hop address
|
@param[in] Gateway The next hop address
|
||||||
|
|
||||||
@retval EFI_ACCESS_DENIED The same route already exists
|
@retval EFI_ACCESS_DENIED The same route already exists
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory for the entry
|
@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.
|
Remove a route entry and all the route caches spawn from it.
|
||||||
|
|
||||||
@param RtTable The route table to remove the route from
|
@param RtTable The route table to remove the route from
|
||||||
@param Dest The destination network
|
@param Dest The destination network
|
||||||
@param Netmask The netmask of the Dest
|
@param Netmask The netmask of the Dest
|
||||||
@param Gateway The next hop address
|
@param Gateway The next hop address
|
||||||
|
|
||||||
@retval EFI_SUCCESS The route entry is successfully removed
|
@retval EFI_SUCCESS The route entry is successfully removed
|
||||||
@retval EFI_NOT_FOUND There is no route entry in the table with that
|
@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
|
host redirect according to RFC1122. So, only route cache entries
|
||||||
are modified according to the ICMP redirect message.
|
are modified according to the ICMP redirect message.
|
||||||
|
|
||||||
@param RtTable The route table to search the cache for
|
@param[in] RtTable The route table to search the cache for
|
||||||
@param Dest The destination address
|
@param[in] Dest The destination address
|
||||||
@param Src The source address
|
@param[in] Src The source address
|
||||||
|
|
||||||
@return NULL if no route entry to the (Dest, Src). Otherwise the point
|
@return NULL if no route entry to the (Dest, Src). Otherwise the point
|
||||||
to the correct route cache entry.
|
to the correct route cache entry.
|
||||||
@ -469,11 +449,11 @@ Ip4FindRouteCache (
|
|||||||
1. IP search the route table for a most specific match
|
1. IP search the route table for a most specific match
|
||||||
2. The local route entries have precedence over the default route entry.
|
2. The local route entries have precedence over the default route entry.
|
||||||
|
|
||||||
@param RtTable The route table to search from
|
@param[in] RtTable The route table to search from
|
||||||
@param Dst The destionation address to search
|
@param[in] Dst The destionation address to search
|
||||||
|
|
||||||
@return NULL if no route matches the Dst, otherwise the point to the
|
@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 *
|
IP4_ROUTE_ENTRY *
|
||||||
@ -511,9 +491,9 @@ Ip4FindRouteEntry (
|
|||||||
Search the route table to route the packet. Return/create a route
|
Search the route table to route the packet. Return/create a route
|
||||||
cache if there is a route to the destination.
|
cache if there is a route to the destination.
|
||||||
|
|
||||||
@param RtTable The route table to search from
|
@param[in] RtTable The route table to search from
|
||||||
@param Dest The destination address to search for
|
@param[in] Dest The destination address to search for
|
||||||
@param Src The source address to search for
|
@param[in] Src The source address to search for
|
||||||
|
|
||||||
@return NULL if failed to route packet, otherwise a route cache
|
@return NULL if failed to route packet, otherwise a route cache
|
||||||
entry that can be used to route packet.
|
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
|
GetModeData. The EFI_IP4_ROUTE_TABLE is clumsy to use in the
|
||||||
internal operation of the IP4 driver.
|
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_SUCCESS The route table is successfully build
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the rotue table.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the rotue table.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
EFI IP4 route table and route cache table defintions.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2006, Intel Corporation
|
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,16 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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__
|
#ifndef __EFI_IP4_ROUTE_H__
|
||||||
@ -115,9 +106,7 @@ Ip4CreateRouteTable (
|
|||||||
Free the route table and its associated route cache. Route
|
Free the route table and its associated route cache. Route
|
||||||
table is reference counted.
|
table is reference counted.
|
||||||
|
|
||||||
@param RtTable The route table to free.
|
@param[in] RtTable The route table to free.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -129,10 +118,10 @@ Ip4FreeRouteTable (
|
|||||||
Add a route entry to the route table. All the IP4_ADDRs are in
|
Add a route entry to the route table. All the IP4_ADDRs are in
|
||||||
host byte order.
|
host byte order.
|
||||||
|
|
||||||
@param RtTable Route table to add route to
|
@param[in, out] RtTable Route table to add route to
|
||||||
@param Dest The destination of the network
|
@param[in] Dest The destination of the network
|
||||||
@param Netmask The netmask of the destination
|
@param[in] Netmask The netmask of the destination
|
||||||
@param Gateway The next hop address
|
@param[in] Gateway The next hop address
|
||||||
|
|
||||||
@retval EFI_ACCESS_DENIED The same route already exists
|
@retval EFI_ACCESS_DENIED The same route already exists
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory for the entry
|
@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.
|
Remove a route entry and all the route caches spawn from it.
|
||||||
|
|
||||||
@param RtTable The route table to remove the route from
|
@param RtTable The route table to remove the route from
|
||||||
@param Dest The destination network
|
@param Dest The destination network
|
||||||
@param Netmask The netmask of the Dest
|
@param Netmask The netmask of the Dest
|
||||||
@param Gateway The next hop address
|
@param Gateway The next hop address
|
||||||
|
|
||||||
@retval EFI_SUCCESS The route entry is successfully removed
|
@retval EFI_SUCCESS The route entry is successfully removed
|
||||||
@retval EFI_NOT_FOUND There is no route entry in the table with that
|
@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
|
host redirect according to RFC1122. So, only route cache entries
|
||||||
are modified according to the ICMP redirect message.
|
are modified according to the ICMP redirect message.
|
||||||
|
|
||||||
@param RtTable The route table to search the cache for
|
@param[in] RtTable The route table to search the cache for
|
||||||
@param Dest The destination address
|
@param[in] Dest The destination address
|
||||||
@param Src The source address
|
@param[in] Src The source address
|
||||||
|
|
||||||
@return NULL if no route entry to the (Dest, Src). Otherwise the point
|
@return NULL if no route entry to the (Dest, Src). Otherwise the point
|
||||||
to the correct route cache entry.
|
to the correct route cache entry.
|
||||||
@ -194,8 +183,6 @@ Ip4FindRouteCache (
|
|||||||
|
|
||||||
@param RtCacheEntry The route cache entry to free.
|
@param RtCacheEntry The route cache entry to free.
|
||||||
|
|
||||||
@return None
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip4FreeRouteCacheEntry (
|
Ip4FreeRouteCacheEntry (
|
||||||
@ -206,9 +193,9 @@ Ip4FreeRouteCacheEntry (
|
|||||||
Search the route table to route the packet. Return/create a route
|
Search the route table to route the packet. Return/create a route
|
||||||
cache if there is a route to the destination.
|
cache if there is a route to the destination.
|
||||||
|
|
||||||
@param RtTable The route table to search from
|
@param[in] RtTable The route table to search from
|
||||||
@param Dest The destination address to search for
|
@param[in] Dest The destination address to search for
|
||||||
@param Src The source address to search for
|
@param[in] Src The source address to search for
|
||||||
|
|
||||||
@return NULL if failed to route packet, otherwise a route cache
|
@return NULL if failed to route packet, otherwise a route cache
|
||||||
entry that can be used to route packet.
|
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
|
GetModeData. The EFI_IP4_ROUTE_TABLE is clumsy to use in the
|
||||||
internal operation of the IP4 driver.
|
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_SUCCESS The route table is successfully build
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the rotue table.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the rotue table.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/** @file
|
/** @file
|
||||||
UEFI Component Name(2) protocol implementation for MnpDxe driver.
|
UEFI Component Name(2) protocol implementation for MnpDxe driver.
|
||||||
|
|
||||||
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
|
All rights reserved. This program and the accompanying materials
|
||||||
and made available under the terms and conditions of the BSD License which
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
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
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
@ -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,
|
by This does not support the language specified by Language,
|
||||||
then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
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
|
to the driver writer. Language is specified
|
||||||
in RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
driver specified by This in the language
|
driver specified by This in the language
|
||||||
specified by Language.
|
specified by Language.
|
||||||
@ -79,15 +79,15 @@ MnpComponentNameGetDriverName (
|
|||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
specified by This is managing. This handle
|
||||||
specifies the controller whose name is to be
|
specifies the controller whose name is to be
|
||||||
returned.
|
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
|
the name of. This is an optional parameter that
|
||||||
may be NULL. It will be NULL for device
|
may be NULL. It will be NULL for device
|
||||||
drivers. It will also be NULL for a bus drivers
|
drivers. It will also be NULL for a bus drivers
|
||||||
@ -96,7 +96,7 @@ MnpComponentNameGetDriverName (
|
|||||||
driver that wishes to retrieve the name of a
|
driver that wishes to retrieve the name of a
|
||||||
child controller.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -105,7 +105,7 @@ MnpComponentNameGetDriverName (
|
|||||||
to the driver writer. Language is specified in
|
to the driver writer. Language is specified in
|
||||||
RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
controller specified by ControllerHandle and
|
controller specified by ControllerHandle and
|
||||||
ChildHandle in the language specified by
|
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,
|
by This does not support the language specified by Language,
|
||||||
then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
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
|
to the driver writer. Language is specified
|
||||||
in RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
driver specified by This in the language
|
driver specified by This in the language
|
||||||
specified by Language.
|
specified by Language.
|
||||||
@ -244,15 +244,15 @@ MnpComponentNameGetDriverName (
|
|||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
specified by This is managing. This handle
|
||||||
specifies the controller whose name is to be
|
specifies the controller whose name is to be
|
||||||
returned.
|
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
|
the name of. This is an optional parameter that
|
||||||
may be NULL. It will be NULL for device
|
may be NULL. It will be NULL for device
|
||||||
drivers. It will also be NULL for a bus drivers
|
drivers. It will also be NULL for a bus drivers
|
||||||
@ -261,7 +261,7 @@ MnpComponentNameGetDriverName (
|
|||||||
driver that wishes to retrieve the name of a
|
driver that wishes to retrieve the name of a
|
||||||
child controller.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -270,7 +270,7 @@ MnpComponentNameGetDriverName (
|
|||||||
to the driver writer. Language is specified in
|
to the driver writer. Language is specified in
|
||||||
RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
controller specified by ControllerHandle and
|
controller specified by ControllerHandle and
|
||||||
ChildHandle in the language specified by
|
ChildHandle in the language specified by
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of Managed Network Protocol private services.
|
Implementation of Managed Network Protocol private services.
|
||||||
|
|
||||||
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
|
All rights reserved. This program and the accompanying materials
|
||||||
and made available under the terms and conditions of the BSD License which
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
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
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
@ -48,7 +48,7 @@ EFI_MANAGED_NETWORK_CONFIG_DATA mMnpDefaultConfigData = {
|
|||||||
Configure the Snp receive filters according to the instances' receive filter
|
Configure the Snp receive filters according to the instances' receive filter
|
||||||
settings.
|
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_SUCCESS The receive filters is configured.
|
||||||
@retval EFI_OUT_OF_RESOURCES The receive filters can't be configured due to
|
@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
|
Add Count of net buffers to MnpServiceData->FreeNbufQue. The length of the net
|
||||||
buffer is specified by MnpServiceData->BufferLength.
|
buffer is specified by MnpServiceData->BufferLength.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the MNP_SERVICE_DATA.
|
@param[in] MnpServiceData Pointer to the MNP_SERVICE_DATA.
|
||||||
@param Count Number of NET_BUFFERs to add.
|
@param[in] Count Number of NET_BUFFERs to add.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The specified amount of NET_BUFs are allocated
|
@retval EFI_SUCCESS The specified amount of NET_BUFs are allocated
|
||||||
and added to MnpServiceData->FreeNbufQue.
|
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
|
in the queue, first try to allocate some and add them into the queue, then
|
||||||
fetch the NET_BUF from the updated FreeNbufQue.
|
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
|
@return Pointer to the allocated free NET_BUF structure, if NULL the
|
||||||
operation is failed.
|
operation is failed.
|
||||||
@ -367,9 +367,9 @@ MnpFreeNbuf (
|
|||||||
/**
|
/**
|
||||||
Initialize the mnp service context data.
|
Initialize the mnp service context data.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||||
@param ImageHandle The driver image handle.
|
@param[in] ImageHandle The driver image handle.
|
||||||
@param ControllerHandle Handle of device to bind driver to.
|
@param[in] ControllerHandle Handle of device to bind driver to.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The mnp service context is initialized.
|
@retval EFI_SUCCESS The mnp service context is initialized.
|
||||||
@retval Other Some error occurs.
|
@retval Other Some error occurs.
|
||||||
@ -616,8 +616,8 @@ MnpFlushServiceData (
|
|||||||
/**
|
/**
|
||||||
Initialize the mnp instance context data.
|
Initialize the mnp instance context data.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||||
@param Instance Pointer to the mnp instance context data to
|
@param[in] Instance Pointer to the mnp instance context data to
|
||||||
initialize.
|
initialize.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -667,9 +667,9 @@ MnpInitializeInstanceData (
|
|||||||
/**
|
/**
|
||||||
Check whether the token specified by Arg maches the token in Item.
|
Check whether the token specified by Arg maches the token in Item.
|
||||||
|
|
||||||
@param Map Pointer to the NET_MAP.
|
@param[in] Map Pointer to the NET_MAP.
|
||||||
@param Item Pointer to the NET_MAP_ITEM
|
@param[in] Item Pointer to the NET_MAP_ITEM
|
||||||
@param Arg Pointer to the Arg, it's a pointer to the token to
|
@param[in] Arg Pointer to the Arg, it's a pointer to the token to
|
||||||
check.
|
check.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The token specified by Arg is different from the
|
@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.
|
Cancel the token specified by Arg if it matches the token in Item.
|
||||||
|
|
||||||
@param Map Pointer to the NET_MAP.
|
@param[in, out] Map Pointer to the NET_MAP.
|
||||||
@param Item Pointer to the NET_MAP_ITEM
|
@param[in] Item Pointer to the NET_MAP_ITEM
|
||||||
@param Arg Pointer to the Arg, it's a pointer to the token to
|
@param[in] Arg Pointer to the Arg, it's a pointer to the token to
|
||||||
cancel.
|
cancel.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Arg is NULL, and the token in Item 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
|
or the Arg isn't NULL, and the token in Item is
|
||||||
@ -760,7 +760,7 @@ MnpCancelTokens (
|
|||||||
/**
|
/**
|
||||||
Start and initialize the simple network.
|
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 EFI_SUCCESS The simple network protocol is started.
|
||||||
@retval Other Some error occurs.
|
@retval Other Some error occurs.
|
||||||
@ -794,7 +794,7 @@ MnpStartSnp (
|
|||||||
/**
|
/**
|
||||||
Stop the simple network.
|
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 EFI_SUCCESS The simple network is stopped.
|
||||||
@retval Other Some error occurs.
|
@retval Other Some error occurs.
|
||||||
@ -829,10 +829,10 @@ MnpStopSnp (
|
|||||||
Start the managed network, this function is called when one instance is configured
|
Start the managed network, this function is called when one instance is configured
|
||||||
or reconfigured.
|
or reconfigured.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||||
@param IsConfigUpdate The instance is reconfigured or it's the first time
|
@param[in] IsConfigUpdate The instance is reconfigured or it's the first time
|
||||||
the instanced is configured.
|
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
|
@retval EFI_SUCCESS The managed network is started and some
|
||||||
configuration is updated.
|
configuration is updated.
|
||||||
@ -921,7 +921,7 @@ ErrorExit:
|
|||||||
/**
|
/**
|
||||||
Stop the managed network.
|
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 EFI_SUCCESS The managed network is stopped.
|
||||||
@retval Other Some error occurs.
|
@retval Other Some error occurs.
|
||||||
@ -1021,8 +1021,8 @@ MnpFlushRcvdDataQueue (
|
|||||||
/**
|
/**
|
||||||
Configure the Instance using ConfigData.
|
Configure the Instance using ConfigData.
|
||||||
|
|
||||||
@param Instance Pointer to the mnp instance context data.
|
@param[in] Instance Pointer to the mnp instance context data.
|
||||||
@param ConfigData Pointer to the configuration data used to configure
|
@param[in] ConfigData Pointer to the configuration data used to configure
|
||||||
the isntance.
|
the isntance.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Instance is configured.
|
@retval EFI_SUCCESS The Instance is configured.
|
||||||
@ -1162,11 +1162,11 @@ MnpConfigureInstance (
|
|||||||
Add a group address control block which controls the MacAddress for
|
Add a group address control block which controls the MacAddress for
|
||||||
this instance.
|
this instance.
|
||||||
|
|
||||||
@param Instance Pointer to the mnp instance context data.
|
@param[in] Instance Pointer to the mnp instance context data.
|
||||||
@param CtrlBlk Pointer to the group address control block.
|
@param[in] CtrlBlk Pointer to the group address control block.
|
||||||
@param GroupAddress Pointer to the group adress.
|
@param[in] GroupAddress Pointer to the group adress.
|
||||||
@param MacAddress Pointer to the mac address.
|
@param[in] MacAddress Pointer to the mac address.
|
||||||
@param HwAddressSize The hardware address size.
|
@param[in] HwAddressSize The hardware address size.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The group address control block is added.
|
@retval EFI_SUCCESS The group address control block is added.
|
||||||
@retval EFI_OUT_OF_RESOURCE Failed due to lack of memory resources.
|
@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
|
Delete a group control block from the instance. If the controlled group address's
|
||||||
reference count reaches zero, the group address is removed too.
|
reference count reaches zero, the group address is removed too.
|
||||||
|
|
||||||
@param Instance Pointer to the instance context data.
|
@param[in] Instance Pointer to the instance context data.
|
||||||
@param CtrlBlk Pointer to the group control block to delete.
|
@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.
|
@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.
|
Do the group operations for this instance.
|
||||||
|
|
||||||
@param Instance Pointer to the instance context data.
|
@param[in] Instance Pointer to the instance context data.
|
||||||
@param JoinFlag Set to TRUE to join a group. Set to TRUE to leave a
|
@param[in] JoinFlag Set to TRUE to join a group. Set to TRUE to leave a
|
||||||
group/groups.
|
group/groups.
|
||||||
@param MacAddress Pointer to the group address to join or leave.
|
@param[in] MacAddress Pointer to the group address to join or leave.
|
||||||
@param CtrlBlk Pointer to the group control block if JoinFlag if
|
@param[in] CtrlBlk Pointer to the group control block if JoinFlag if
|
||||||
FALSE.
|
FALSE.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The group operation finished.
|
@retval EFI_SUCCESS The group operation finished.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of driver entry point and driver binding protocol.
|
Implementation of driver entry point and driver binding protocol.
|
||||||
|
|
||||||
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
|
All rights reserved. This program and the accompanying materials
|
||||||
and made available under the terms and conditions of the BSD License which
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
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
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
@ -33,10 +33,10 @@ EFI_DRIVER_BINDING_PROTOCOL gMnpDriverBinding = {
|
|||||||
follow these calling restrictions. If any other agent wishes to call
|
follow these calling restrictions. If any other agent wishes to call
|
||||||
Supported() it must also follow these calling restrictions.
|
Supported() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to test
|
@param[in] ControllerHandle Handle of device to test
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver supports this device
|
@retval EFI_SUCCESS This driver supports this device
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
calling restrictions. If any other agent wishes to call Start() it
|
||||||
must also follow these calling restrictions.
|
must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to bind driver to.
|
@param[in] ControllerHandle Handle of device to bind driver to.
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
must follow these calling restrictions. If any other agent wishes
|
||||||
to call Stop() it must also follow these calling restrictions.
|
to call Stop() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to stop driver on
|
@param[in] ControllerHandle Handle of device to stop driver on
|
||||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||||
children is zero stop the entire bus driver.
|
children is zero stop the entire bus driver.
|
||||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||||
@retval other This driver was not removed from this device
|
@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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
@param ChildHandle Pointer to the handle of the child to create. If
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
it is NULL, then a new handle is created. If it is
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
not NULL, then the I/O services are added to the
|
|
||||||
existing child handle.
|
|
||||||
|
|
||||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
@retval EFI_INVALID_PARAMETER ChildHandle is NULL.
|
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to
|
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||||
create the child.
|
then the protocol is added to the existing UEFI handle.
|
||||||
@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
|
EFI_STATUS
|
||||||
@ -384,24 +387,21 @@ ErrorExit:
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
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
|
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||||
protocol that was installed by CreateChild() from ChildHandle. If the removed
|
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||||
protocol is the last protocol on ChildHandle, then ChildHandle is destroyed.
|
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||||
|
|
||||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL
|
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
instance.
|
@param ChildHandle Handle of the child to destroy
|
||||||
@param ChildHandle Handle of the child to destroy.
|
|
||||||
|
|
||||||
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
is being removed.
|
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||||
@retval EFI_INVALID_PARAMETER ChildHandle is not a valid UEFI handle.
|
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||||
@retval EFI_ACCESS_DENIED The protocol could not be removed from the
|
because its services are being used.
|
||||||
ChildHandle because its services are being
|
@retval other The child handle was not destroyed
|
||||||
used.
|
|
||||||
@retval other The child handle was not destroyed.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -520,8 +520,8 @@ MnpServiceBindingDestroyChild (
|
|||||||
The entry point for Mnp driver which installs the driver binding and component
|
The entry point for Mnp driver which installs the driver binding and component
|
||||||
name protocol on its ImageHandle.
|
name protocol on its ImageHandle.
|
||||||
|
|
||||||
@param ImageHandle The image handle of the driver.
|
@param[in] ImageHandle The image handle of the driver.
|
||||||
@param SystemTable The system table.
|
@param[in] SystemTable The system table.
|
||||||
|
|
||||||
@retval EFI_SUCCES The driver binding and component name protocols are
|
@retval EFI_SUCCES The driver binding and component name protocols are
|
||||||
successfully installed.
|
successfully installed.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Declaration of strctures and functions for MnpDxe driver.
|
Declaration of strctures and functions for MnpDxe driver.
|
||||||
|
|
||||||
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
|
All rights reserved. This program and the accompanying materials
|
||||||
and made available under the terms and conditions of the BSD License which
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
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
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
@ -96,10 +96,10 @@ typedef struct _MNP_SERVICE_DATA {
|
|||||||
follow these calling restrictions. If any other agent wishes to call
|
follow these calling restrictions. If any other agent wishes to call
|
||||||
Supported() it must also follow these calling restrictions.
|
Supported() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to test
|
@param[in] ControllerHandle Handle of device to test
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver supports this device
|
@retval EFI_SUCCESS This driver supports this device
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
calling restrictions. If any other agent wishes to call Start() it
|
||||||
must also follow these calling restrictions.
|
must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to bind driver to.
|
@param[in] ControllerHandle Handle of device to bind driver to.
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
must follow these calling restrictions. If any other agent wishes
|
||||||
to call Stop() it must also follow these calling restrictions.
|
to call Stop() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to stop driver on
|
@param[in] ControllerHandle Handle of device to stop driver on
|
||||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||||
children is zero stop the entire bus driver.
|
children is zero stop the entire bus driver.
|
||||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||||
@retval other This driver was not removed from this device
|
@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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
@param ChildHandle Pointer to the handle of the child to create. If
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
it is NULL, then a new handle is created. If it is
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
not NULL, then the I/O services are added to the
|
|
||||||
existing child handle.
|
|
||||||
|
|
||||||
@retval EFI_SUCCES The child handle was created with the I/O
|
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
services.
|
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||||
the child.
|
then the protocol is added to the existing UEFI handle.
|
||||||
@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
|
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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||||
@param ChildHandle Handle of the child to destroy.
|
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 I/O services were removed from the child
|
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
handle.
|
@param ChildHandle Handle of the child to destroy
|
||||||
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
|
|
||||||
that are being removed.
|
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because
|
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||||
its I/O services are being used.
|
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||||
@retval other The child handle was not destroyed.
|
because its services are being used.
|
||||||
|
@retval other The child handle was not destroyed
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Declaration of structures and functions of MnpDxe driver.
|
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
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -93,9 +93,9 @@ typedef struct _MNP_RXDATA_WRAP {
|
|||||||
/**
|
/**
|
||||||
Initialize the mnp service context data.
|
Initialize the mnp service context data.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||||
@param ImageHandle The driver image handle.
|
@param[in] ImageHandle The driver image handle.
|
||||||
@param ControllerHandle Handle of device to bind driver to.
|
@param[in] ControllerHandle Handle of device to bind driver to.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The mnp service context is initialized.
|
@retval EFI_SUCCESS The mnp service context is initialized.
|
||||||
@retval Other Some error occurs.
|
@retval Other Some error occurs.
|
||||||
@ -124,8 +124,8 @@ MnpFlushServiceData (
|
|||||||
/**
|
/**
|
||||||
Initialize the mnp instance context data.
|
Initialize the mnp instance context data.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||||
@param Instance Pointer to the mnp instance context data to
|
@param[in] Instance Pointer to the mnp instance context data to
|
||||||
initialize.
|
initialize.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -138,9 +138,9 @@ MnpInitializeInstanceData (
|
|||||||
/**
|
/**
|
||||||
Check whether the token specified by Arg maches the token in Item.
|
Check whether the token specified by Arg maches the token in Item.
|
||||||
|
|
||||||
@param Map Pointer to the NET_MAP.
|
@param[in] Map Pointer to the NET_MAP.
|
||||||
@param Item Pointer to the NET_MAP_ITEM
|
@param[in] Item Pointer to the NET_MAP_ITEM
|
||||||
@param Arg Pointer to the Arg, it's a pointer to the token to
|
@param[in] Arg Pointer to the Arg, it's a pointer to the token to
|
||||||
check.
|
check.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The token specified by Arg is different from the
|
@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.
|
Cancel the token specified by Arg if it matches the token in Item.
|
||||||
|
|
||||||
@param Map Pointer to the NET_MAP.
|
@param[in, out] Map Pointer to the NET_MAP.
|
||||||
@param Item Pointer to the NET_MAP_ITEM
|
@param[in] Item Pointer to the NET_MAP_ITEM
|
||||||
@param Arg Pointer to the Arg, it's a pointer to the token to
|
@param[in] Arg Pointer to the Arg, it's a pointer to the token to
|
||||||
cancel.
|
cancel.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Arg is NULL, and the token in Item is
|
@retval EFI_SUCCESS The Arg is NULL, and the token in Item is cancelled,
|
||||||
cancelled, or the Arg isn't NULL, and the token in
|
or the Arg isn't NULL, and the token in Item is
|
||||||
Item is different from the Arg.
|
different from the Arg.
|
||||||
@retval EFI_ABORTED The Arg isn't NULL, the token in Item mathces the
|
@retval EFI_ABORTED The Arg isn't NULL, the token in Item mathces the
|
||||||
Arg, and the token is cancelled.
|
Arg, and the token is cancelled.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -192,8 +192,8 @@ MnpFlushRcvdDataQueue (
|
|||||||
/**
|
/**
|
||||||
Configure the Instance using ConfigData.
|
Configure the Instance using ConfigData.
|
||||||
|
|
||||||
@param Instance Pointer to the mnp instance context data.
|
@param[in] Instance Pointer to the mnp instance context data.
|
||||||
@param ConfigData Pointer to the configuration data used to configure
|
@param[in] ConfigData Pointer to the configuration data used to configure
|
||||||
the isntance.
|
the isntance.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Instance is configured.
|
@retval EFI_SUCCESS The Instance is configured.
|
||||||
@ -211,11 +211,11 @@ MnpConfigureInstance (
|
|||||||
/**
|
/**
|
||||||
Do the group operations for this instance.
|
Do the group operations for this instance.
|
||||||
|
|
||||||
@param Instance Pointer to the instance context data.
|
@param[in] Instance Pointer to the instance context data.
|
||||||
@param JoinFlag Set to TRUE to join a group. Set to TRUE to leave a
|
@param[in] JoinFlag Set to TRUE to join a group. Set to TRUE to leave a
|
||||||
group/groups.
|
group/groups.
|
||||||
@param MacAddress Pointer to the group address to join or leave.
|
@param[in] MacAddress Pointer to the group address to join or leave.
|
||||||
@param CtrlBlk Pointer to the group control block if JoinFlag if
|
@param[in] CtrlBlk Pointer to the group control block if JoinFlag if
|
||||||
FALSE.
|
FALSE.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The group operation finished.
|
@retval EFI_SUCCESS The group operation finished.
|
||||||
@ -226,15 +226,15 @@ EFI_STATUS
|
|||||||
MnpGroupOp (
|
MnpGroupOp (
|
||||||
IN MNP_INSTANCE_DATA *Instance,
|
IN MNP_INSTANCE_DATA *Instance,
|
||||||
IN BOOLEAN JoinFlag,
|
IN BOOLEAN JoinFlag,
|
||||||
IN EFI_MAC_ADDRESS *MacAddr OPTIONAL,
|
IN EFI_MAC_ADDRESS *MacAddress OPTIONAL,
|
||||||
IN MNP_GROUP_CONTROL_BLOCK *CtrlBlk OPTIONAL
|
IN MNP_GROUP_CONTROL_BLOCK *CtrlBlk OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Validates the Mnp transmit token.
|
Validates the Mnp transmit token.
|
||||||
|
|
||||||
@param Instance Pointer to the Mnp instance context data.
|
@param[in] Instance Pointer to the Mnp instance context data.
|
||||||
@param Token Pointer to the transmit token to check.
|
@param[in] Token Pointer to the transmit token to check.
|
||||||
|
|
||||||
@return The Token is valid or not.
|
@return The Token is valid or not.
|
||||||
|
|
||||||
@ -267,10 +267,10 @@ MnpBuildTxPacket (
|
|||||||
/**
|
/**
|
||||||
Synchronously send out the packet.
|
Synchronously send out the packet.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||||
@param Packet Pointer to the pakcet buffer.
|
@param[in] Packet Pointer to the pakcet buffer.
|
||||||
@param Length The length of the packet.
|
@param[in] Length The length of the packet.
|
||||||
@param Token Pointer to the token the packet generated from.
|
@param[in] Token Pointer to the token the packet generated from.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet is sent out.
|
@retval EFI_SUCCESS The packet is sent out.
|
||||||
@retval EFI_TIMEOUT Time out occurs, the packet isn't sent.
|
@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.
|
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
|
@retval EFI_SUCCESS The received packet is delivered, or there is no
|
||||||
packet to deliver, or there is no available receive
|
packet to deliver, or there is no available receive
|
||||||
@ -305,8 +305,8 @@ MnpInstanceDeliverPacket (
|
|||||||
Recycle the RxData and other resources used to hold and deliver the received
|
Recycle the RxData and other resources used to hold and deliver the received
|
||||||
packet.
|
packet.
|
||||||
|
|
||||||
@param Event The event this notify function registered to.
|
@param Event The event this notify function registered to.
|
||||||
@param Context Pointer to the context data registerd to the Event.
|
@param Context Pointer to the context data registerd to the Event.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -319,7 +319,7 @@ MnpRecycleRxData (
|
|||||||
/**
|
/**
|
||||||
Try to receive a packet and deliver it.
|
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_SUCCESS add return value to function comment
|
||||||
@retval EFI_NOT_STARTED The simple network protocol is not started.
|
@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
|
in the queue, first try to allocate some and add them into the queue, then
|
||||||
fetch the NET_BUF from the updated FreeNbufQue.
|
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 *
|
NET_BUF *
|
||||||
@ -363,9 +364,9 @@ MnpFreeNbuf (
|
|||||||
/**
|
/**
|
||||||
Remove the received packets if timeout occurs.
|
Remove the received packets if timeout occurs.
|
||||||
|
|
||||||
@param Event The event this notify function registered to.
|
@param Event The event this notify function registered to.
|
||||||
@param Context Pointer to the context data registered to the
|
@param Context Pointer to the context data registered to the
|
||||||
event.
|
event.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -379,9 +380,9 @@ MnpCheckPacketTimeout (
|
|||||||
Poll to receive the packets from Snp. This function is either called by upperlayer
|
Poll to receive the packets from Snp. This function is either called by upperlayer
|
||||||
protocols/applications or the system poll timer notify mechanism.
|
protocols/applications or the system poll timer notify mechanism.
|
||||||
|
|
||||||
@param Event The event this notify function registered to.
|
@param Event The event this notify function registered to.
|
||||||
@param Context Pointer to the context data registered to the
|
@param Context Pointer to the context data registered to the
|
||||||
event.
|
event.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -398,13 +399,13 @@ MnpSystemPoll (
|
|||||||
The GetModeData() function is used to read the current mode data (operational
|
The GetModeData() function is used to read the current mode data (operational
|
||||||
parameters) from the MNP or the underlying SNP.
|
parameters) from the MNP or the underlying SNP.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param MnpConfigData Pointer to storage for MNP operational parameters. Type
|
@param[out] MnpConfigData Pointer to storage for MNP operational parameters. Type
|
||||||
EFI_MANAGED_NETWORK_CONFIG_DATA is defined in "Related
|
EFI_MANAGED_NETWORK_CONFIG_DATA is defined in "Related
|
||||||
Definitions" below.
|
Definitions" below.
|
||||||
@param SnpModeData Pointer to storage for SNP operational parameters. This
|
@param[out] SnpModeData Pointer to storage for SNP operational parameters. This
|
||||||
feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE
|
feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE
|
||||||
is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.
|
is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||||
@ -446,14 +447,13 @@ MnpGetModeData (
|
|||||||
Note: Warning: Receive filter settings that overlap will consume extra
|
Note: Warning: Receive filter settings that overlap will consume extra
|
||||||
processor and/or DMA resources and degrade system and network performance.
|
processor and/or DMA resources and degrade system and network performance.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param MnpConfigData Pointer to configuration data that will be assigned
|
@param[in] MnpConfigData Pointer to configuration data that will be assigned
|
||||||
to the MNP child driver instance. If NULL, the MNP
|
to the MNP child driver instance. If NULL, the MNP
|
||||||
child driver instance is reset to startup defaults
|
child driver instance is reset to startup defaults
|
||||||
and all pending transmit and receive requests are
|
and all pending transmit and receive requests are
|
||||||
flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is
|
flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is
|
||||||
defined in
|
defined in EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().
|
||||||
EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is
|
@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
|
underlying EFI_SIMPLE_NETWORK.MCastIpToMac() function, which may also be
|
||||||
unsupported in some MNP implementations.
|
unsupported in some MNP implementations.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
|
@param[in] Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
|
||||||
Set to FALSE if IpAddress is an IPv4 multicast address.
|
Set to FALSE if IpAddress is an IPv4 multicast address.
|
||||||
@param IpAddress Pointer to the multicast IP address (in network byte order)
|
@param[in] IpAddress Pointer to the multicast IP address (in network byte order)
|
||||||
to convert.
|
to convert.
|
||||||
@param MacAddress Pointer to the resulting multicast MAC address.
|
@param[out] MacAddress Pointer to the resulting multicast MAC address.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:
|
@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
|
Management Protocol (IGMP) packets. If JoinFlag is FALSE and MacAddress is
|
||||||
NULL, then all joined groups are left.
|
NULL, then all joined groups are left.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param JoinFlag Set to TRUE to join this multicast group.
|
@param[in] JoinFlag Set to TRUE to join this multicast group.
|
||||||
Set to FALSE to leave this multicast group.
|
Set to FALSE to leave this multicast group.
|
||||||
@param MacAddress Pointer to the multicast MAC group (address) to join or
|
@param[in] MacAddress Pointer to the multicast MAC group (address) to join or
|
||||||
leave.
|
leave.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The requested operation completed successfully.
|
@retval EFI_SUCCESS The requested operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||||
@ -582,10 +582,10 @@ MnpGroups (
|
|||||||
the underlying communications device and drivers.
|
the underlying communications device and drivers.
|
||||||
|
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param Token Pointer to a token associated with the transmit data
|
@param[in] Token Pointer to a token associated with the transmit data
|
||||||
descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN is
|
descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN is
|
||||||
defined in "Related Definitions" below.
|
defined in "Related Definitions" below.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The transmit completion token was cached.
|
@retval EFI_SUCCESS The transmit completion token was cached.
|
||||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
@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
|
the asynchronous operation has completed, this function will not signal the
|
||||||
token and EFI_NOT_FOUND is returned.
|
token and EFI_NOT_FOUND is returned.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that has been issued by
|
@param[in] Token Pointer to a token that has been issued by
|
||||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
|
EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
|
||||||
EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all pending
|
EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all pending
|
||||||
tokens are aborted.
|
tokens are aborted.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
||||||
Token.Event was signaled. When Token is NULL,
|
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
|
updates the Token.Status and Token.RxData fields and the Token.Event is
|
||||||
signaled.
|
signaled.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param Token Pointer to a token associated with the receive
|
@param[in] Token Pointer to a token associated with the receive
|
||||||
data descriptor. Type
|
data descriptor. Type
|
||||||
EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in
|
EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in
|
||||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit().
|
EFI_MANAGED_NETWORK_PROTOCOL.Transmit().
|
||||||
|
|
||||||
@retval EFI_SUCCESS The receive completion token was cached.
|
@retval EFI_SUCCESS The receive completion token was cached.
|
||||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
@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()
|
applications that are experiencing packet loss should try calling the Poll()
|
||||||
function more often.
|
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_SUCCESS Incoming or outgoing data was processed.
|
||||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of Managed Network Protocol I/O functions.
|
Implementation of Managed Network Protocol I/O functions.
|
||||||
|
|
||||||
|
Copyright (c) 2005 - 2007, Intel Corporation.<BR>
|
||||||
|
|
||||||
Copyright (c) 2005 - 2007, Intel Corporation. <BR>
|
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -22,8 +23,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
/**
|
/**
|
||||||
Validates the Mnp transmit token.
|
Validates the Mnp transmit token.
|
||||||
|
|
||||||
@param Instance Pointer to the Mnp instance context data.
|
@param[in] Instance Pointer to the Mnp instance context data.
|
||||||
@param Token Pointer to the transmit token to check.
|
@param[in] Token Pointer to the transmit token to check.
|
||||||
|
|
||||||
@return The Token is valid or not.
|
@return The Token is valid or not.
|
||||||
|
|
||||||
@ -179,10 +180,10 @@ MnpBuildTxPacket (
|
|||||||
/**
|
/**
|
||||||
Synchronously send out the packet.
|
Synchronously send out the packet.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param[in] MnpServiceData Pointer to the mnp service context data.
|
||||||
@param Packet Pointer to the pakcet buffer.
|
@param[in] Packet Pointer to the pakcet buffer.
|
||||||
@param Length The length of the packet.
|
@param[in] Length The length of the packet.
|
||||||
@param Token Pointer to the token the packet generated from.
|
@param[in] Token Pointer to the token the packet generated from.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet is sent out.
|
@retval EFI_SUCCESS The packet is sent out.
|
||||||
@retval EFI_TIMEOUT Time out occurs, the packet isn't sent.
|
@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.
|
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
|
@retval EFI_SUCCESS The received packet is delivered, or there is no
|
||||||
packet to deliver, or there is no available receive
|
packet to deliver, or there is no available receive
|
||||||
@ -392,8 +393,6 @@ MnpInstanceDeliverPacket (
|
|||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param MnpServiceData Pointer to the mnp service context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
MnpDeliverPacket (
|
MnpDeliverPacket (
|
||||||
@ -421,8 +420,8 @@ MnpDeliverPacket (
|
|||||||
Recycle the RxData and other resources used to hold and deliver the received
|
Recycle the RxData and other resources used to hold and deliver the received
|
||||||
packet.
|
packet.
|
||||||
|
|
||||||
@param Event The event this notify function registered to.
|
@param Event The event this notify function registered to.
|
||||||
@param Context Pointer to the context data registerd to the Event.
|
@param Context Pointer to the context data registerd to the Event.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -468,12 +467,10 @@ MnpRecycleRxData (
|
|||||||
/**
|
/**
|
||||||
Queue the received packet into instance's receive queue.
|
Queue the received packet into instance's receive queue.
|
||||||
|
|
||||||
@param Instance Pointer to the mnp instance context data.
|
@param Instance Pointer to the mnp instance context data.
|
||||||
@param RxDataWrap Pointer to the Wrap structure containing the
|
@param RxDataWrap Pointer to the Wrap structure containing the
|
||||||
received data and other information.
|
received data and other information.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
MnpQueueRcvdPacket (
|
MnpQueueRcvdPacket (
|
||||||
@ -525,13 +522,13 @@ MnpQueueRcvdPacket (
|
|||||||
/**
|
/**
|
||||||
Match the received packet with the instance receive filters.
|
Match the received packet with the instance receive filters.
|
||||||
|
|
||||||
@param Instance Pointer to the mnp instance context data.
|
@param[in] Instance Pointer to the mnp instance context data.
|
||||||
@param RxData Pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA.
|
@param[in] RxData Pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA.
|
||||||
@param GroupAddress Pointer to the GroupAddress, the GroupAddress is
|
@param[in] GroupAddress Pointer to the GroupAddress, the GroupAddress is
|
||||||
non-NULL and it contains the destination multicast
|
non-NULL and it contains the destination multicast
|
||||||
mac address of the received packet if the packet
|
mac address of the received packet if the packet
|
||||||
destinated to a multicast mac address.
|
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.
|
@return The received packet matches the instance's receive filters or not.
|
||||||
|
|
||||||
@ -603,18 +600,16 @@ MnpMatchPacket (
|
|||||||
/**
|
/**
|
||||||
Analyse the received packets.
|
Analyse the received packets.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param MnpServiceData Pointer to the mnp service context data.
|
||||||
@param Nbuf Pointer to the net buffer holding the received
|
@param Nbuf Pointer to the net buffer holding the received
|
||||||
packet.
|
packet.
|
||||||
@param RxData Pointer to the buffer used to save the analysed
|
@param RxData Pointer to the buffer used to save the analysed
|
||||||
result in EFI_MANAGED_NETWORK_RECEIVE_DATA.
|
result in EFI_MANAGED_NETWORK_RECEIVE_DATA.
|
||||||
@param GroupAddress Pointer to pointer to a MNP_GROUP_ADDRESS used to
|
@param GroupAddress Pointer to pointer to a MNP_GROUP_ADDRESS used to
|
||||||
pass out the address of the multicast address the
|
pass out the address of the multicast address the
|
||||||
received packet destinated to.
|
received packet destinated to.
|
||||||
@param PktAttr Pointer to the buffer used to save the analysed
|
@param PktAttr Pointer to the buffer used to save the analysed
|
||||||
packet attribute.
|
packet attribute.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -707,8 +702,8 @@ MnpAnalysePacket (
|
|||||||
/**
|
/**
|
||||||
Wrap the RxData.
|
Wrap the RxData.
|
||||||
|
|
||||||
@param Instance Pointer to the mnp instance context data.
|
@param[in] Instance Pointer to the mnp instance context data.
|
||||||
@param RxData Pointer to the receive data to wrap.
|
@param[in] RxData Pointer to the receive data to wrap.
|
||||||
|
|
||||||
@return Pointer to a MNP_RXDATA_WRAP which wraps the RxData.
|
@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
|
Enqueue the received the packets to the instances belonging to the
|
||||||
MnpServiceData.
|
MnpServiceData.
|
||||||
|
|
||||||
@param MnpServiceData Pointer to the mnp service context data.
|
@param MnpServiceData Pointer to the mnp service context data.
|
||||||
@param Nbuf Pointer to the net buffer representing the received
|
@param Nbuf Pointer to the net buffer representing the received
|
||||||
packet.
|
packet.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -840,7 +833,7 @@ MnpEnqueuePacket (
|
|||||||
/**
|
/**
|
||||||
Try to receive a packet and deliver it.
|
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_SUCCESS add return value to function comment
|
||||||
@retval EFI_NOT_STARTED The simple network protocol is not started.
|
@retval EFI_NOT_STARTED The simple network protocol is not started.
|
||||||
@ -992,9 +985,9 @@ EXIT:
|
|||||||
/**
|
/**
|
||||||
Remove the received packets if timeout occurs.
|
Remove the received packets if timeout occurs.
|
||||||
|
|
||||||
@param Event The event this notify function registered to.
|
@param Event The event this notify function registered to.
|
||||||
@param Context Pointer to the context data registered to the
|
@param Context Pointer to the context data registered to the
|
||||||
event.
|
event.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1059,9 +1052,9 @@ MnpCheckPacketTimeout (
|
|||||||
Poll to receive the packets from Snp. This function is either called by upperlayer
|
Poll to receive the packets from Snp. This function is either called by upperlayer
|
||||||
protocols/applications or the system poll timer notify mechanism.
|
protocols/applications or the system poll timer notify mechanism.
|
||||||
|
|
||||||
@param Event The event this notify function registered to.
|
@param Event The event this notify function registered to.
|
||||||
@param Context Pointer to the context data registered to the
|
@param Context Pointer to the context data registered to the
|
||||||
event.
|
event.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/** @file
|
/** @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
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -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
|
The GetModeData() function is used to read the current mode data (operational
|
||||||
parameters) from the MNP or the underlying SNP.
|
parameters) from the MNP or the underlying SNP.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param MnpConfigData Pointer to storage for MNP operational parameters. Type
|
@param[out] MnpConfigData Pointer to storage for MNP operational parameters. Type
|
||||||
EFI_MANAGED_NETWORK_CONFIG_DATA is defined in "Related
|
EFI_MANAGED_NETWORK_CONFIG_DATA is defined in "Related
|
||||||
Definitions" below.
|
Definitions" below.
|
||||||
@param SnpModeData Pointer to storage for SNP operational parameters. This
|
@param[out] SnpModeData Pointer to storage for SNP operational parameters. This
|
||||||
feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE
|
feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE
|
||||||
is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.
|
is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||||
@ -113,14 +114,13 @@ MnpGetModeData (
|
|||||||
Note: Warning: Receive filter settings that overlap will consume extra
|
Note: Warning: Receive filter settings that overlap will consume extra
|
||||||
processor and/or DMA resources and degrade system and network performance.
|
processor and/or DMA resources and degrade system and network performance.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param MnpConfigData Pointer to configuration data that will be assigned
|
@param[in] MnpConfigData Pointer to configuration data that will be assigned
|
||||||
to the MNP child driver instance. If NULL, the MNP
|
to the MNP child driver instance. If NULL, the MNP
|
||||||
child driver instance is reset to startup defaults
|
child driver instance is reset to startup defaults
|
||||||
and all pending transmit and receive requests are
|
and all pending transmit and receive requests are
|
||||||
flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is
|
flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is
|
||||||
defined in
|
defined in EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().
|
||||||
EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is
|
@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
|
underlying EFI_SIMPLE_NETWORK.MCastIpToMac() function, which may also be
|
||||||
unsupported in some MNP implementations.
|
unsupported in some MNP implementations.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
|
@param[in] Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
|
||||||
Set to FALSE if IpAddress is an IPv4 multicast address.
|
Set to FALSE if IpAddress is an IPv4 multicast address.
|
||||||
@param IpAddress Pointer to the multicast IP address (in network byte order)
|
@param[in] IpAddress Pointer to the multicast IP address (in network byte order)
|
||||||
to convert.
|
to convert.
|
||||||
@param MacAddress Pointer to the resulting multicast MAC address.
|
@param[out] MacAddress Pointer to the resulting multicast MAC address.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:
|
@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
|
Management Protocol (IGMP) packets. If JoinFlag is FALSE and MacAddress is
|
||||||
NULL, then all joined groups are left.
|
NULL, then all joined groups are left.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param JoinFlag Set to TRUE to join this multicast group.
|
@param[in] JoinFlag Set to TRUE to join this multicast group.
|
||||||
Set to FALSE to leave this multicast group.
|
Set to FALSE to leave this multicast group.
|
||||||
@param MacAddress Pointer to the multicast MAC group (address) to join or
|
@param[in] MacAddress Pointer to the multicast MAC group (address) to join or
|
||||||
leave.
|
leave.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The requested operation completed successfully.
|
@retval EFI_SUCCESS The requested operation completed successfully.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@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.
|
the underlying communications device and drivers.
|
||||||
|
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param Token Pointer to a token associated with the transmit data
|
@param[in] Token Pointer to a token associated with the transmit data
|
||||||
descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN is
|
descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN is
|
||||||
defined in "Related Definitions" below.
|
defined in "Related Definitions" below.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The transmit completion token was cached.
|
@retval EFI_SUCCESS The transmit completion token was cached.
|
||||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
@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
|
updates the Token.Status and Token.RxData fields and the Token.Event is
|
||||||
signaled.
|
signaled.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param Token Pointer to a token associated with the receive
|
@param[in] Token Pointer to a token associated with the receive
|
||||||
data descriptor. Type
|
data descriptor. Type
|
||||||
EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in
|
EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in
|
||||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit().
|
EFI_MANAGED_NETWORK_PROTOCOL.Transmit().
|
||||||
|
|
||||||
@retval EFI_SUCCESS The receive completion token was cached.
|
@retval EFI_SUCCESS The receive completion token was cached.
|
||||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
@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
|
the asynchronous operation has completed, this function will not signal the
|
||||||
token and EFI_NOT_FOUND is returned.
|
token and EFI_NOT_FOUND is returned.
|
||||||
|
|
||||||
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that has been issued by
|
@param[in] Token Pointer to a token that has been issued by
|
||||||
EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
|
EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
|
||||||
EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all pending
|
EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all pending
|
||||||
tokens are aborted.
|
tokens are aborted.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
|
||||||
Token.Event was signaled. When Token is NULL,
|
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()
|
applications that are experiencing packet loss should try calling the Poll()
|
||||||
function more often.
|
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_SUCCESS Incoming or outgoing data was processed.
|
||||||
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
@retval EFI_NOT_STARTED This MNP child driver instance has not been
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,13 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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,
|
by This does not support the language specified by Language,
|
||||||
then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -46,7 +39,7 @@ Abstract:
|
|||||||
to the driver writer. Language is specified
|
to the driver writer. Language is specified
|
||||||
in RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
driver specified by This in the language
|
driver specified by This in the language
|
||||||
specified by Language.
|
specified by Language.
|
||||||
@ -85,15 +78,15 @@ UdpComponentNameGetDriverName (
|
|||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
specified by This is managing. This handle
|
||||||
specifies the controller whose name is to be
|
specifies the controller whose name is to be
|
||||||
returned.
|
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
|
the name of. This is an optional parameter that
|
||||||
may be NULL. It will be NULL for device
|
may be NULL. It will be NULL for device
|
||||||
drivers. It will also be NULL for a bus drivers
|
drivers. It will also be NULL for a bus drivers
|
||||||
@ -102,7 +95,7 @@ UdpComponentNameGetDriverName (
|
|||||||
driver that wishes to retrieve the name of a
|
driver that wishes to retrieve the name of a
|
||||||
child controller.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -111,7 +104,7 @@ UdpComponentNameGetDriverName (
|
|||||||
to the driver writer. Language is specified in
|
to the driver writer. Language is specified in
|
||||||
RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
controller specified by ControllerHandle and
|
controller specified by ControllerHandle and
|
||||||
ChildHandle in the language specified by
|
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,
|
by This does not support the language specified by Language,
|
||||||
then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
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
|
to the driver writer. Language is specified
|
||||||
in RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
driver specified by This in the language
|
driver specified by This in the language
|
||||||
specified by Language.
|
specified by Language.
|
||||||
@ -250,15 +243,15 @@ UdpComponentNameGetDriverName (
|
|||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
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.
|
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
|
specified by This is managing. This handle
|
||||||
specifies the controller whose name is to be
|
specifies the controller whose name is to be
|
||||||
returned.
|
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
|
the name of. This is an optional parameter that
|
||||||
may be NULL. It will be NULL for device
|
may be NULL. It will be NULL for device
|
||||||
drivers. It will also be NULL for a bus drivers
|
drivers. It will also be NULL for a bus drivers
|
||||||
@ -267,7 +260,7 @@ UdpComponentNameGetDriverName (
|
|||||||
driver that wishes to retrieve the name of a
|
driver that wishes to retrieve the name of a
|
||||||
child controller.
|
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
|
array indicating the language. This is the
|
||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
@ -276,7 +269,7 @@ UdpComponentNameGetDriverName (
|
|||||||
to the driver writer. Language is specified in
|
to the driver writer. Language is specified in
|
||||||
RFC 3066 or ISO 639-2 language code format.
|
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
|
This Unicode string is the name of the
|
||||||
controller specified by ControllerHandle and
|
controller specified by ControllerHandle and
|
||||||
ChildHandle in the language specified by
|
ChildHandle in the language specified by
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,13 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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
|
follow these calling restrictions. If any other agent wishes to call
|
||||||
Supported() it must also follow these calling restrictions.
|
Supported() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to test
|
@param[in] ControllerHandle Handle of device to test
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver supports this device
|
@retval EFI_SUCCESS This driver supports this device
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
calling restrictions. If any other agent wishes to call Start() it
|
||||||
must also follow these calling restrictions.
|
must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to bind driver to
|
@param[in] ControllerHandle Handle of device to bind driver to
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
must follow these calling restrictions. If any other agent wishes
|
||||||
to call Stop() it must also follow these calling restrictions.
|
to call Stop() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to stop driver on
|
@param[in] ControllerHandle Handle of device to stop driver on
|
||||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||||
children is zero stop the entire bus driver.
|
children is zero stop the entire bus driver.
|
||||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||||
@retval other This driver was not removed from this device
|
@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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
then a new handle is created. If it is not NULL, then the
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
I/O services are added to the existing child handle.
|
|
||||||
|
|
||||||
@retval EFI_SUCCES The child handle was created with the I/O services
|
@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_INVALID_PARAMETER ChildHandle is NULL.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
||||||
the child
|
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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
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
|
@param ChildHandle Handle of the child to destroy
|
||||||
|
|
||||||
@retval EFI_SUCCES The I/O services were removed from the child handle
|
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
that are being removed.
|
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
|
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||||
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
|
because its services are being used.
|
||||||
I/O services are being used.
|
|
||||||
@retval other The child handle was not destroyed
|
@retval other The child handle was not destroyed
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -483,8 +483,8 @@ Udp4ServiceBindingDestroyChild (
|
|||||||
The entry point for Udp4 driver which installs the driver binding
|
The entry point for Udp4 driver which installs the driver binding
|
||||||
and component name protocol on its ImageHandle.
|
and component name protocol on its ImageHandle.
|
||||||
|
|
||||||
@param ImageHandle The firmware allocated handle for the UEFI image.
|
@param[in] ImageHandle The firmware allocated handle for the UEFI image.
|
||||||
@param SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,13 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Udp4Driver.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef _UDP4_DRIVER_H_
|
#ifndef _UDP4_DRIVER_H_
|
||||||
@ -35,10 +28,10 @@ Abstract:
|
|||||||
follow these calling restrictions. If any other agent wishes to call
|
follow these calling restrictions. If any other agent wishes to call
|
||||||
Supported() it must also follow these calling restrictions.
|
Supported() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to test
|
@param[in] ControllerHandle Handle of device to test
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver supports this device
|
@retval EFI_SUCCESS This driver supports this device
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
calling restrictions. If any other agent wishes to call Start() it
|
||||||
must also follow these calling restrictions.
|
must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to bind driver to
|
@param[in] ControllerHandle Handle of device to bind driver to
|
||||||
@param RemainingDevicePath Optional parameter use to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter use to pick a specific child
|
||||||
device to start.
|
device to start.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
@retval EFI_SUCCESS This driver is added to ControllerHandle
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on 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
|
must follow these calling restrictions. If any other agent wishes
|
||||||
to call Stop() it must also follow these calling restrictions.
|
to call Stop() it must also follow these calling restrictions.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param[in] This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to stop driver on
|
@param[in] ControllerHandle Handle of device to stop driver on
|
||||||
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||||
children is zero stop the entire bus driver.
|
children is zero stop the entire bus driver.
|
||||||
@param ChildHandleBuffer List of Child Handles to Stop.
|
@param[in] ChildHandleBuffer List of Child Handles to Stop.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
@retval EFI_SUCCESS This driver is removed ControllerHandle
|
||||||
@retval other This driver was not removed from this device
|
@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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
then a new handle is created. If it is not NULL, then the
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
I/O services are added to the existing child handle.
|
|
||||||
|
|
||||||
@retval EFI_SUCCES The child handle was created with the I/O services
|
@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_INVALID_PARAMETER ChildHandle is NULL.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
|
||||||
the child
|
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.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
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
|
@param ChildHandle Handle of the child to destroy
|
||||||
|
|
||||||
@retval EFI_SUCCES The I/O services were removed from the child handle
|
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
that are being removed.
|
@retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
|
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||||
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
|
because its services are being used.
|
||||||
I/O services are being used.
|
|
||||||
@retval other The child handle was not destroyed
|
@retval other The child handle was not destroyed
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
The implementation of the Udp4 protocol.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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
|
This function checks and timeouts the I/O datagrams holding by the corresponding
|
||||||
service context.
|
service context.
|
||||||
|
|
||||||
@param Event The event this function registered to.
|
@param[in] Event The event this function registered to.
|
||||||
@param Context The context data registered during the creation of
|
@param[in] Context The context data registered during the creation of
|
||||||
the Event.
|
the Event.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -46,10 +36,10 @@ Udp4CheckTimeout (
|
|||||||
/**
|
/**
|
||||||
This function finds the udp instance by the specified <Address, Port> pair.
|
This function finds the udp instance by the specified <Address, Port> pair.
|
||||||
|
|
||||||
@param InstanceList Pointer to the head of the list linking the udp
|
@param[in] InstanceList Pointer to the head of the list linking the udp
|
||||||
instances.
|
instances.
|
||||||
@param Address Pointer to the specified IPv4 address.
|
@param[in] Address Pointer to the specified IPv4 address.
|
||||||
@param Port The udp port number.
|
@param[in] Port The udp port number.
|
||||||
|
|
||||||
@retval TRUE The specified <Address, Port> pair is found.
|
@retval TRUE The specified <Address, Port> pair is found.
|
||||||
@retval FALSE Otherwise.
|
@retval FALSE Otherwise.
|
||||||
@ -67,12 +57,10 @@ Udp4FindInstanceByPort (
|
|||||||
interface. It's called to signal the udp TxToken when IpIo layer completes the
|
interface. It's called to signal the udp TxToken when IpIo layer completes the
|
||||||
transmitting of the udp datagram.
|
transmitting of the udp datagram.
|
||||||
|
|
||||||
@param Status The completion status of the output udp datagram.
|
@param[in] Status The completion status of the output udp datagram.
|
||||||
@param Context Pointer to the context data.
|
@param[in] Context Pointer to the context data.
|
||||||
@param Sender Pointer to the Ip sender of the udp datagram.
|
@param[in] Sender Pointer to the Ip sender of the udp datagram.
|
||||||
@param NotifyData Pointer to the notify data.
|
@param[in] NotifyData Pointer to the notify data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -86,15 +74,13 @@ Udp4DgramSent (
|
|||||||
/**
|
/**
|
||||||
This function processes the received datagram passed up by the IpIo layer.
|
This function processes the received datagram passed up by the IpIo layer.
|
||||||
|
|
||||||
@param Status The status of this udp datagram.
|
@param[in] Status The status of this udp datagram.
|
||||||
@param IcmpError The IcmpError code, only available when Status is
|
@param[in] IcmpError The IcmpError code, only available when Status is
|
||||||
EFI_ICMP_ERROR.
|
EFI_ICMP_ERROR.
|
||||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA.
|
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA.
|
||||||
@param Packet Pointer to the NET_BUF containing the received udp
|
@param[in] Packet Pointer to the NET_BUF containing the received udp
|
||||||
datagram.
|
datagram.
|
||||||
@param Context Pointer to the context data.
|
@param[in] Context Pointer to the context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -110,9 +96,9 @@ Udp4DgramRcvd (
|
|||||||
This function cancels the token specified by Arg in the Map. This is a callback
|
This function cancels the token specified by Arg in the Map. This is a callback
|
||||||
used by Udp4InstanceCancelToken().
|
used by Udp4InstanceCancelToken().
|
||||||
|
|
||||||
@param Map Pointer to the NET_MAP.
|
@param[in] Map Pointer to the NET_MAP.
|
||||||
@param Item Pointer to the NET_MAP_ITEM.
|
@param[in] Item Pointer to the NET_MAP_ITEM.
|
||||||
@param Arg Pointer to the token to be cancelled, if NULL,
|
@param[in] Arg Pointer to the token to be cancelled, if NULL,
|
||||||
the token specified by Item is cancelled.
|
the token specified by Item is cancelled.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The token is cancelled if Arg is NULL or the token
|
@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.
|
This function matches the received udp datagram with the Instance.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
@param Udp4Session Pointer to the EFI_UDP4_SESSION_DATA abstracted
|
@param[in] Udp4Session Pointer to the EFI_UDP4_SESSION_DATA abstracted
|
||||||
from the received udp datagram.
|
from the received udp datagram.
|
||||||
|
|
||||||
@retval TRUE The udp datagram matches the receiving requirments of the
|
@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.
|
This function removes the Wrap specified by Context and release relevant resources.
|
||||||
|
|
||||||
@param Event The Event this notify function registered to.
|
@param[in] Event The Event this notify function registered to.
|
||||||
@param Context Pointer to the context data.
|
@param[in] Context Pointer to the context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -166,11 +150,11 @@ Udp4RecycleRxDataWrap (
|
|||||||
/**
|
/**
|
||||||
This function wraps the Packet and the RxData.
|
This function wraps the Packet and the RxData.
|
||||||
|
|
||||||
@param Instance Pointer to the instance context data.
|
@param[in] Instance Pointer to the instance context data.
|
||||||
@param Packet Pointer to the buffer containing the received
|
@param[in] Packet Pointer to the buffer containing the received
|
||||||
datagram.
|
datagram.
|
||||||
@param RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
@param[in] RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||||
datagram.
|
datagram.
|
||||||
|
|
||||||
@return Pointer to the structure wrapping the RxData and the Packet.
|
@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.
|
This function enqueues the received datagram into the instances' receiving queues.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the udp service context data.
|
@param[in] Udp4Service Pointer to the udp service context data.
|
||||||
@param Packet Pointer to the buffer containing the received
|
@param[in] Packet Pointer to the buffer containing the received
|
||||||
datagram.
|
datagram.
|
||||||
@param RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
@param[in] RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||||
datagram.
|
datagram.
|
||||||
|
|
||||||
@return The times this datagram is enqueued.
|
@return The times this datagram is enqueued.
|
||||||
|
|
||||||
@ -204,9 +188,7 @@ Udp4EnqueueDgram (
|
|||||||
/**
|
/**
|
||||||
This function delivers the datagrams enqueued in the instances.
|
This function delivers the datagrams enqueued in the instances.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the udp service context data.
|
@param[in] Udp4Service Pointer to the udp service context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -217,13 +199,11 @@ Udp4DeliverDgram (
|
|||||||
/**
|
/**
|
||||||
This function demultiplexes the received udp datagram to the apropriate instances.
|
This function demultiplexes the received udp datagram to the apropriate instances.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the udp service context data.
|
@param[in] Udp4Service Pointer to the udp service context data.
|
||||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA abstrated from
|
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA abstrated from
|
||||||
the received datagram.
|
the received datagram.
|
||||||
@param Packet Pointer to the buffer containing the received udp
|
@param[in] Packet Pointer to the buffer containing the received udp
|
||||||
datagram.
|
datagram.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -237,13 +217,11 @@ Udp4Demultiplex (
|
|||||||
This function handles the received Icmp Error message and demultiplexes it to the
|
This function handles the received Icmp Error message and demultiplexes it to the
|
||||||
instance.
|
instance.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the udp service context data.
|
@param[in] Udp4Service Pointer to the udp service context data.
|
||||||
@param IcmpError The icmp error code.
|
@param[in] IcmpError The icmp error code.
|
||||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA abstracted
|
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA abstracted
|
||||||
from the received Icmp Error packet.
|
from the received Icmp Error packet.
|
||||||
@param Packet Pointer to the Icmp Error packet.
|
@param[in] Packet Pointer to the Icmp Error packet.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -257,13 +235,11 @@ Udp4IcmpHandler (
|
|||||||
/**
|
/**
|
||||||
This function builds and sends out a icmp port unreachable message.
|
This function builds and sends out a icmp port unreachable message.
|
||||||
|
|
||||||
@param IpIo Pointer to the IP_IO instance.
|
@param[in] IpIo Pointer to the IP_IO instance.
|
||||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA of the packet
|
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA of the packet
|
||||||
causes this icmp error message.
|
causes this icmp error message.
|
||||||
@param Udp4Header Pointer to the udp header of the datagram causes
|
@param[in] Udp4Header Pointer to the udp header of the datagram causes
|
||||||
this icmp error message.
|
this icmp error message.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -376,9 +352,7 @@ ON_ERROR:
|
|||||||
/**
|
/**
|
||||||
Clean the Udp service context data.
|
Clean the Udp service context data.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
@param[in] Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -407,11 +381,9 @@ Udp4CleanService (
|
|||||||
This function checks and timeouts the I/O datagrams holding by the corresponding
|
This function checks and timeouts the I/O datagrams holding by the corresponding
|
||||||
service context.
|
service context.
|
||||||
|
|
||||||
@param Event The event this function registered to.
|
@param[in] Event The event this function registered to.
|
||||||
@param Context The context data registered during the creation of
|
@param[in] Context The context data registered during the creation of
|
||||||
the Event.
|
the Event.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -473,8 +445,6 @@ Udp4CheckTimeout (
|
|||||||
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||||
@param Instance Pointer to the un-initialized UDP4_INSTANCE_DATA.
|
@param Instance Pointer to the un-initialized UDP4_INSTANCE_DATA.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Udp4InitInstance (
|
Udp4InitInstance (
|
||||||
@ -516,9 +486,7 @@ Udp4InitInstance (
|
|||||||
/**
|
/**
|
||||||
This function cleans the udp instance.
|
This function cleans the udp instance.
|
||||||
|
|
||||||
@param Instance Pointer to the UDP4_INSTANCE_DATA to clean.
|
@param[in] Instance Pointer to the UDP4_INSTANCE_DATA to clean.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -535,10 +503,10 @@ Udp4CleanInstance (
|
|||||||
/**
|
/**
|
||||||
This function finds the udp instance by the specified <Address, Port> pair.
|
This function finds the udp instance by the specified <Address, Port> pair.
|
||||||
|
|
||||||
@param InstanceList Pointer to the head of the list linking the udp
|
@param[in] InstanceList Pointer to the head of the list linking the udp
|
||||||
instances.
|
instances.
|
||||||
@param Address Pointer to the specified IPv4 address.
|
@param[in] Address Pointer to the specified IPv4 address.
|
||||||
@param Port The udp port number.
|
@param[in] Port The udp port number.
|
||||||
|
|
||||||
@retval TRUE The specified <Address, Port> pair is found.
|
@retval TRUE The specified <Address, Port> pair is found.
|
||||||
@retval FALSE Otherwise.
|
@retval FALSE Otherwise.
|
||||||
@ -672,9 +640,9 @@ Udp4Bind (
|
|||||||
This function is used to check whether the NewConfigData has any un-reconfigurable
|
This function is used to check whether the NewConfigData has any un-reconfigurable
|
||||||
parameters changed compared to the OldConfigData.
|
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.
|
uses.
|
||||||
@param NewConfigData Pointer to the new ConfigData.
|
@param[in] NewConfigData Pointer to the new ConfigData.
|
||||||
|
|
||||||
@retval TRUE The instance is reconfigurable.
|
@retval TRUE The instance is reconfigurable.
|
||||||
@retval FALSE Otherwise.
|
@retval FALSE Otherwise.
|
||||||
@ -753,10 +721,8 @@ Udp4IsReconfigurable (
|
|||||||
/**
|
/**
|
||||||
This function builds the Ip4 configdata from the Udp4ConfigData.
|
This function builds the Ip4 configdata from the Udp4ConfigData.
|
||||||
|
|
||||||
@param Udp4ConfigData Pointer to the EFI_UDP4_CONFIG_DATA.
|
@param[in] Udp4ConfigData Pointer to the EFI_UDP4_CONFIG_DATA.
|
||||||
@param Ip4ConfigData Pointer to the EFI_IP4_CONFIG_DATA.
|
@param[in, out] Ip4ConfigData Pointer to the EFI_IP4_CONFIG_DATA.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -784,8 +750,8 @@ Udp4BuildIp4ConfigData (
|
|||||||
/**
|
/**
|
||||||
This function validates the TxToken, it returns the error code according to the spec.
|
This function validates the TxToken, it returns the error code according to the spec.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
@param TxToken Pointer to the token to be checked.
|
@param[in] TxToken Pointer to the token to be checked.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The TxToken is valid.
|
@retval EFI_SUCCESS The TxToken is valid.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE: This is
|
@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.
|
This function checks whether the specified Token duplicates with the one in the Map.
|
||||||
|
|
||||||
@param Map Pointer to the NET_MAP.
|
@param[in] Map Pointer to the NET_MAP.
|
||||||
@param Item Pointer to the NET_MAP_ITEM contain the pointer to
|
@param[in] Item Pointer to the NET_MAP_ITEM contain the pointer to
|
||||||
the Token.
|
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
|
@retval EFI_SUCCESS The Token specified by Context differs from the
|
||||||
one in the Item.
|
one in the Item.
|
||||||
@ -950,11 +916,11 @@ Udp4TokenExist (
|
|||||||
This function calculates the checksum for the Packet, utilizing the pre-calculated
|
This function calculates the checksum for the Packet, utilizing the pre-calculated
|
||||||
pseudo HeadSum to reduce some overhead.
|
pseudo HeadSum to reduce some overhead.
|
||||||
|
|
||||||
@param Packet Pointer to the NET_BUF contains the udp datagram.
|
@param[in] Packet Pointer to the NET_BUF contains the udp datagram.
|
||||||
@param HeadSum Checksum of the pseudo header execpt the length
|
@param[in] HeadSum Checksum of the pseudo header execpt the length
|
||||||
field.
|
field.
|
||||||
|
|
||||||
@return The 16-bit checksum of this udp datagram.
|
@retval The 16-bit checksum of this udp datagram.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
UINT16
|
UINT16
|
||||||
@ -977,8 +943,8 @@ Udp4Checksum (
|
|||||||
/**
|
/**
|
||||||
This function removes the specified Token from the TokenMap.
|
This function removes the specified Token from the TokenMap.
|
||||||
|
|
||||||
@param TokenMap Pointer to the NET_MAP containing the tokens.
|
@param TokenMap Pointer to the NET_MAP containing the tokens.
|
||||||
@param Token Pointer to the Token to be removed.
|
@param Token Pointer to the Token to be removed.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The specified Token is removed from the TokenMap.
|
@retval EFI_SUCCESS The specified Token is removed from the TokenMap.
|
||||||
@retval EFI_NOT_FOUND The specified Token is not found in 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
|
interface. It's called to signal the udp TxToken when IpIo layer completes the
|
||||||
transmitting of the udp datagram.
|
transmitting of the udp datagram.
|
||||||
|
|
||||||
@param Status The completion status of the output udp datagram.
|
@param[in] Status The completion status of the output udp datagram.
|
||||||
@param Context Pointer to the context data.
|
@param[in] Context Pointer to the context data.
|
||||||
@param Sender Pointer to the Ip sender of the udp datagram.
|
@param[in] Sender Pointer to the Ip sender of the udp datagram.
|
||||||
@param NotifyData Pointer to the notify data.
|
@param[in] NotifyData Pointer to the notify data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1051,15 +1015,13 @@ Udp4DgramSent (
|
|||||||
/**
|
/**
|
||||||
This function processes the received datagram passed up by the IpIo layer.
|
This function processes the received datagram passed up by the IpIo layer.
|
||||||
|
|
||||||
@param Status The status of this udp datagram.
|
@param[in] Status The status of this udp datagram.
|
||||||
@param IcmpError The IcmpError code, only available when Status is
|
@param[in] IcmpError The IcmpError code, only available when Status is
|
||||||
EFI_ICMP_ERROR.
|
EFI_ICMP_ERROR.
|
||||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA.
|
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA.
|
||||||
@param Packet Pointer to the NET_BUF containing the received udp
|
@param[in] Packet Pointer to the NET_BUF containing the received udp
|
||||||
datagram.
|
datagram.
|
||||||
@param Context Pointer to the context data.
|
@param[in] Context Pointer to the context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1148,9 +1110,9 @@ Udp4LeaveGroup (
|
|||||||
This function cancels the token specified by Arg in the Map. This is a callback
|
This function cancels the token specified by Arg in the Map. This is a callback
|
||||||
used by Udp4InstanceCancelToken().
|
used by Udp4InstanceCancelToken().
|
||||||
|
|
||||||
@param Map Pointer to the NET_MAP.
|
@param[in] Map Pointer to the NET_MAP.
|
||||||
@param Item Pointer to the NET_MAP_ITEM.
|
@param[in] Item Pointer to the NET_MAP_ITEM.
|
||||||
@param Arg Pointer to the token to be cancelled, if NULL,
|
@param[in] Arg Pointer to the token to be cancelled, if NULL,
|
||||||
the token specified by Item is cancelled.
|
the token specified by Item is cancelled.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The token is cancelled if Arg is NULL or the token
|
@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.
|
This function removes all the Wrap datas in the RcvdDgramQue.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1238,8 +1198,8 @@ Udp4FlushRcvdDgram (
|
|||||||
/**
|
/**
|
||||||
Cancel Udp4 tokens from the Udp4 instance.
|
Cancel Udp4 tokens from the Udp4 instance.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
@param Token Pointer to the token to be canceled, if NULL, all
|
@param[in] Token Pointer to the token to be canceled, if NULL, all
|
||||||
tokens in this instance will be cancelled.
|
tokens in this instance will be cancelled.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Token is cancelled.
|
@retval EFI_SUCCESS The Token is cancelled.
|
||||||
@ -1291,8 +1251,8 @@ Udp4InstanceCancelToken (
|
|||||||
/**
|
/**
|
||||||
This function matches the received udp datagram with the Instance.
|
This function matches the received udp datagram with the Instance.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
@param Udp4Session Pointer to the EFI_UDP4_SESSION_DATA abstracted
|
@param[in] Udp4Session Pointer to the EFI_UDP4_SESSION_DATA abstracted
|
||||||
from the received udp datagram.
|
from the received udp datagram.
|
||||||
|
|
||||||
@retval TRUE The udp datagram matches the receiving requirments of the
|
@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.
|
This function removes the Wrap specified by Context and release relevant resources.
|
||||||
|
|
||||||
@param Event The Event this notify function registered to.
|
@param[in] Event The Event this notify function registered to.
|
||||||
@param Context Pointer to the context data.
|
@param[in] Context Pointer to the context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1410,11 +1368,11 @@ Udp4RecycleRxDataWrap (
|
|||||||
/**
|
/**
|
||||||
This function wraps the Packet and the RxData.
|
This function wraps the Packet and the RxData.
|
||||||
|
|
||||||
@param Instance Pointer to the instance context data.
|
@param[in] Instance Pointer to the instance context data.
|
||||||
@param Packet Pointer to the buffer containing the received
|
@param[in] Packet Pointer to the buffer containing the received
|
||||||
datagram.
|
datagram.
|
||||||
@param RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
@param[in] RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||||
datagram.
|
datagram.
|
||||||
|
|
||||||
@return Pointer to the structure wrapping the RxData and the Packet.
|
@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.
|
This function enqueues the received datagram into the instances' receiving queues.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the udp service context data.
|
@param[in] Udp4Service Pointer to the udp service context data.
|
||||||
@param Packet Pointer to the buffer containing the received
|
@param[in] Packet Pointer to the buffer containing the received
|
||||||
datagram.
|
datagram.
|
||||||
@param RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
@param[in] RxData Pointer to the EFI_UDP4_RECEIVE_DATA of this
|
||||||
datagram.
|
datagram.
|
||||||
|
|
||||||
@return The times this datagram is enqueued.
|
@return The times this datagram is enqueued.
|
||||||
|
|
||||||
@ -1524,9 +1482,7 @@ Udp4EnqueueDgram (
|
|||||||
/**
|
/**
|
||||||
This function delivers the received datagrams for the specified instance.
|
This function delivers the received datagrams for the specified instance.
|
||||||
|
|
||||||
@param Instance Pointer to the instance context data.
|
@param[in] Instance Pointer to the instance context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1590,9 +1546,7 @@ Udp4InstanceDeliverDgram (
|
|||||||
/**
|
/**
|
||||||
This function delivers the datagrams enqueued in the instances.
|
This function delivers the datagrams enqueued in the instances.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the udp service context data.
|
@param[in] Udp4Service Pointer to the udp service context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1624,13 +1578,11 @@ Udp4DeliverDgram (
|
|||||||
/**
|
/**
|
||||||
This function demultiplexes the received udp datagram to the apropriate instances.
|
This function demultiplexes the received udp datagram to the apropriate instances.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the udp service context data.
|
@param[in] Udp4Service Pointer to the udp service context data.
|
||||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA abstrated from
|
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA abstrated from
|
||||||
the received datagram.
|
the received datagram.
|
||||||
@param Packet Pointer to the buffer containing the received udp
|
@param[in] Packet Pointer to the buffer containing the received udp
|
||||||
datagram.
|
datagram.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1715,13 +1667,11 @@ Udp4Demultiplex (
|
|||||||
/**
|
/**
|
||||||
This function builds and sends out a icmp port unreachable message.
|
This function builds and sends out a icmp port unreachable message.
|
||||||
|
|
||||||
@param IpIo Pointer to the IP_IO instance.
|
@param[in] IpIo Pointer to the IP_IO instance.
|
||||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA of the packet
|
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA of the packet
|
||||||
causes this icmp error message.
|
causes this icmp error message.
|
||||||
@param Udp4Header Pointer to the udp header of the datagram causes
|
@param[in] Udp4Header Pointer to the udp header of the datagram causes
|
||||||
this icmp error message.
|
this icmp error message.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1817,13 +1767,11 @@ Udp4SendPortUnreach (
|
|||||||
This function handles the received Icmp Error message and demultiplexes it to the
|
This function handles the received Icmp Error message and demultiplexes it to the
|
||||||
instance.
|
instance.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the udp service context data.
|
@param[in] Udp4Service Pointer to the udp service context data.
|
||||||
@param IcmpError The icmp error code.
|
@param[in] IcmpError The icmp error code.
|
||||||
@param NetSession Pointer to the EFI_NET_SESSION_DATA abstracted
|
@param[in] NetSession Pointer to the EFI_NET_SESSION_DATA abstracted
|
||||||
from the received Icmp Error packet.
|
from the received Icmp Error packet.
|
||||||
@param Packet Pointer to the Icmp Error packet.
|
@param[in] Packet Pointer to the Icmp Error packet.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1892,9 +1840,7 @@ Udp4IcmpHandler (
|
|||||||
/**
|
/**
|
||||||
This function reports the received ICMP error.
|
This function reports the received ICMP error.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -1937,9 +1883,7 @@ Udp4ReportIcmpError (
|
|||||||
This function is a dummy ext-free function for the NET_BUF created for the output
|
This function is a dummy ext-free function for the NET_BUF created for the output
|
||||||
udp datagram.
|
udp datagram.
|
||||||
|
|
||||||
@param Context Pointer to the context data.
|
@param[in] Context Pointer to the context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -2089,9 +2033,7 @@ ON_ERROR:
|
|||||||
/**
|
/**
|
||||||
Clear the variable and free the resource.
|
Clear the variable and free the resource.
|
||||||
|
|
||||||
@param Udp4Service Udp4 service data.
|
@param[[in] Udp4Service Udp4 service data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
EFI UDPv4 protocol implementation.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Udp4Impl.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
EFI UDPv4 protocol implementation
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef _UDP4_IMPL_H_
|
#ifndef _UDP4_IMPL_H_
|
||||||
@ -171,8 +163,8 @@ Udp4GetModeData (
|
|||||||
With different parameters in UdpConfigData, Configure() can be used to bind
|
With different parameters in UdpConfigData, Configure() can be used to bind
|
||||||
this instance to specified port.
|
this instance to specified port.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param UdpConfigData Pointer to the buffer to receive the current configuration data.
|
@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_SUCCESS The configuration settings were set, changed, or reset successfully.
|
||||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
|
@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
|
filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all
|
||||||
currently joined groups are left.
|
currently joined groups are left.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one
|
@param[in] JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one
|
||||||
or all multicast groups.
|
or all multicast groups.
|
||||||
@param MulticastAddress Pointer to multicast group address to join or leave.
|
@param[in] MulticastAddress Pointer to multicast group address to join or leave.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.
|
@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
|
copies will be updated automatically whenever the IP driver reconfigures its
|
||||||
instances; as a result, the previous modification to these copies will be lost.
|
instances; as a result, the previous modification to these copies will be lost.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param DeleteRoute Set to TRUE to delete this route from the routing table.
|
@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.
|
Set to FALSE to add this route to the routing table.
|
||||||
@param SubnetAddress The destination network address that needs to be routed.
|
@param[in] SubnetAddress The destination network address that needs to be routed.
|
||||||
@param SubnetMask The subnet mask of SubnetAddress.
|
@param[in] SubnetMask The subnet mask of SubnetAddress.
|
||||||
@param GatewayAddress The gateway IP address for this route.
|
@param[in] GatewayAddress The gateway IP address for this route.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.
|
@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
|
and context for the event will enable the user to receive the notification and
|
||||||
transmitting status.
|
transmitting status.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param Token Pointer to the completion token that will be placed into the
|
@param[in] Token Pointer to the completion token that will be placed into the
|
||||||
transmit queue.
|
transmit queue.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The data has been queued for transmission.
|
@retval EFI_SUCCESS The data has been queued for transmission.
|
||||||
@retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.
|
@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
|
will enable the user to receive the notification and receiving status. That
|
||||||
notification function is guaranteed to not be re-entered.
|
notification function is guaranteed to not be re-entered.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that is associated with the receive data
|
@param[in] Token Pointer to a token that is associated with
|
||||||
descriptor.
|
the receive data descriptor.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The receive completion token was cached.
|
@retval EFI_SUCCESS The receive completion token was cached.
|
||||||
@retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.
|
@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
|
the asynchronous operation has completed, this function will not signal the
|
||||||
token and EFI_NOT_FOUND is returned.
|
token and EFI_NOT_FOUND is returned.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that has been issued by
|
@param[in] Token Pointer to a token that has been issued by
|
||||||
EFI_UDP4_PROTOCOL.Transmit() or
|
EFI_UDP4_PROTOCOL.Transmit() or
|
||||||
EFI_UDP4_PROTOCOL.Receive().If NULL, all pending
|
EFI_UDP4_PROTOCOL.Receive().If NULL, all pending
|
||||||
tokens are aborted.
|
tokens are aborted.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event
|
@retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event
|
||||||
was signaled. When Token is NULL, all pending requests are
|
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
|
Drivers and applications that are experiencing packet loss should try calling
|
||||||
the Poll() function more often.
|
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_SUCCESS Incoming or outgoing data was processed.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||||
@ -438,9 +430,7 @@ Udp4CreateService (
|
|||||||
/**
|
/**
|
||||||
Clean the Udp service context data.
|
Clean the Udp service context data.
|
||||||
|
|
||||||
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
@param[in] Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -454,8 +444,6 @@ Udp4CleanService (
|
|||||||
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
@param Udp4Service Pointer to the UDP4_SERVICE_DATA.
|
||||||
@param Instance Pointer to the un-initialized UDP4_INSTANCE_DATA.
|
@param Instance Pointer to the un-initialized UDP4_INSTANCE_DATA.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Udp4InitInstance (
|
Udp4InitInstance (
|
||||||
@ -466,9 +454,7 @@ Udp4InitInstance (
|
|||||||
/**
|
/**
|
||||||
This function cleans the udp instance.
|
This function cleans the udp instance.
|
||||||
|
|
||||||
@param Instance Pointer to the UDP4_INSTANCE_DATA to clean.
|
@param[in] Instance Pointer to the UDP4_INSTANCE_DATA to clean.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -502,9 +488,9 @@ Udp4Bind (
|
|||||||
This function is used to check whether the NewConfigData has any un-reconfigurable
|
This function is used to check whether the NewConfigData has any un-reconfigurable
|
||||||
parameters changed compared to the OldConfigData.
|
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.
|
uses.
|
||||||
@param NewConfigData Pointer to the new ConfigData.
|
@param[in] NewConfigData Pointer to the new ConfigData.
|
||||||
|
|
||||||
@retval TRUE The instance is reconfigurable.
|
@retval TRUE The instance is reconfigurable.
|
||||||
@retval FALSE Otherwise.
|
@retval FALSE Otherwise.
|
||||||
@ -519,10 +505,8 @@ Udp4IsReconfigurable (
|
|||||||
/**
|
/**
|
||||||
This function builds the Ip4 configdata from the Udp4ConfigData.
|
This function builds the Ip4 configdata from the Udp4ConfigData.
|
||||||
|
|
||||||
@param Udp4ConfigData Pointer to the EFI_UDP4_CONFIG_DATA.
|
@param[in] Udp4ConfigData Pointer to the EFI_UDP4_CONFIG_DATA.
|
||||||
@param Ip4ConfigData Pointer to the EFI_IP4_CONFIG_DATA.
|
@param[in, out] Ip4ConfigData Pointer to the EFI_IP4_CONFIG_DATA.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -534,8 +518,8 @@ Udp4BuildIp4ConfigData (
|
|||||||
/**
|
/**
|
||||||
This function validates the TxToken, it returns the error code according to the spec.
|
This function validates the TxToken, it returns the error code according to the spec.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
@param TxToken Pointer to the token to be checked.
|
@param[in] TxToken Pointer to the token to be checked.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The TxToken is valid.
|
@retval EFI_SUCCESS The TxToken is valid.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE: This is
|
@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.
|
This function checks whether the specified Token duplicates with the one in the Map.
|
||||||
|
|
||||||
@param Map Pointer to the NET_MAP.
|
@param[in] Map Pointer to the NET_MAP.
|
||||||
@param Item Pointer to the NET_MAP_ITEM contain the pointer to
|
@param[in] Item Pointer to the NET_MAP_ITEM contain the pointer to
|
||||||
the Token.
|
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
|
@retval EFI_SUCCESS The Token specified by Context differs from the
|
||||||
one in the Item.
|
one in the Item.
|
||||||
@ -587,11 +571,11 @@ Udp4TokenExist (
|
|||||||
This function calculates the checksum for the Packet, utilizing the pre-calculated
|
This function calculates the checksum for the Packet, utilizing the pre-calculated
|
||||||
pseudo HeadSum to reduce some overhead.
|
pseudo HeadSum to reduce some overhead.
|
||||||
|
|
||||||
@param Packet Pointer to the NET_BUF contains the udp datagram.
|
@param[in] Packet Pointer to the NET_BUF contains the udp datagram.
|
||||||
@param HeadSum Checksum of the pseudo header execpt the length
|
@param[in] HeadSum Checksum of the pseudo header execpt the length
|
||||||
field.
|
field.
|
||||||
|
|
||||||
@return The 16-bit checksum of this udp datagram.
|
@retval The 16-bit checksum of this udp datagram.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
UINT16
|
UINT16
|
||||||
@ -603,8 +587,8 @@ Udp4Checksum (
|
|||||||
/**
|
/**
|
||||||
This function removes the specified Token from the TokenMap.
|
This function removes the specified Token from the TokenMap.
|
||||||
|
|
||||||
@param TokenMap Pointer to the NET_MAP containing the tokens.
|
@param TokenMap Pointer to the NET_MAP containing the tokens.
|
||||||
@param Token Pointer to the Token to be removed.
|
@param Token Pointer to the Token to be removed.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The specified Token is removed from the TokenMap.
|
@retval EFI_SUCCESS The specified Token is removed from the TokenMap.
|
||||||
@retval EFI_NOT_FOUND The specified Token is not found in 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.
|
This function removes all the Wrap datas in the RcvdDgramQue.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -652,8 +634,8 @@ Udp4FlushRcvdDgram (
|
|||||||
/**
|
/**
|
||||||
Cancel Udp4 tokens from the Udp4 instance.
|
Cancel Udp4 tokens from the Udp4 instance.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
@param Token Pointer to the token to be canceled, if NULL, all
|
@param[in] Token Pointer to the token to be canceled, if NULL, all
|
||||||
tokens in this instance will be cancelled.
|
tokens in this instance will be cancelled.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Token is cancelled.
|
@retval EFI_SUCCESS The Token is cancelled.
|
||||||
@ -669,9 +651,7 @@ Udp4InstanceCancelToken (
|
|||||||
/**
|
/**
|
||||||
This function delivers the received datagrams for the specified instance.
|
This function delivers the received datagrams for the specified instance.
|
||||||
|
|
||||||
@param Instance Pointer to the instance context data.
|
@param[in] Instance Pointer to the instance context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -682,9 +662,7 @@ Udp4InstanceDeliverDgram (
|
|||||||
/**
|
/**
|
||||||
This function reports the received ICMP error.
|
This function reports the received ICMP error.
|
||||||
|
|
||||||
@param Instance Pointer to the udp instance context data.
|
@param[in] Instance Pointer to the udp instance context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -696,9 +674,7 @@ Udp4ReportIcmpError (
|
|||||||
This function is a dummy ext-free function for the NET_BUF created for the output
|
This function is a dummy ext-free function for the NET_BUF created for the output
|
||||||
udp datagram.
|
udp datagram.
|
||||||
|
|
||||||
@param Context Pointer to the context data.
|
@param[in] Context Pointer to the context data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -725,9 +701,7 @@ Udp4SetVariableData (
|
|||||||
/**
|
/**
|
||||||
Clear the variable and free the resource.
|
Clear the variable and free the resource.
|
||||||
|
|
||||||
@param Udp4Service Udp4 service data.
|
@param[[in] Udp4Service Udp4 service data.
|
||||||
|
|
||||||
@return None.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
||||||
@ -9,13 +9,6 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
Udp4Main.c
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Udp4Impl.h"
|
#include "Udp4Impl.h"
|
||||||
@ -114,8 +107,8 @@ Udp4GetModeData (
|
|||||||
With different parameters in UdpConfigData, Configure() can be used to bind
|
With different parameters in UdpConfigData, Configure() can be used to bind
|
||||||
this instance to specified port.
|
this instance to specified port.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param UdpConfigData Pointer to the buffer to receive the current configuration data.
|
@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_SUCCESS The configuration settings were set, changed, or reset successfully.
|
||||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
|
@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
|
filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all
|
||||||
currently joined groups are left.
|
currently joined groups are left.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one
|
@param[in] JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one
|
||||||
or all multicast groups.
|
or all multicast groups.
|
||||||
@param MulticastAddress Pointer to multicast group address to join or leave.
|
@param[in] MulticastAddress Pointer to multicast group address to join or leave.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.
|
@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
|
copies will be updated automatically whenever the IP driver reconfigures its
|
||||||
instances; as a result, the previous modification to these copies will be lost.
|
instances; as a result, the previous modification to these copies will be lost.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param DeleteRoute Set to TRUE to delete this route from the routing table.
|
@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.
|
Set to FALSE to add this route to the routing table.
|
||||||
@param SubnetAddress The destination network address that needs to be routed.
|
@param[in] SubnetAddress The destination network address that needs to be routed.
|
||||||
@param SubnetMask The subnet mask of SubnetAddress.
|
@param[in] SubnetMask The subnet mask of SubnetAddress.
|
||||||
@param GatewayAddress The gateway IP address for this route.
|
@param[in] GatewayAddress The gateway IP address for this route.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started.
|
@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
|
and context for the event will enable the user to receive the notification and
|
||||||
transmitting status.
|
transmitting status.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param Token Pointer to the completion token that will be placed into the
|
@param[in] Token Pointer to the completion token that will be placed into the
|
||||||
transmit queue.
|
transmit queue.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The data has been queued for transmission.
|
@retval EFI_SUCCESS The data has been queued for transmission.
|
||||||
@retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.
|
@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
|
will enable the user to receive the notification and receiving status. That
|
||||||
notification function is guaranteed to not be re-entered.
|
notification function is guaranteed to not be re-entered.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that is associated with the receive data
|
@param[in] Token Pointer to a token that is associated with
|
||||||
descriptor.
|
the receive data descriptor.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The receive completion token was cached.
|
@retval EFI_SUCCESS The receive completion token was cached.
|
||||||
@retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started.
|
@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
|
the asynchronous operation has completed, this function will not signal the
|
||||||
token and EFI_NOT_FOUND is returned.
|
token and EFI_NOT_FOUND is returned.
|
||||||
|
|
||||||
@param This Pointer to the EFI_UDP4_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_UDP4_PROTOCOL instance.
|
||||||
@param Token Pointer to a token that has been issued by
|
@param[in] Token Pointer to a token that has been issued by
|
||||||
EFI_UDP4_PROTOCOL.Transmit() or
|
EFI_UDP4_PROTOCOL.Transmit() or
|
||||||
EFI_UDP4_PROTOCOL.Receive().If NULL, all pending
|
EFI_UDP4_PROTOCOL.Receive().If NULL, all pending
|
||||||
tokens are aborted.
|
tokens are aborted.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event
|
@retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event
|
||||||
was signaled. When Token is NULL, all pending requests are
|
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
|
Drivers and applications that are experiencing packet loss should try calling
|
||||||
the Poll() function more often.
|
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_SUCCESS Incoming or outgoing data was processed.
|
||||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||||
|
Reference in New Issue
Block a user