Reviewed-by: Maciej Rabeda <maciej.rab...@intel.com> Thanks! Maciej
-----Original Message----- From: Philippe Mathieu-Daude <phi...@redhat.com> Sent: Tuesday, December 3, 2019 17:15 To: devel@edk2.groups.io Cc: Antoine Coeur <co...@gmx.fr>; Wu, Jiaxin <jiaxin...@intel.com>; Fu, Siyuan <siyuan...@intel.com>; Rabeda, Maciej <maciej.rab...@intel.com>; Philippe Mathieu-Daude <phi...@redhat.com> Subject: [PATCH 41/79] NetworkPkg/Ip4Dxe: Fix various typos From: Antoine Coeur <co...@gmx.fr> Fix various typos in comments and documentation. Cc: Jiaxin Wu <jiaxin...@intel.com> Cc: Siyuan Fu <siyuan...@intel.com> Cc: Maciej Rabeda <maciej.rab...@intel.com> Reviewed-by: Philippe Mathieu-Daude <phi...@redhat.com> Signed-off-by: Philippe Mathieu-Daude <phi...@redhat.com> --- NetworkPkg/Ip4Dxe/Ip4Common.h | 14 +++++----- NetworkPkg/Ip4Dxe/Ip4Config2Impl.h | 2 +- NetworkPkg/Ip4Dxe/Ip4Driver.h | 6 ++--- NetworkPkg/Ip4Dxe/Ip4Icmp.h | 8 +++--- NetworkPkg/Ip4Dxe/Ip4If.h | 4 +-- NetworkPkg/Ip4Dxe/Ip4Igmp.h | 2 +- NetworkPkg/Ip4Dxe/Ip4Impl.h | 8 +++--- NetworkPkg/Ip4Dxe/Ip4Input.h | 6 ++--- NetworkPkg/Ip4Dxe/Ip4Output.h | 4 +-- NetworkPkg/Ip4Dxe/Ip4Route.h | 12 ++++----- NetworkPkg/Ip4Dxe/Ip4Common.c | 10 +++---- NetworkPkg/Ip4Dxe/Ip4Config2Impl.c | 10 +++---- NetworkPkg/Ip4Dxe/Ip4Config2Nv.c | 4 +-- NetworkPkg/Ip4Dxe/Ip4Driver.c | 10 +++---- NetworkPkg/Ip4Dxe/Ip4If.c | 14 +++++----- NetworkPkg/Ip4Dxe/Ip4Igmp.c | 6 ++--- NetworkPkg/Ip4Dxe/Ip4Impl.c | 14 +++++----- NetworkPkg/Ip4Dxe/Ip4Input.c | 28 ++++++++++---------- NetworkPkg/Ip4Dxe/Ip4Option.c | 2 +- NetworkPkg/Ip4Dxe/Ip4Output.c | 12 ++++----- NetworkPkg/Ip4Dxe/Ip4Route.c | 14 +++++----- 21 files changed, 95 insertions(+), 95 deletions(-) diff --git a/NetworkPkg/Ip4Dxe/Ip4Common.h b/NetworkPkg/Ip4Dxe/Ip4Common.h index 8fbfd5487219..a84602d45ac0 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Common.h +++ b/NetworkPkg/Ip4Dxe/Ip4Common.h @@ -23,7 +23,7 @@ typedef struct _IP4_SERVICE IP4_SERVICE; #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. // #define IP4_PROMISCUOUS 1 @@ -63,13 +63,13 @@ typedef struct _IP4_SERVICE IP4_SERVICE; #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. /// #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. @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. @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 @retval IP4_NET_BROADCAST The IpAddr is a network broadcast to the interface @retval 0 Otherwise. @@ -146,7 +146,7 @@ Ip4FindNet ( Find an interface of the service with the same Ip/Netmask pair. @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) @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 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] Netmask The netmaks of the IP. + @param[in] Netmask The netmask of the IP. @retval TRUE The Ip/Netmask pair is valid. @retval FALSE The Ip/Netmask pair is invalid. diff --git a/NetworkPkg/Ip4Dxe/Ip4Config2Impl.h b/NetworkPkg/Ip4Dxe/Ip4Config2Impl.h index 1716dde399ab..0e4639e77c78 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Config2Impl.h +++ b/NetworkPkg/Ip4Dxe/Ip4Config2Impl.h @@ -205,7 +205,7 @@ typedef struct { /** Read the configuration data from variable storage according to the VarName and 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. @param[in] VarName The pointer to the variable name diff --git a/NetworkPkg/Ip4Dxe/Ip4Driver.h b/NetworkPkg/Ip4Dxe/Ip4Driver.h index be374715703c..d94bdf3bdec1 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Driver.h +++ b/NetworkPkg/Ip4Dxe/Ip4Driver.h @@ -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 @@ -143,7 +143,7 @@ Ip4DriverBindingStop ( 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_SUCCESS The protocol was added to ChildHandle. @retval EFI_INVALID_PARAMETER ChildHandle is NULL. @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create the child @@ -167,7 +167,7 @@ Ip4ServiceBindingCreateChild ( @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Handle of the child to destroy - @retval EFI_SUCCES The protocol was removed from ChildHandle. + @retval EFI_SUCCESS The protocol was removed from ChildHandle. @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed. @retval EFI_INVALID_PARAMETER Child handle is NULL. @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle diff --git a/NetworkPkg/Ip4Dxe/Ip4Icmp.h b/NetworkPkg/Ip4Dxe/Ip4Icmp.h index a52200176f5a..a23952dbdded 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Icmp.h +++ b/NetworkPkg/Ip4Dxe/Ip4Icmp.h @@ -10,7 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define __EFI_IP4_ICMP_H__ // - // ICMP type definations + // ICMP type definitions // #define ICMP_ECHO_REPLY 0 #define ICMP_DEST_UNREACHABLE 3 @@ -27,7 +27,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #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_HOST_UNREACHABLE 1 @@ -44,13 +44,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #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_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_HOST_REDIRECT 1 diff --git a/NetworkPkg/Ip4Dxe/Ip4If.h b/NetworkPkg/Ip4Dxe/Ip4If.h index d73bb5285f97..ec951d30434e 100644 --- a/NetworkPkg/Ip4Dxe/Ip4If.h +++ b/NetworkPkg/Ip4Dxe/Ip4If.h @@ -1,5 +1,5 @@ /** @file - Definition for IP4 pesudo interface structure. + Definition for IP4 pseudo interface structure. Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR> 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_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. **/ diff --git a/NetworkPkg/Ip4Dxe/Ip4Igmp.h b/NetworkPkg/Ip4Dxe/Ip4Igmp.h index 49c13ba3a7a0..56631bd4afb3 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Igmp.h +++ b/NetworkPkg/Ip4Dxe/Ip4Igmp.h @@ -170,7 +170,7 @@ Ip4CombineGroups ( @param Count The number of group addresses in the Groups. @param Addr The IP4 multicast address to remove. - @return The nubmer of group addresses in the Groups after remove. + @return The number of group addresses in the Groups after remove. It is Count if the Addr isn't in the Groups. **/ diff --git a/NetworkPkg/Ip4Dxe/Ip4Impl.h b/NetworkPkg/Ip4Dxe/Ip4Impl.h index a322a85981a5..e8ff33d38adc 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Impl.h +++ b/NetworkPkg/Ip4Dxe/Ip4Impl.h @@ -1,5 +1,5 @@ /** @file - Ip4 internal functions and type defintions. + Ip4 internal functions and type definitions. Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<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 // - // User's transmit/receive tokens, and received/deliverd packets + // User's transmit/receive tokens, and received/delivered packets // NET_MAP RxTokens; 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 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_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_NOT_FOUND Try to leave the group which it isn't a member. diff --git a/NetworkPkg/Ip4Dxe/Ip4Input.h b/NetworkPkg/Ip4Dxe/Ip4Input.h index f4d45d1613d0..9bd86e15c9cf 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Input.h +++ b/NetworkPkg/Ip4Dxe/Ip4Input.h @@ -128,7 +128,7 @@ Ip4AccpetFrame ( /** 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 deliver a non-shared copy of the packet to each IP4 child that 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. @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] Options The caller supplied options. @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 protected. @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 number of input data blocks when build a fragment table. diff --git a/NetworkPkg/Ip4Dxe/Ip4Output.h b/NetworkPkg/Ip4Dxe/Ip4Output.h index ae54f8b485ca..bb6fa641b090 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Output.h +++ b/NetworkPkg/Ip4Dxe/Ip4Output.h @@ -99,10 +99,10 @@ Ip4CancelPacket ( Fragment, Ttl, Protocol, Src and Dst. All the fields are in host byte order. This function will fill in the Ver, HeadLen, and checksum. - @param Option The orginal IP4 option to copy from + @param Option The original IP4 option to copy from @param OptLen The length of the IP4 option - @retval EFI_BAD_BUFFER_SIZE There is no enought room in the head space of + @retval EFI_BAD_BUFFER_SIZE There is no enough room in the head + space of Packet. @retval EFI_SUCCESS The IP4 header is successfully added to the packet. diff --git a/NetworkPkg/Ip4Dxe/Ip4Route.h b/NetworkPkg/Ip4Dxe/Ip4Route.h index 4b0b5282ab5a..b4d91667e959 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Route.h +++ b/NetworkPkg/Ip4Dxe/Ip4Route.h @@ -1,5 +1,5 @@ /** @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> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -56,8 +56,8 @@ typedef struct { /// /// The route cache table is organized as a hash table. Each /// IP4 route table has a embedded route cache. For now the -/// route cache and route table are binded togehter. But keep -/// the route cache a seperated structure in case we want to +/// route cache and route table are binded together. But keep /// the +route cache a separated structure in case we want to /// detach them later. /// typedef struct { @@ -138,7 +138,7 @@ Ip4AddRoute ( @retval EFI_SUCCESS The route entry is successfully removed @retval EFI_NOT_FOUND There is no route entry in the table with that - properity. + property. **/ EFI_STATUS @@ -151,7 +151,7 @@ Ip4DelRoute ( /** 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 are modified according to the ICMP redirect message. @@ -215,7 +215,7 @@ Ip4Route ( @param[in] IpInstance The IP4 child that requests the route table. @retval EFI_SUCCESS The route table is successfully build - @retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the rotue table. + @retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the route table. **/ EFI_STATUS diff --git a/NetworkPkg/Ip4Dxe/Ip4Common.c b/NetworkPkg/Ip4Dxe/Ip4Common.c index c756a2dbf7e4..f4269b8ea495 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Common.c +++ b/NetworkPkg/Ip4Dxe/Ip4Common.c @@ -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. @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. @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 @retval IP4_NET_BROADCAST The IpAddr is a network broadcast to the interface @retval 0 Otherwise. @@ -182,7 +182,7 @@ Ip4FindNet ( Find an interface of the service with the same Ip/Netmask pair. @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) @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 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] Netmask The netmaks of the IP. + @param[in] Netmask The netmask of the IP. @retval TRUE The Ip/Netmask pair is valid. @retval FALSE The Ip/Netmask pair is invalid. diff --git a/NetworkPkg/Ip4Dxe/Ip4Config2Impl.c b/NetworkPkg/Ip4Dxe/Ip4Config2Impl.c index 9dca48ddd645..9cfad5916d10 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Config2Impl.c +++ b/NetworkPkg/Ip4Dxe/Ip4Config2Impl.c @@ -174,7 +174,7 @@ Ip4Config2SignalEvent ( /** Read the configuration data from variable storage according to the VarName and 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. @param[in] VarName The pointer to the variable name @@ -377,7 +377,7 @@ Ip4Config2WriteConfigData ( @param[out] Table The built IP4 route table. @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 @@ -912,7 +912,7 @@ Ip4StartAutoConfig ( // // 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) { return EFI_SUCCESS; @@ -1234,7 +1234,7 @@ Ip4Config2SetPolicy ( under the current policy. @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_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. @retval EFI_ABORTED The manual addresses to be set equal current configuration. @@ -1721,7 +1721,7 @@ EfiIp4Config2SetData ( } } else { // - // Another asynchornous process is on the way. + // Another asynchronous process is on the way. // Status = EFI_ACCESS_DENIED; } diff --git a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c b/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c index a4d2996a60e6..63014ca31907 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c +++ b/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c @@ -988,7 +988,7 @@ Failure: @param[out] Progress A pointer to a string filled in with the offset of the most recent '&' before 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 the terminating NULL if all was successful. @@ -1098,7 +1098,7 @@ Ip4FormRouteConfig ( variable and its data. @retval EFI_DEVICE_ERROR The variable could not be saved. @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 Others Other errors as indicated. diff --git a/NetworkPkg/Ip4Dxe/Ip4Driver.c b/NetworkPkg/Ip4Dxe/Ip4Driver.c index 62be8b681a18..7fed659ca101 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Driver.c +++ b/NetworkPkg/Ip4Dxe/Ip4Driver.c @@ -581,7 +581,7 @@ Ip4DriverBindingStart ( Ip4Cfg2 = &IpSb->Ip4Config2Instance.Ip4Config2; // - // Install the Ip4ServiceBinding Protocol onto ControlerHandle + // Install the Ip4ServiceBinding Protocol onto ControllerHandle // Status = gBS->InstallMultipleProtocolInterfaces ( &ControllerHandle, @@ -829,7 +829,7 @@ ON_ERROR: 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_SUCCESS The protocol was added to ChildHandle. @retval EFI_INVALID_PARAMETER ChildHandle is NULL. @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create the child @@ -933,7 +933,7 @@ ON_ERROR: @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Handle of the child to destroy - @retval EFI_SUCCES The protocol was removed from ChildHandle. + @retval EFI_SUCCESS The protocol was removed from ChildHandle. @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed. @retval EFI_INVALID_PARAMETER Child handle is NULL. @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 // this: // 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 // EFI_IP4_PROTOCOL will trigger the UDP's stop function. This // makes it possible to create the network stack bottom up, and // stop it top down. // 2. the upper layer will recycle the received packet. The recycle // 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. // gBS->RestoreTPL (OldTpl); diff --git a/NetworkPkg/Ip4Dxe/Ip4If.c b/NetworkPkg/Ip4Dxe/Ip4If.c index 53a333037f94..db459e97c8a8 100644 --- a/NetworkPkg/Ip4Dxe/Ip4If.c +++ b/NetworkPkg/Ip4Dxe/Ip4If.c @@ -1,5 +1,5 @@ /** @file - Implement IP4 pesudo interface. + Implement IP4 pseudo interface. Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -9,13 +9,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #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. // 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. @param[in] Context Context which is point to the token. @@ -563,7 +563,7 @@ Ip4SetAddress ( // // Set the ip/netmask, then compute the subnet broadcast // 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 // RFC793. If that isn't the case, we are aggregating the // networks, use the subnet's mask instead. @@ -979,7 +979,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. @param[in] Context Context which is point to the token. @@ -1251,7 +1251,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 // Netfrag.Len = MnpRxData->DataLength; @@ -1307,7 +1307,7 @@ Ip4OnFrameReceived ( @retval EFI_ALREADY_STARTED There is already a pending receive request. @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. **/ diff --git a/NetworkPkg/Ip4Dxe/Ip4Igmp.c b/NetworkPkg/Ip4Dxe/Ip4Igmp.c index e69b2fe7fc08..f69ba762fe4d 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Igmp.c +++ b/NetworkPkg/Ip4Dxe/Ip4Igmp.c @@ -149,7 +149,7 @@ Ip4FindMac ( @param[in] IpSb The IP4 service instance that requests the 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 report. @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 - // increase the refernce count and return. + // increase the reference count and return. // Group = Ip4FindGroup (IgmpCtrl, Address); @@ -587,7 +587,7 @@ Ip4CombineGroups ( @param Count The number of group addresses in the Groups. @param Addr The IP4 multicast address to remove. - @return The nubmer of group addresses in the Groups after remove. + @return The number of group addresses in the Groups after remove. It is Count if the Addr isn't in the Groups. **/ diff --git a/NetworkPkg/Ip4Dxe/Ip4Impl.c b/NetworkPkg/Ip4Dxe/Ip4Impl.c index ec6f0370772b..5935d405dd59 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Impl.c +++ b/NetworkPkg/Ip4Dxe/Ip4Impl.c @@ -198,7 +198,7 @@ EfiIp4Routes ( @retval EFI_NOT_STARTED This instance has not been started. @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, 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 was already in the transmit queue. @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 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_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_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. // 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--) { ASSERT (IpInstance->Groups != NULL); @@ -1283,7 +1283,7 @@ ON_EXIT: @param[in] Map The container of either user's transmit or receive token. @param[in] Item Current item to check against. - @param[in] Context The Token to check againist. + @param[in] Context The Token to check against. @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 @@ -1557,7 +1557,7 @@ Ip4OnPacketSent ( @retval EFI_NOT_STARTED This instance has not been started. @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, 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 was already in the transmit queue. @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); diff --git a/NetworkPkg/Ip4Dxe/Ip4Input.c b/NetworkPkg/Ip4Dxe/Ip4Input.c index 24c584658803..fec242c71f4f 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Input.c +++ b/NetworkPkg/Ip4Dxe/Ip4Input.c @@ -387,7 +387,7 @@ Ip4Reassemble ( 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 // is a fake, drop it now. // @@ -468,7 +468,7 @@ Ip4IpSecFree ( actions: bypass the packet, discard the packet, or protect the packet. @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] Options The caller supplied options. @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 protected. @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 number of input data blocks when build a fragment table. @@ -625,7 +625,7 @@ Ip4IpSecProcessPacket ( } // - // Free orginal Netbuf. + // Free original Netbuf. // NetIpSecNetbufFree (*Netbuf); *Netbuf = TxWrap->Packet; @@ -689,8 +689,8 @@ ON_EXIT: @param[in] Flag The link layer flag for the packet received, such as multicast. - @retval EFI_SEUCCESS The recieved packet is in well form. - @retval EFI_INVAILD_PARAMETER The recieved packet is malformed. + @retval EFI_SUCCESS The received packet is in well form. + @retval EFI_INVALID_PARAMETER The received packet is malformed. **/ EFI_STATUS @@ -891,8 +891,8 @@ Ip4AccpetFrame ( ZeroMem (&ZeroHead, sizeof (IP4_HEAD)); if (0 == CompareMem (Head, &ZeroHead, sizeof (IP4_HEAD))) { // Packet may have been changed. Head, HeadLen, TotalLen, and - // info must be reloaded bofore use. The ownership of the packet - // is transfered to the packet process logic. + // info must be reloaded before use. The ownership of the packet // + is transferred to the packet process logic. // Head = (IP4_HEAD *) NetbufGetByte (Packet, 0, NULL); ASSERT (Head != NULL); @@ -973,7 +973,7 @@ Ip4InstanceFrameAcceptable ( 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 // is disabled. The UEFI spec don't have such capability. We add // 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); @@ -1365,7 +1365,7 @@ Ip4InterfaceEnquePacket ( // // First, check that the packet is acceptable to this interface // 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. // LocalType = 0; @@ -1381,7 +1381,7 @@ Ip4InterfaceEnquePacket ( } 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 // to local non-zero IP. Otherwise, it is necessary to compare // the destination to the interface's IP address. @@ -1463,7 +1463,7 @@ Ip4InterfaceDeliverPacket ( /** 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 deliver a non-shared copy of the packet to each IP4 child that has pending receive requests. Data is copied if more than one @@ -1495,7 +1495,7 @@ Ip4Demultiplex ( 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. // Enqueued = 0; diff --git a/NetworkPkg/Ip4Dxe/Ip4Option.c b/NetworkPkg/Ip4Dxe/Ip4Option.c index b3c598c64a38..0f6e444ce8be 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Option.c +++ b/NetworkPkg/Ip4Dxe/Ip4Option.c @@ -181,7 +181,7 @@ Ip4CopyOption ( // // 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); diff --git a/NetworkPkg/Ip4Dxe/Ip4Output.c b/NetworkPkg/Ip4Dxe/Ip4Output.c index 5eb3814089cb..c161b72542be 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Output.c +++ b/NetworkPkg/Ip4Dxe/Ip4Output.c @@ -21,10 +21,10 @@ UINT16 mIp4Id; Fragment, Ttl, Protocol, Src and Dst. All the fields are in host byte order. This function will fill in the Ver, HeadLen, and checksum. - @param Option The orginal IP4 option to copy from + @param Option The original IP4 option to copy from @param OptLen The length of the IP4 option - @retval EFI_BAD_BUFFER_SIZE There is no enought room in the head space of + @retval EFI_BAD_BUFFER_SIZE There is no enough room in the head + space of Packet. @retval EFI_SUCCESS The IP4 header is successfully added to the packet. @@ -300,7 +300,7 @@ Ip4Output ( } 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) { CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src, IpIf->SubnetMask, TRUE); @@ -331,7 +331,7 @@ Ip4Output ( if (Packet->TotalSize + HeadLen > Mtu) { // - // Fragmentation is diabled for RawData mode. + // Fragmentation is disabled for RawData mode. // if (RawData) { 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 // 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 @@ -420,7 +420,7 @@ Ip4Output ( // is bound with the Packet. It will only be freed when all // the references to Packet have been released. Upon then, the // 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. // Ip4PrependHead (Packet, Head, Option, OptLen); diff --git a/NetworkPkg/Ip4Dxe/Ip4Route.c b/NetworkPkg/Ip4Dxe/Ip4Route.c index 124c0730ad87..386011934b19 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Route.c +++ b/NetworkPkg/Ip4Dxe/Ip4Route.c @@ -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. @param[in] Dest The destination network @param[in] Netmask The destination network mask @param[in] GateWay The nexthop address - @return NULL if failed to allocate memeory, otherwise the newly created + @return NULL if failed to allocate memory, otherwise the newly + created route entry. **/ @@ -129,7 +129,7 @@ Ip4FreeRouteCacheEntry ( /** 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 @@ -359,7 +359,7 @@ Ip4AddRoute ( @retval EFI_SUCCESS The route entry is successfully removed @retval EFI_NOT_FOUND There is no route entry in the table with that - properity. + property. **/ EFI_STATUS @@ -396,7 +396,7 @@ Ip4DelRoute ( /** 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 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. @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 most specific route to the Dst. @@ -605,7 +605,7 @@ Ip4Route ( @param[in] IpInstance The IP4 child that requests the route table. @retval EFI_SUCCESS The route table is successfully build - @retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the rotue table. + @retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the route table. **/ EFI_STATUS -- 2.21.0 -------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52002): https://edk2.groups.io/g/devel/message/52002 Mute This Topic: https://groups.io/mt/67501394/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-