mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 08:34:07 +02:00
NetworkPkg/Ip4Dxe: Fix various typos
Fix various typos in comments and documentation. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-40-philmd@redhat.com>
This commit is contained in:
parent
ba3b642d5b
commit
6c585b52e5
@ -9,7 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return the cast type (Unicast/Boradcast) specific to an
|
Return the cast type (Unicast/Broadcast) specific to an
|
||||||
interface. All the addresses are host byte ordered.
|
interface. All the addresses are host byte ordered.
|
||||||
|
|
||||||
@param[in] IpAddr The IP address to classify in host byte order
|
@param[in] IpAddr The IP address to classify in host byte order
|
||||||
@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
|
|
||||||
@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
|
||||||
@retval IP4_SUBNET_BROADCAST The IpAddr is a directed subnet boradcast to the
|
@retval IP4_SUBNET_BROADCAST The IpAddr is a directed subnet broadcast to the
|
||||||
interface
|
interface
|
||||||
@retval IP4_NET_BROADCAST The IpAddr is a network broadcast to the interface
|
@retval IP4_NET_BROADCAST The IpAddr is a network broadcast to the interface
|
||||||
@retval 0 Otherwise.
|
@retval 0 Otherwise.
|
||||||
@ -182,7 +182,7 @@ 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[in] IpSb Ip4 service binding instance
|
@param[in] IpSb Ip4 service binding instance
|
||||||
@param[in] Ip The Ip adress to find (host byte order)
|
@param[in] Ip The Ip address to find (host byte order)
|
||||||
@param[in] 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
|
||||||
@ -266,10 +266,10 @@ Ip4NtohHead (
|
|||||||
/**
|
/**
|
||||||
Validate that Ip/Netmask pair is OK to be used as station
|
Validate that Ip/Netmask pair is OK to be used as station
|
||||||
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 network.
|
||||||
|
|
||||||
@param[in] Ip The IP address to validate.
|
@param[in] Ip The IP address to validate.
|
||||||
@param[in] Netmask The netmaks of the IP.
|
@param[in] Netmask The netmask 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.
|
||||||
|
@ -23,7 +23,7 @@ typedef struct _IP4_SERVICE IP4_SERVICE;
|
|||||||
#define IP4_LINK_PROMISC 0x00000004
|
#define IP4_LINK_PROMISC 0x00000004
|
||||||
|
|
||||||
//
|
//
|
||||||
// IP4 address cast type classfication. Keep it true that any
|
// IP4 address cast type classification. Keep it true that any
|
||||||
// type bigger than or equal to LOCAL_BROADCAST is broadcast.
|
// type bigger than or equal to LOCAL_BROADCAST is broadcast.
|
||||||
//
|
//
|
||||||
#define IP4_PROMISCUOUS 1
|
#define IP4_PROMISCUOUS 1
|
||||||
@ -63,13 +63,13 @@ typedef struct _IP4_SERVICE IP4_SERVICE;
|
|||||||
#define IP4_IS_BROADCAST(CastType) ((CastType) >= IP4_LOCAL_BROADCAST)
|
#define IP4_IS_BROADCAST(CastType) ((CastType) >= IP4_LOCAL_BROADCAST)
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Conver the Microsecond to second. IP transmit/receive time is
|
/// Convert the Microsecond to second. IP transmit/receive time is
|
||||||
/// in the unit of microsecond. IP ticks once per second.
|
/// in the unit of microsecond. IP ticks once per second.
|
||||||
///
|
///
|
||||||
#define IP4_US_TO_SEC(Us) (((Us) + 999999) / 1000000)
|
#define IP4_US_TO_SEC(Us) (((Us) + 999999) / 1000000)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return the cast type (Unicast/Boradcast) specific to an
|
Return the cast type (Unicast/Broadcast) specific to an
|
||||||
interface. All the addresses are host byte ordered.
|
interface. All the addresses are host byte ordered.
|
||||||
|
|
||||||
@param[in] IpAddr The IP address to classify in host byte order
|
@param[in] IpAddr The IP address to classify in host byte order
|
||||||
@ -77,7 +77,7 @@ typedef struct _IP4_SERVICE IP4_SERVICE;
|
|||||||
|
|
||||||
@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
|
||||||
@retval IP4_SUBNET_BROADCAST The IpAddr is a directed subnet boradcast to the
|
@retval IP4_SUBNET_BROADCAST The IpAddr is a directed subnet broadcast to the
|
||||||
interface
|
interface
|
||||||
@retval IP4_NET_BROADCAST The IpAddr is a network broadcast to the interface
|
@retval IP4_NET_BROADCAST The IpAddr is a network broadcast to the interface
|
||||||
@retval 0 Otherwise.
|
@retval 0 Otherwise.
|
||||||
@ -146,7 +146,7 @@ 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[in] IpSb Ip4 service binding instance
|
@param[in] IpSb Ip4 service binding instance
|
||||||
@param[in] Ip The Ip adress to find (host byte order)
|
@param[in] Ip The Ip address to find (host byte order)
|
||||||
@param[in] 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
|
||||||
@ -199,10 +199,10 @@ Ip4NtohHead (
|
|||||||
/**
|
/**
|
||||||
Validate that Ip/Netmask pair is OK to be used as station
|
Validate that Ip/Netmask pair is OK to be used as station
|
||||||
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 network.
|
||||||
|
|
||||||
@param[in] Ip The IP address to validate.
|
@param[in] Ip The IP address to validate.
|
||||||
@param[in] Netmask The netmaks of the IP.
|
@param[in] Netmask The netmask 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.
|
||||||
|
@ -174,7 +174,7 @@ Ip4Config2SignalEvent (
|
|||||||
/**
|
/**
|
||||||
Read the configuration data from variable storage according to the VarName and
|
Read the configuration data from variable storage according to the VarName and
|
||||||
gEfiIp4Config2ProtocolGuid. It checks the integrity of variable data. If the
|
gEfiIp4Config2ProtocolGuid. It checks the integrity of variable data. If the
|
||||||
data is corrupted, it clears the variable data to ZERO. Othewise, it outputs the
|
data is corrupted, it clears the variable data to ZERO. Otherwise, it outputs the
|
||||||
configuration data to IP4_CONFIG2_INSTANCE.
|
configuration data to IP4_CONFIG2_INSTANCE.
|
||||||
|
|
||||||
@param[in] VarName The pointer to the variable name
|
@param[in] VarName The pointer to the variable name
|
||||||
@ -377,7 +377,7 @@ Ip4Config2WriteConfigData (
|
|||||||
@param[out] Table The built IP4 route table.
|
@param[out] Table The built IP4 route table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The route table is successfully build
|
@retval EFI_SUCCESS The route table is successfully build
|
||||||
@retval EFI_NOT_FOUND Failed to allocate the memory for the rotue table.
|
@retval EFI_NOT_FOUND Failed to allocate the memory for the route table.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -912,7 +912,7 @@ Ip4StartAutoConfig (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// A host must not invoke DHCP configuration if it is already
|
// A host must not invoke DHCP configuration if it is already
|
||||||
// participating in the DHCP configuraiton process.
|
// participating in the DHCP configuration process.
|
||||||
//
|
//
|
||||||
if (Instance->Dhcp4Handle != NULL) {
|
if (Instance->Dhcp4Handle != NULL) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
@ -1234,7 +1234,7 @@ Ip4Config2SetPolicy (
|
|||||||
under the current policy.
|
under the current policy.
|
||||||
@retval EFI_INVALID_PARAMETER One or more fields in Data is invalid.
|
@retval EFI_INVALID_PARAMETER One or more fields in Data is invalid.
|
||||||
@retval EFI_OUT_OF_RESOURCES Fail to allocate resource to complete the operation.
|
@retval EFI_OUT_OF_RESOURCES Fail to allocate resource to complete the operation.
|
||||||
@retval EFI_NOT_READY An asynchrous process is invoked to set the specified
|
@retval EFI_NOT_READY An asynchronous process is invoked to set the specified
|
||||||
configuration data, and the process is not finished.
|
configuration data, and the process is not finished.
|
||||||
@retval EFI_ABORTED The manual addresses to be set equal current
|
@retval EFI_ABORTED The manual addresses to be set equal current
|
||||||
configuration.
|
configuration.
|
||||||
@ -1721,7 +1721,7 @@ EfiIp4Config2SetData (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// Another asynchornous process is on the way.
|
// Another asynchronous process is on the way.
|
||||||
//
|
//
|
||||||
Status = EFI_ACCESS_DENIED;
|
Status = EFI_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ typedef struct {
|
|||||||
/**
|
/**
|
||||||
Read the configuration data from variable storage according to the VarName and
|
Read the configuration data from variable storage according to the VarName and
|
||||||
gEfiIp4Config2ProtocolGuid. It checks the integrity of variable data. If the
|
gEfiIp4Config2ProtocolGuid. It checks the integrity of variable data. If the
|
||||||
data is corrupted, it clears the variable data to ZERO. Othewise, it outputs the
|
data is corrupted, it clears the variable data to ZERO. Otherwise, it outputs the
|
||||||
configuration data to IP4_CONFIG2_INSTANCE.
|
configuration data to IP4_CONFIG2_INSTANCE.
|
||||||
|
|
||||||
@param[in] VarName The pointer to the variable name
|
@param[in] VarName The pointer to the variable name
|
||||||
|
@ -988,7 +988,7 @@ Failure:
|
|||||||
@param[out] Progress A pointer to a string filled in with the
|
@param[out] Progress A pointer to a string filled in with the
|
||||||
offset of the most recent '&' before the
|
offset of the most recent '&' before the
|
||||||
first failing name / value pair (or the
|
first failing name / value pair (or the
|
||||||
beginn ing of the string if the failure
|
beginning of the string if the failure
|
||||||
is in the first name / value pair) or
|
is in the first name / value pair) or
|
||||||
the terminating NULL if all was
|
the terminating NULL if all was
|
||||||
successful.
|
successful.
|
||||||
@ -1098,7 +1098,7 @@ Ip4FormRouteConfig (
|
|||||||
variable and its data.
|
variable and its data.
|
||||||
@retval EFI_DEVICE_ERROR The variable could not be saved.
|
@retval EFI_DEVICE_ERROR The variable could not be saved.
|
||||||
@retval EFI_UNSUPPORTED The specified Action is not supported by the
|
@retval EFI_UNSUPPORTED The specified Action is not supported by the
|
||||||
callback.Currently not implemented.
|
callback. Currently not implemented.
|
||||||
@retval EFI_INVALID_PARAMETERS Passing in wrong parameter.
|
@retval EFI_INVALID_PARAMETERS Passing in wrong parameter.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
|
@ -581,7 +581,7 @@ Ip4DriverBindingStart (
|
|||||||
Ip4Cfg2 = &IpSb->Ip4Config2Instance.Ip4Config2;
|
Ip4Cfg2 = &IpSb->Ip4Config2Instance.Ip4Config2;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install the Ip4ServiceBinding Protocol onto ControlerHandle
|
// Install the Ip4ServiceBinding Protocol onto ControllerHandle
|
||||||
//
|
//
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&ControllerHandle,
|
&ControllerHandle,
|
||||||
@ -829,7 +829,7 @@ ON_ERROR:
|
|||||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
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.
|
then the protocol is added to the existing UEFI handle.
|
||||||
|
|
||||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
@retval EFI_SUCCESS 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 available to create
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to create
|
||||||
the child
|
the child
|
||||||
@ -933,7 +933,7 @@ ON_ERROR:
|
|||||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@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 protocol was removed from ChildHandle.
|
@retval EFI_SUCCESS The protocol was removed from ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is NULL.
|
@retval EFI_INVALID_PARAMETER Child handle is NULL.
|
||||||
@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 ChildHandle
|
||||||
@ -1020,14 +1020,14 @@ Ip4ServiceBindingDestroyChild (
|
|||||||
// Uninstall the IP4 protocol first. Many thing happens during
|
// Uninstall the IP4 protocol first. Many thing happens during
|
||||||
// this:
|
// this:
|
||||||
// 1. The consumer of the IP4 protocol will be stopped if it
|
// 1. The consumer of the IP4 protocol will be stopped if it
|
||||||
// opens the protocol BY_DRIVER. For eaxmple, if MNP driver is
|
// opens the protocol BY_DRIVER. For example, if MNP driver is
|
||||||
// stopped, IP driver's stop function will be called, and uninstall
|
// stopped, IP driver's stop function will be called, and uninstall
|
||||||
// EFI_IP4_PROTOCOL will trigger the UDP's stop function. This
|
// EFI_IP4_PROTOCOL will trigger the UDP's stop function. This
|
||||||
// makes it possible to create the network stack bottom up, and
|
// makes it possible to create the network stack bottom up, and
|
||||||
// stop it top down.
|
// stop it top down.
|
||||||
// 2. the upper layer will recycle the received packet. The recycle
|
// 2. the upper layer will recycle the received packet. The recycle
|
||||||
// event's TPL is higher than this function. The recycle events
|
// event's TPL is higher than this function. The recycle events
|
||||||
// will be called back before preceeding. If any packets not recycled,
|
// will be called back before preceding. If any packets not recycled,
|
||||||
// that means there is a resource leak.
|
// that means there is a resource leak.
|
||||||
//
|
//
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
|
@ -47,7 +47,7 @@ Ip4DriverEntryPoint (
|
|||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Function prototypes for the Drivr Binding Protocol
|
// Function prototypes for the Driver Binding Protocol
|
||||||
//
|
//
|
||||||
/**
|
/**
|
||||||
Test to see if this driver supports ControllerHandle. This service
|
Test to see if this driver supports ControllerHandle. This service
|
||||||
@ -143,7 +143,7 @@ Ip4DriverBindingStop (
|
|||||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
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.
|
then the protocol is added to the existing UEFI handle.
|
||||||
|
|
||||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
@retval EFI_SUCCESS 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 available to create
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to create
|
||||||
the child
|
the child
|
||||||
@ -167,7 +167,7 @@ Ip4ServiceBindingCreateChild (
|
|||||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@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 protocol was removed from ChildHandle.
|
@retval EFI_SUCCESS The protocol was removed from ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is NULL.
|
@retval EFI_INVALID_PARAMETER Child handle is NULL.
|
||||||
@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 ChildHandle
|
||||||
|
@ -10,7 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
#define __EFI_IP4_ICMP_H__
|
#define __EFI_IP4_ICMP_H__
|
||||||
|
|
||||||
//
|
//
|
||||||
// ICMP type definations
|
// ICMP type definitions
|
||||||
//
|
//
|
||||||
#define ICMP_ECHO_REPLY 0
|
#define ICMP_ECHO_REPLY 0
|
||||||
#define ICMP_DEST_UNREACHABLE 3
|
#define ICMP_DEST_UNREACHABLE 3
|
||||||
@ -27,7 +27,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
#define ICMP_DEFAULT_CODE 0
|
#define ICMP_DEFAULT_CODE 0
|
||||||
|
|
||||||
//
|
//
|
||||||
// ICMP code definations for ICMP_DEST_UNREACHABLE
|
// ICMP code definitions for ICMP_DEST_UNREACHABLE
|
||||||
//
|
//
|
||||||
#define ICMP_NET_UNREACHABLE 0
|
#define ICMP_NET_UNREACHABLE 0
|
||||||
#define ICMP_HOST_UNREACHABLE 1
|
#define ICMP_HOST_UNREACHABLE 1
|
||||||
@ -44,13 +44,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
#define ICMP_HOST_UNREACHABLE_TOS 12
|
#define ICMP_HOST_UNREACHABLE_TOS 12
|
||||||
|
|
||||||
//
|
//
|
||||||
// ICMP code definations for ICMP_TIME_EXCEEDED
|
// ICMP code definitions for ICMP_TIME_EXCEEDED
|
||||||
//
|
//
|
||||||
#define ICMP_TIMEOUT_IN_TRANSIT 0
|
#define ICMP_TIMEOUT_IN_TRANSIT 0
|
||||||
#define ICMP_TIMEOUT_REASSEMBLE 1 // Host may generate
|
#define ICMP_TIMEOUT_REASSEMBLE 1 // Host may generate
|
||||||
|
|
||||||
//
|
//
|
||||||
// ICMP code definations for ICMP_TIME_EXCEEDED
|
// ICMP code definitions for ICMP_TIME_EXCEEDED
|
||||||
//
|
//
|
||||||
#define ICMP_NET_REDIRECT 0
|
#define ICMP_NET_REDIRECT 0
|
||||||
#define ICMP_HOST_REDIRECT 1
|
#define ICMP_HOST_REDIRECT 1
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implement IP4 pesudo interface.
|
Implement IP4 pseudo interface.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
@ -9,13 +9,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
#include "Ip4Impl.h"
|
#include "Ip4Impl.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Mac address with all zero, used to determine whethter the ARP
|
// Mac address with all zero, used to determine whether the ARP
|
||||||
// resolve succeeded. Failed ARP requests zero the MAC address buffer.
|
// resolve succeeded. Failed ARP requests zero the MAC address buffer.
|
||||||
//
|
//
|
||||||
EFI_MAC_ADDRESS mZeroMacAddress;
|
EFI_MAC_ADDRESS mZeroMacAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Callback funtion when frame transmission is finished. It will
|
Callback function 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[in] Context Context which is point to the token.
|
@param[in] Context Context which is point to the token.
|
||||||
@ -567,7 +567,7 @@ Ip4SetAddress (
|
|||||||
//
|
//
|
||||||
// Set the ip/netmask, then compute the subnet broadcast
|
// Set the ip/netmask, then compute the subnet broadcast
|
||||||
// and network broadcast for easy access. When computing
|
// and network broadcast for easy access. When computing
|
||||||
// nework broadcast, the subnet mask is most like longer
|
// network broadcast, the subnet mask is most like longer
|
||||||
// than the default netmask (not subneted) as defined in
|
// than the default netmask (not subneted) as defined in
|
||||||
// RFC793. If that isn't the case, we are aggregating the
|
// RFC793. If that isn't the case, we are aggregating the
|
||||||
// networks, use the subnet's mask instead.
|
// networks, use the subnet's mask instead.
|
||||||
@ -983,7 +983,7 @@ Ip4OnArpResolved (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Callback funtion when frame transmission is finished. It will
|
Callback function 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[in] Context Context which is point to the token.
|
@param[in] Context Context which is point to the token.
|
||||||
@ -1255,7 +1255,7 @@ Ip4OnFrameReceivedDpc (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Wrap the frame in a net buffer then deliever it to IP input.
|
// Wrap the frame in a net buffer then deliver it to IP input.
|
||||||
// IP will reassemble the packet, and deliver it to upper layer
|
// IP will reassemble the packet, and deliver it to upper layer
|
||||||
//
|
//
|
||||||
Netfrag.Len = MnpRxData->DataLength;
|
Netfrag.Len = MnpRxData->DataLength;
|
||||||
@ -1311,7 +1311,7 @@ Ip4OnFrameReceived (
|
|||||||
|
|
||||||
@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.
|
||||||
@retval EFI_SUCCESS The recieve request has been started.
|
@retval EFI_SUCCESS The receive request has been started.
|
||||||
@retval other Other error occurs.
|
@retval other Other error occurs.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Definition for IP4 pesudo interface structure.
|
Definition for IP4 pseudo interface structure.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
@ -325,7 +325,7 @@ Ip4CancelReceive (
|
|||||||
|
|
||||||
@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.
|
||||||
@retval EFI_SUCCESS The recieve request has been started.
|
@retval EFI_SUCCESS The receive request has been started.
|
||||||
@retval other Other error occurs.
|
@retval other Other error occurs.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -149,7 +149,7 @@ Ip4FindMac (
|
|||||||
|
|
||||||
@param[in] IpSb The IP4 service instance that requests the
|
@param[in] IpSb The IP4 service instance that requests the
|
||||||
transmission.
|
transmission.
|
||||||
@param[in] Dst The destinaton to send to.
|
@param[in] Dst The destination to send to.
|
||||||
@param[in] 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[in] Group The group address in the IGMP message head.
|
@param[in] Group The group address in the IGMP message head.
|
||||||
@ -273,7 +273,7 @@ Ip4JoinGroup (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// If the IP service already is a member in the group, just
|
// If the IP service already is a member in the group, just
|
||||||
// increase the refernce count and return.
|
// increase the reference count and return.
|
||||||
//
|
//
|
||||||
Group = Ip4FindGroup (IgmpCtrl, Address);
|
Group = Ip4FindGroup (IgmpCtrl, Address);
|
||||||
|
|
||||||
@ -587,7 +587,7 @@ Ip4CombineGroups (
|
|||||||
@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 number 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.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -170,7 +170,7 @@ Ip4CombineGroups (
|
|||||||
@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 number 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.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -198,7 +198,7 @@ EfiIp4Routes (
|
|||||||
@retval EFI_NOT_STARTED This instance has not been started.
|
@retval EFI_NOT_STARTED This instance has not been started.
|
||||||
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
|
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
|
||||||
RARP, etc.) is not finished yet.
|
RARP, etc.) is not finished yet.
|
||||||
@retval EFI_INVALID_PARAMETER One or more pameters are invalid.
|
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||||
@retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event
|
@retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event
|
||||||
was already in the transmit queue.
|
was already in the transmit queue.
|
||||||
@retval EFI_NOT_READY The completion token could not be queued because the transmit
|
@retval EFI_NOT_READY The completion token could not be queued because the transmit
|
||||||
@ -525,7 +525,7 @@ Ip4ServiceConfigMnp (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Intiialize the IP4_PROTOCOL structure to the unconfigured states.
|
Initialize the IP4_PROTOCOL structure to the unconfigured states.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance.
|
@param IpSb The IP4 service instance.
|
||||||
@param IpInstance The IP4 child instance.
|
@param IpInstance The IP4 child instance.
|
||||||
@ -985,7 +985,7 @@ ON_EXIT:
|
|||||||
|
|
||||||
@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.
|
||||||
@retval EFI_DEVICE_ERROR Failed to set the group configuraton.
|
@retval EFI_DEVICE_ERROR Failed to set the group configuration.
|
||||||
@retval EFI_SUCCESS Successfully updated the group setting.
|
@retval EFI_SUCCESS Successfully updated the group setting.
|
||||||
@retval EFI_NOT_FOUND Try to leave the group which it isn't a member.
|
@retval EFI_NOT_FOUND Try to leave the group which it isn't a member.
|
||||||
|
|
||||||
@ -1043,7 +1043,7 @@ Ip4Groups (
|
|||||||
//
|
//
|
||||||
// Leave the group. Leave all the groups if GroupAddress is NULL.
|
// Leave the group. Leave all the groups if GroupAddress is NULL.
|
||||||
// Must iterate from the end to the beginning because the GroupCount
|
// Must iterate from the end to the beginning because the GroupCount
|
||||||
// is decreamented each time an address is removed..
|
// is decremented each time an address is removed..
|
||||||
//
|
//
|
||||||
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
|
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
|
||||||
ASSERT (IpInstance->Groups != NULL);
|
ASSERT (IpInstance->Groups != NULL);
|
||||||
@ -1283,7 +1283,7 @@ ON_EXIT:
|
|||||||
@param[in] 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[in] Item Current item to check against.
|
@param[in] Item Current item to check against.
|
||||||
@param[in] Context The Token to check againist.
|
@param[in] Context The Token to check against.
|
||||||
|
|
||||||
@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
|
||||||
@ -1557,7 +1557,7 @@ Ip4OnPacketSent (
|
|||||||
@retval EFI_NOT_STARTED This instance has not been started.
|
@retval EFI_NOT_STARTED This instance has not been started.
|
||||||
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
|
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
|
||||||
RARP, etc.) is not finished yet.
|
RARP, etc.) is not finished yet.
|
||||||
@retval EFI_INVALID_PARAMETER One or more pameters are invalid.
|
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||||
@retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event
|
@retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event
|
||||||
was already in the transmit queue.
|
was already in the transmit queue.
|
||||||
@retval EFI_NOT_READY The completion token could not be queued because the transmit
|
@retval EFI_NOT_READY The completion token could not be queued because the transmit
|
||||||
@ -1619,7 +1619,7 @@ EfiIp4Transmit (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// make sure that token is properly formated
|
// make sure that token is properly formatted
|
||||||
//
|
//
|
||||||
Status = Ip4TxTokenValid (Token, IpIf, Config->RawData);
|
Status = Ip4TxTokenValid (Token, IpIf, Config->RawData);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Ip4 internal functions and type defintions.
|
Ip4 internal functions and type definitions.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
@ -134,7 +134,7 @@ struct _IP4_PROTOCOL {
|
|||||||
LIST_ENTRY Link; // Link to all the IP protocol from the service
|
LIST_ENTRY Link; // Link to all the IP protocol from the service
|
||||||
|
|
||||||
//
|
//
|
||||||
// User's transmit/receive tokens, and received/deliverd packets
|
// User's transmit/receive tokens, and received/delivered packets
|
||||||
//
|
//
|
||||||
NET_MAP RxTokens;
|
NET_MAP RxTokens;
|
||||||
NET_MAP TxTokens; // map between (User's Token, IP4_TXTOKE_WRAP)
|
NET_MAP TxTokens; // map between (User's Token, IP4_TXTOKE_WRAP)
|
||||||
@ -260,7 +260,7 @@ Ip4ServiceConfigMnp (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Intiialize the IP4_PROTOCOL structure to the unconfigured states.
|
Initialize the IP4_PROTOCOL structure to the unconfigured states.
|
||||||
|
|
||||||
@param IpSb The IP4 service instance.
|
@param IpSb The IP4 service instance.
|
||||||
@param IpInstance The IP4 child instance.
|
@param IpInstance The IP4 child instance.
|
||||||
@ -315,7 +315,7 @@ Ip4Cancel (
|
|||||||
|
|
||||||
@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.
|
||||||
@retval EFI_DEVICE_ERROR Failed to set the group configuraton
|
@retval EFI_DEVICE_ERROR Failed to set the group configuration
|
||||||
@retval EFI_SUCCESS Successfully updated the group setting.
|
@retval EFI_SUCCESS Successfully updated the group setting.
|
||||||
@retval EFI_NOT_FOUND Try to leave the group which it isn't a member.
|
@retval EFI_NOT_FOUND Try to leave the group which it isn't a member.
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ Ip4Reassemble (
|
|||||||
RemoveEntryList (&Assemble->Link);
|
RemoveEntryList (&Assemble->Link);
|
||||||
|
|
||||||
//
|
//
|
||||||
// If the packet is properly formated, the last fragment's End
|
// If the packet is properly formatted, the last fragment's End
|
||||||
// equals to the packet's total length. Otherwise, the packet
|
// equals to the packet's total length. Otherwise, the packet
|
||||||
// is a fake, drop it now.
|
// is a fake, drop it now.
|
||||||
//
|
//
|
||||||
@ -468,7 +468,7 @@ Ip4IpSecFree (
|
|||||||
actions: bypass the packet, discard the packet, or protect the packet.
|
actions: bypass the packet, discard the packet, or protect the packet.
|
||||||
|
|
||||||
@param[in] IpSb The IP4 service instance.
|
@param[in] IpSb The IP4 service instance.
|
||||||
@param[in, out] Head The The caller supplied IP4 header.
|
@param[in, out] Head The caller supplied IP4 header.
|
||||||
@param[in, out] Netbuf The IP4 packet to be processed by IPsec.
|
@param[in, out] Netbuf The IP4 packet to be processed by IPsec.
|
||||||
@param[in, out] Options The caller supplied options.
|
@param[in, out] Options The caller supplied options.
|
||||||
@param[in, out] OptionsLen The length of the option.
|
@param[in, out] OptionsLen The length of the option.
|
||||||
@ -480,7 +480,7 @@ Ip4IpSecFree (
|
|||||||
@retval EFI_SUCCESS The packet was bypassed and all buffers remain the same.
|
@retval EFI_SUCCESS The packet was bypassed and all buffers remain the same.
|
||||||
@retval EFI_SUCCESS The packet was protected.
|
@retval EFI_SUCCESS The packet was protected.
|
||||||
@retval EFI_ACCESS_DENIED The packet was discarded.
|
@retval EFI_ACCESS_DENIED The packet was discarded.
|
||||||
@retval EFI_OUT_OF_RESOURCES There is no suffcient resource to complete the operation.
|
@retval EFI_OUT_OF_RESOURCES There is no sufficient resource to complete the operation.
|
||||||
@retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the
|
@retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the
|
||||||
number of input data blocks when build a fragment table.
|
number of input data blocks when build a fragment table.
|
||||||
|
|
||||||
@ -625,7 +625,7 @@ Ip4IpSecProcessPacket (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Free orginal Netbuf.
|
// Free original Netbuf.
|
||||||
//
|
//
|
||||||
NetIpSecNetbufFree (*Netbuf);
|
NetIpSecNetbufFree (*Netbuf);
|
||||||
*Netbuf = TxWrap->Packet;
|
*Netbuf = TxWrap->Packet;
|
||||||
@ -689,8 +689,8 @@ ON_EXIT:
|
|||||||
@param[in] 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.
|
||||||
|
|
||||||
@retval EFI_SEUCCESS The recieved packet is in well form.
|
@retval EFI_SUCCESS The received packet is in well form.
|
||||||
@retval EFI_INVAILD_PARAMETER The recieved packet is malformed.
|
@retval EFI_INVALID_PARAMETER The received packet is malformed.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -891,8 +891,8 @@ Ip4AccpetFrame (
|
|||||||
ZeroMem (&ZeroHead, sizeof (IP4_HEAD));
|
ZeroMem (&ZeroHead, sizeof (IP4_HEAD));
|
||||||
if (0 == CompareMem (Head, &ZeroHead, sizeof (IP4_HEAD))) {
|
if (0 == CompareMem (Head, &ZeroHead, sizeof (IP4_HEAD))) {
|
||||||
// Packet may have been changed. Head, HeadLen, TotalLen, and
|
// Packet may have been changed. Head, HeadLen, TotalLen, and
|
||||||
// info must be reloaded bofore use. The ownership of the packet
|
// info must be reloaded before use. The ownership of the packet
|
||||||
// is transfered to the packet process logic.
|
// is transferred to the packet process logic.
|
||||||
//
|
//
|
||||||
Head = (IP4_HEAD *) NetbufGetByte (Packet, 0, NULL);
|
Head = (IP4_HEAD *) NetbufGetByte (Packet, 0, NULL);
|
||||||
ASSERT (Head != NULL);
|
ASSERT (Head != NULL);
|
||||||
@ -973,7 +973,7 @@ Ip4InstanceFrameAcceptable (
|
|||||||
Config = &IpInstance->ConfigData;
|
Config = &IpInstance->ConfigData;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Dirty trick for the Tiano UEFI network stack implmentation. If
|
// Dirty trick for the Tiano UEFI network stack implementation. If
|
||||||
// ReceiveTimeout == -1, the receive of the packet for this instance
|
// ReceiveTimeout == -1, the receive of the packet for this instance
|
||||||
// is disabled. The UEFI spec don't have such capability. We add
|
// is disabled. The UEFI spec don't have such capability. We add
|
||||||
// this to improve the performance because IP will make a copy of
|
// this to improve the performance because IP will make a copy of
|
||||||
@ -1086,7 +1086,7 @@ Ip4InstanceEnquePacket (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Enque a shared copy of the packet.
|
// Enqueue a shared copy of the packet.
|
||||||
//
|
//
|
||||||
Clone = NetbufClone (Packet);
|
Clone = NetbufClone (Packet);
|
||||||
|
|
||||||
@ -1365,7 +1365,7 @@ Ip4InterfaceEnquePacket (
|
|||||||
//
|
//
|
||||||
// First, check that the packet is acceptable to this interface
|
// First, check that the packet is acceptable to this interface
|
||||||
// and find the local cast type for the interface. A packet sent
|
// and find the local cast type for the interface. A packet sent
|
||||||
// to say 192.168.1.1 should NOT be delliever to 10.0.0.1 unless
|
// to say 192.168.1.1 should NOT be deliver to 10.0.0.1 unless
|
||||||
// promiscuous receiving.
|
// promiscuous receiving.
|
||||||
//
|
//
|
||||||
LocalType = 0;
|
LocalType = 0;
|
||||||
@ -1381,7 +1381,7 @@ Ip4InterfaceEnquePacket (
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// Check the destination againist local IP. If the station
|
// Check the destination against local IP. If the station
|
||||||
// address is 0.0.0.0, it means receiving all the IP destined
|
// address is 0.0.0.0, it means receiving all the IP destined
|
||||||
// to local non-zero IP. Otherwise, it is necessary to compare
|
// to local non-zero IP. Otherwise, it is necessary to compare
|
||||||
// the destination to the interface's IP address.
|
// the destination to the interface's IP address.
|
||||||
@ -1463,7 +1463,7 @@ Ip4InterfaceDeliverPacket (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Demultiple the packet. the packet delivery is processed in two
|
Demultiple the packet. the packet delivery is processed in two
|
||||||
passes. The first pass will enque a shared copy of the packet
|
passes. The first pass will enqueue a shared copy of the packet
|
||||||
to each IP4 child that accepts the packet. The second pass will
|
to each IP4 child that accepts the packet. The second pass will
|
||||||
deliver a non-shared copy of the packet to each IP4 child that
|
deliver a non-shared copy of the packet to each IP4 child that
|
||||||
has pending receive requests. Data is copied if more than one
|
has pending receive requests. Data is copied if more than one
|
||||||
@ -1495,7 +1495,7 @@ Ip4Demultiplex (
|
|||||||
INTN Enqueued;
|
INTN Enqueued;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Two pass delivery: first, enque a shared copy of the packet
|
// Two pass delivery: first, enqueue a shared copy of the packet
|
||||||
// to each instance that accept the packet.
|
// to each instance that accept the packet.
|
||||||
//
|
//
|
||||||
Enqueued = 0;
|
Enqueued = 0;
|
||||||
|
@ -128,7 +128,7 @@ Ip4AccpetFrame (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Demultiple the packet. the packet delivery is processed in two
|
Demultiple the packet. the packet delivery is processed in two
|
||||||
passes. The first pass will enque a shared copy of the packet
|
passes. The first pass will enqueue a shared copy of the packet
|
||||||
to each IP4 child that accepts the packet. The second pass will
|
to each IP4 child that accepts the packet. The second pass will
|
||||||
deliver a non-shared copy of the packet to each IP4 child that
|
deliver a non-shared copy of the packet to each IP4 child that
|
||||||
has pending receive requests. Data is copied if more than one
|
has pending receive requests. Data is copied if more than one
|
||||||
@ -215,7 +215,7 @@ Ip4PacketTimerTicking (
|
|||||||
actions: bypass the packet, discard the packet, or protect the packet.
|
actions: bypass the packet, discard the packet, or protect the packet.
|
||||||
|
|
||||||
@param[in] IpSb The IP4 service instance.
|
@param[in] IpSb The IP4 service instance.
|
||||||
@param[in, out] Head The The caller supplied IP4 header.
|
@param[in, out] Head The caller supplied IP4 header.
|
||||||
@param[in, out] Netbuf The IP4 packet to be processed by IPsec.
|
@param[in, out] Netbuf The IP4 packet to be processed by IPsec.
|
||||||
@param[in, out] Options The caller supplied options.
|
@param[in, out] Options The caller supplied options.
|
||||||
@param[in, out] OptionsLen The length of the option.
|
@param[in, out] OptionsLen The length of the option.
|
||||||
@ -227,7 +227,7 @@ Ip4PacketTimerTicking (
|
|||||||
@retval EFI_SUCCESS The packet was bypassed and all buffers remain the same.
|
@retval EFI_SUCCESS The packet was bypassed and all buffers remain the same.
|
||||||
@retval EFI_SUCCESS The packet was protected.
|
@retval EFI_SUCCESS The packet was protected.
|
||||||
@retval EFI_ACCESS_DENIED The packet was discarded.
|
@retval EFI_ACCESS_DENIED The packet was discarded.
|
||||||
@retval EFI_OUT_OF_RESOURCES There is no suffcient resource to complete the operation.
|
@retval EFI_OUT_OF_RESOURCES There is no sufficient resource to complete the operation.
|
||||||
@retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the
|
@retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the
|
||||||
number of input data blocks when build a fragment table.
|
number of input data blocks when build a fragment table.
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ Ip4CopyOption (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Head length is in the unit of 4 bytes. Now, Len is the
|
// Head length is in the unit of 4 bytes. Now, Len is the
|
||||||
// acutal option length to appear in the IP header.
|
// actual option length to appear in the IP header.
|
||||||
//
|
//
|
||||||
Len = ((Next + 3) &~0x03);
|
Len = ((Next + 3) &~0x03);
|
||||||
|
|
||||||
|
@ -21,10 +21,10 @@ UINT16 mIp4Id;
|
|||||||
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 original 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 enough room in the head space of
|
||||||
Packet.
|
Packet.
|
||||||
@retval EFI_SUCCESS The IP4 header is successfully added to the packet.
|
@retval EFI_SUCCESS The IP4 header is successfully added to the packet.
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ Ip4Output (
|
|||||||
|
|
||||||
} else if (GateWay == IP4_ALLZERO_ADDRESS) {
|
} else if (GateWay == IP4_ALLZERO_ADDRESS) {
|
||||||
//
|
//
|
||||||
// Route the packet unless overrided, that is, GateWay isn't zero.
|
// Route the packet unless overridden, that is, GateWay isn't zero.
|
||||||
//
|
//
|
||||||
if (IpInstance == NULL) {
|
if (IpInstance == NULL) {
|
||||||
CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src, IpIf->SubnetMask, TRUE);
|
CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src, IpIf->SubnetMask, TRUE);
|
||||||
@ -331,7 +331,7 @@ Ip4Output (
|
|||||||
|
|
||||||
if (Packet->TotalSize + HeadLen > Mtu) {
|
if (Packet->TotalSize + HeadLen > Mtu) {
|
||||||
//
|
//
|
||||||
// Fragmentation is diabled for RawData mode.
|
// Fragmentation is disabled for RawData mode.
|
||||||
//
|
//
|
||||||
if (RawData) {
|
if (RawData) {
|
||||||
return EFI_BAD_BUFFER_SIZE;
|
return EFI_BAD_BUFFER_SIZE;
|
||||||
@ -399,7 +399,7 @@ Ip4Output (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Send the first fragment, it is either the orginal packet, or the
|
// Send the first fragment, it is either the original packet, or the
|
||||||
// first fragment of a fragmented packet. It seems that there is a subtle
|
// first fragment of a fragmented packet. It seems that there is a subtle
|
||||||
// bug here: what if the caller free the packet in Callback and IpIf (or
|
// bug here: what if the caller free the packet in Callback and IpIf (or
|
||||||
// MNP child used by that interface) still holds the fragments and try
|
// MNP child used by that interface) still holds the fragments and try
|
||||||
@ -420,7 +420,7 @@ Ip4Output (
|
|||||||
// is bound with the Packet. It will only be freed when all
|
// is bound with the Packet. It will only be freed when all
|
||||||
// the references to Packet have been released. Upon then, the
|
// the references to Packet have been released. Upon then, the
|
||||||
// Packet's OnFree callback will release the IP4_TXTOKEN_WRAP,
|
// Packet's OnFree callback will release the IP4_TXTOKEN_WRAP,
|
||||||
// and singal the user's recycle event. So, also no problem for
|
// and signal the user's recycle event. So, also no problem for
|
||||||
// upper layer's packets.
|
// upper layer's packets.
|
||||||
//
|
//
|
||||||
Ip4PrependHead (Packet, Head, Option, OptLen);
|
Ip4PrependHead (Packet, Head, Option, OptLen);
|
||||||
|
@ -99,10 +99,10 @@ Ip4CancelPacket (
|
|||||||
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 original 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 enough room in the head space of
|
||||||
Packet.
|
Packet.
|
||||||
@retval EFI_SUCCESS The IP4 header is successfully added to the packet.
|
@retval EFI_SUCCESS The IP4 header is successfully added to the packet.
|
||||||
|
|
||||||
|
@ -9,14 +9,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Allocate a route entry then initialize it with the Dest/Netmaks
|
Allocate a route entry then initialize it with the Dest/Netmask
|
||||||
and Gateway.
|
and Gateway.
|
||||||
|
|
||||||
@param[in] Dest The destination network
|
@param[in] Dest The destination network
|
||||||
@param[in] Netmask The destination network mask
|
@param[in] Netmask The destination network mask
|
||||||
@param[in] 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 memory, otherwise the newly created
|
||||||
route entry.
|
route entry.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -129,7 +129,7 @@ Ip4FreeRouteCacheEntry (
|
|||||||
/**
|
/**
|
||||||
Initialize an empty route cache table.
|
Initialize an empty route cache table.
|
||||||
|
|
||||||
@param[in, out] RtCache The rotue cache table to initialize.
|
@param[in, out] RtCache The route cache table to initialize.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
@ -359,7 +359,7 @@ Ip4AddRoute (
|
|||||||
|
|
||||||
@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
|
||||||
properity.
|
property.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -396,7 +396,7 @@ Ip4DelRoute (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find a route cache with the dst and src. This is used by ICMP
|
Find a route cache with the dst and src. This is used by ICMP
|
||||||
redirect messasge process. All kinds of redirect is treated as
|
redirect message process. All kinds of redirect is treated as
|
||||||
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.
|
||||||
|
|
||||||
@ -444,7 +444,7 @@ Ip4FindRouteCache (
|
|||||||
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[in] RtTable The route table to search from
|
@param[in] RtTable The route table to search from
|
||||||
@param[in] Dst The destionation address to search
|
@param[in] Dst The destination 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
|
||||||
most specific route to the Dst.
|
most specific route to the Dst.
|
||||||
@ -605,7 +605,7 @@ Ip4Route (
|
|||||||
@param[in] 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 route table.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
EFI IP4 route table and route cache table defintions.
|
EFI IP4 route table and route cache table definitions.
|
||||||
|
|
||||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
@ -56,8 +56,8 @@ typedef struct {
|
|||||||
///
|
///
|
||||||
/// The route cache table is organized as a hash table. Each
|
/// The route cache table is organized as a hash table. Each
|
||||||
/// IP4 route table has a embedded route cache. For now the
|
/// IP4 route table has a embedded route cache. For now the
|
||||||
/// route cache and route table are binded togehter. But keep
|
/// route cache and route table are binded together. But keep
|
||||||
/// the route cache a seperated structure in case we want to
|
/// the route cache a separated structure in case we want to
|
||||||
/// detach them later.
|
/// detach them later.
|
||||||
///
|
///
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -138,7 +138,7 @@ Ip4AddRoute (
|
|||||||
|
|
||||||
@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
|
||||||
properity.
|
property.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -151,7 +151,7 @@ Ip4DelRoute (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Find a route cache with the dst and src. This is used by ICMP
|
Find a route cache with the dst and src. This is used by ICMP
|
||||||
redirect messasge process. All kinds of redirect is treated as
|
redirect message process. All kinds of redirect is treated as
|
||||||
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.
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ Ip4Route (
|
|||||||
@param[in] 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 route table.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user