X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FIp4Dxe%2FIp4Output.h;h=e833352c1b104c2d72f416c95ce4fb747b352793;hp=da3d8029d67bf0254a6debd7873db0bd00ab922b;hb=4f0f2316ed7699e233b362b83c7fbd63c2adf97e;hpb=3e8c18da0441069591e5aa218f378001b29512dd diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.h index da3d8029d6..e833352c1b 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.h @@ -1,7 +1,7 @@ /** @file -Copyright (c) 2005 - 2006, Intel Corporation.
-All rights reserved. This program and the accompanying materials +Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -70,7 +70,7 @@ Ip4SysPacketSent ( EFI_STATUS Ip4Output ( IN IP4_SERVICE *IpSb, - IN IP4_PROTOCOL *IpInstance, OPTIONAL + IN IP4_PROTOCOL *IpInstance OPTIONAL, IN NET_BUF *Packet, IN IP4_HEAD *Head, IN UINT8 *Option, @@ -95,5 +95,32 @@ Ip4CancelPacket ( IN EFI_STATUS IoStatus ); +/** + Prepend an IP4 head to the Packet. It will copy the options and + build the IP4 header fields. Used for IP4 fragmentation. + + @param Packet The packet to prepend IP4 header to + @param Head The caller supplied header. The caller should set + the following header fields: Tos, TotalLen, Id, + 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 OptLen The length of the IP4 option + + @retval EFI_BAD_BUFFER_SIZE There is no enought room in the head space of + Packet. + @retval EFI_SUCCESS The IP4 header is successfully added to the packet. + +**/ +EFI_STATUS +Ip4PrependHead ( + IN OUT NET_BUF *Packet, + IN IP4_HEAD *Head, + IN UINT8 *Option, + IN UINT32 OptLen + ); + extern UINT16 mIp4Id; + #endif