]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Udp6Dxe/Udp6Impl.c
EmulatorPkg: Change the cpu frequency to a non-zero value
[mirror_edk2.git] / NetworkPkg / Udp6Dxe / Udp6Impl.c
index 458470ce2c56d80d9432f7a0151e8e465f0c7191..aefcd3396c8590a5f7441b42934f505254beb8f4 100644 (file)
@@ -3,13 +3,7 @@
 \r
   Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php.\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -57,6 +51,9 @@ Udp6FindInstanceByPort (
   interface. It's called to signal the udp TxToken when the IpIo layer completes\r
   transmitting of the udp datagram.\r
 \r
+  If Context is NULL, then ASSERT().\r
+  If NotifyData is NULL, then ASSERT().\r
+\r
   @param[in]  Status            The completion status of the output udp datagram.\r
   @param[in]  Context           Pointer to the context data.\r
   @param[in]  Sender            Specify a EFI_IP6_PROTOCOL for sending.\r
@@ -75,6 +72,10 @@ Udp6DgramSent (
 /**\r
   This function processes the received datagram passed up by the IpIo layer.\r
 \r
+  If NetSession is NULL, then ASSERT().\r
+  If Packet is NULL, then ASSERT().\r
+  If Context is NULL, then ASSERT().\r
+\r
   @param[in]  Status            The status of this udp datagram.\r
   @param[in]  IcmpError         The IcmpError code, only available when Status is\r
                                 EFI_ICMP_ERROR.\r
@@ -365,7 +366,7 @@ ON_ERROR:
 \r
   IpIoDestroy (Udp6Service->IpIo);\r
   Udp6Service->IpIo = NULL;\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -391,7 +392,7 @@ Udp6CleanService (
   //\r
   IpIoDestroy (Udp6Service->IpIo);\r
   Udp6Service->IpIo = NULL;\r
-  \r
+\r
   ZeroMem (Udp6Service, sizeof (UDP6_SERVICE_DATA));\r
 }\r
 \r
@@ -977,6 +978,9 @@ Udp6RemoveToken (
   interface. It's called to signal the udp TxToken when IpIo layer completes the\r
   transmitting of the udp datagram.\r
 \r
+  If Context is NULL, then ASSERT().\r
+  If NotifyData is NULL, then ASSERT().\r
+\r
   @param[in]  Status            The completion status of the output udp datagram.\r
   @param[in]  Context           Pointer to the context data.\r
   @param[in]  Sender            Specify a EFI_IP6_PROTOCOL for sending.\r
@@ -995,6 +999,8 @@ Udp6DgramSent (
   UDP6_INSTANCE_DATA         *Instance;\r
   EFI_UDP6_COMPLETION_TOKEN  *Token;\r
 \r
+  ASSERT (Context != NULL && NotifyData != NULL);\r
+\r
   Instance = (UDP6_INSTANCE_DATA *) Context;\r
   Token    = (EFI_UDP6_COMPLETION_TOKEN *) NotifyData;\r
 \r
@@ -1012,6 +1018,10 @@ Udp6DgramSent (
 /**\r
   This function processes the received datagram passed up by the IpIo layer.\r
 \r
+  If NetSession is NULL, then ASSERT().\r
+  If Packet is NULL, then ASSERT().\r
+  If Context is NULL, then ASSERT().\r
+\r
   @param[in]  Status            The status of this udp datagram.\r
   @param[in]  IcmpError         The IcmpError code, only available when Status is\r
                                 EFI_ICMP_ERROR.\r
@@ -1031,6 +1041,7 @@ Udp6DgramRcvd (
   IN VOID                  *Context\r
   )\r
 {\r
+  ASSERT (NetSession != NULL && Packet != NULL && Context != NULL);\r
   NET_CHECK_SIGNATURE (Packet, NET_BUF_SIGNATURE);\r
 \r
   //\r
@@ -1604,7 +1615,7 @@ Udp6Demultiplex (
     NetbufFree (Packet);\r
     return;\r
   }\r
-  \r
+\r
   //\r
   // Get the datagram header from the packet buffer.\r
   //\r
@@ -1856,7 +1867,7 @@ Udp6IcmpHandler (
     NetbufFree (Packet);\r
     return;\r
   }\r
-  \r
+\r
   Udp6Header = (EFI_UDP_HEADER *) NetbufGetByte (Packet, 0, NULL);\r
   ASSERT (Udp6Header != NULL);\r
   if (Udp6Header == NULL) {\r
@@ -1958,7 +1969,7 @@ Udp6NetVectorExtFree (
   IN VOID  *Context\r
   )\r
 {\r
-} \r
+}\r
 \r
 /**\r
   Find the key in the netmap.\r