]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.h
BaseTools:Change the path of the file that Binary Cache
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Output.h
index da3d8029d67bf0254a6debd7873db0bd00ab922b..ae54f8b485caf04b5d2e008b0304a7410e9561fb 100644 (file)
@@ -1,13 +1,7 @@
 /** @file\r
 \r
-Copyright (c) 2005 - 2006, Intel Corporation.<BR>\r
-All rights reserved. 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
+Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -70,7 +64,7 @@ Ip4SysPacketSent (
 EFI_STATUS\r
 Ip4Output (\r
   IN IP4_SERVICE            *IpSb,\r
-  IN IP4_PROTOCOL           *IpInstance, OPTIONAL\r
+  IN IP4_PROTOCOL           *IpInstance  OPTIONAL,\r
   IN NET_BUF                *Packet,\r
   IN IP4_HEAD               *Head,\r
   IN UINT8                  *Option,\r
@@ -95,5 +89,32 @@ Ip4CancelPacket (
   IN EFI_STATUS       IoStatus\r
   );\r
 \r
+/**\r
+  Prepend an IP4 head to the Packet. It will copy the options and\r
+  build the IP4 header fields. Used for IP4 fragmentation.\r
+\r
+  @param  Packet           The packet to prepend IP4 header to\r
+  @param  Head             The caller supplied header. The caller should set\r
+                           the following header fields: Tos, TotalLen, Id,\r
+                           Fragment, Ttl, Protocol, Src and Dst. All the fields\r
+                           are in host byte order. This function will fill in\r
+                           the Ver, HeadLen, and checksum.\r
+  @param  Option           The orginal IP4 option to copy from\r
+  @param  OptLen           The length of the IP4 option\r
+\r
+  @retval EFI_BAD_BUFFER_SIZE  There is no enought room in the head space of\r
+                               Packet.\r
+  @retval EFI_SUCCESS          The IP4 header is successfully added to the packet.\r
+\r
+**/\r
+EFI_STATUS\r
+Ip4PrependHead (\r
+  IN OUT NET_BUF                *Packet,\r
+  IN     IP4_HEAD               *Head,\r
+  IN     UINT8                  *Option,\r
+  IN     UINT32                 OptLen\r
+  );\r
+\r
 extern UINT16  mIp4Id;\r
+\r
 #endif\r