]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.h
code scrub fix
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Output.h
index e165e1d715cc8821bc8d122f52e7d6711aea77a6..da3d8029d67bf0254a6debd7873db0bd00ab922b 100644 (file)
@@ -1,54 +1,99 @@
-/** @file
-
-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
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
-  Ip4Output.h
-
-Abstract:
-
-
-**/
-
-#ifndef __EFI_IP4_OUTPUT_H__
-#define __EFI_IP4_OUTPUT_H__
-
-VOID
-Ip4SysPacketSent (
-  IP4_PROTOCOL              *Ip4Instance,
-  NET_BUF                   *Packet,
-  EFI_STATUS                IoStatus,
-  UINT32                    Flag,
-  VOID                      *Context
-  );
-
-EFI_STATUS
-Ip4Output (
-  IN IP4_SERVICE            *IpSb,
-  IN IP4_PROTOCOL           *IpInstance,    OPTIONAL
-  IN NET_BUF                *Data,
-  IN IP4_HEAD               *Head,
-  IN UINT8                  *Option,
-  IN UINT32                 OptLen,
-  IN IP4_ADDR               GateWay,
-  IN IP4_FRAME_CALLBACK     Callback,
-  IN VOID                   *Context
-  );
-
-VOID
-Ip4CancelPacket (
-  IN IP4_INTERFACE          *IpIf,
-  IN NET_BUF                *Packet,
-  IN EFI_STATUS             IoStatus
-  );
-
-extern UINT16  mIp4Id;
-#endif
+/** @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
+\r
+**/\r
+\r
+#ifndef __EFI_IP4_OUTPUT_H__\r
+#define __EFI_IP4_OUTPUT_H__\r
+\r
+/**\r
+  The default callback function for system generated packet.\r
+  It will free the packet.\r
+\r
+  @param  Ip4Instance          The IP4 child that issued the transmission.  It most\r
+                               like is NULL.\r
+  @param  Packet               The packet that transmitted.\r
+  @param  IoStatus             The result of the transmission, succeeded or failed.\r
+  @param  LinkFlag             Not used when transmission. check IP4_FRAME_CALLBACK\r
+                               for reference.\r
+  @param  Context              The context provided by us\r
+\r
+**/\r
+VOID\r
+Ip4SysPacketSent (\r
+  IP4_PROTOCOL              *Ip4Instance,\r
+  NET_BUF                   *Packet,\r
+  EFI_STATUS                IoStatus,\r
+  UINT32                    LinkFlag,\r
+  VOID                      *Context\r
+  );\r
+\r
+/**\r
+  Transmit an IP4 packet. The packet comes either from the IP4\r
+  child's consumer (IpInstance != NULL) or the IP4 driver itself\r
+  (IpInstance == NULL). It will route the packet, fragment it,\r
+  then transmit all the fragments through some interface.\r
+\r
+  @param[in]  IpSb             The IP4 service instance to transmit the packet\r
+  @param[in]  IpInstance       The IP4 child that issues the transmission.  It is\r
+                               NULL if the packet is from the system.\r
+  @param[in]  Packet           The user data to send, excluding the IP header.\r
+  @param[in]  Head             The caller supplied header. The caller should set\r
+                               the following header fields: Tos, TotalLen, Id, tl,\r
+                               Fragment, Protocol, Src and Dst. All the fields are\r
+                               in host byte  order. This function will fill in the\r
+                               Ver, HeadLen,  Fragment, and checksum. The Fragment\r
+                               only need to include the DF flag. Ip4Output will\r
+                               compute the MF and offset for  you.\r
+  @param[in]  Option           The original option to append to the IP headers\r
+  @param[in]  OptLen           The length of the option\r
+  @param[in]  GateWay          The next hop address to transmit packet to.\r
+                               255.255.255.255 means broadcast.\r
+  @param[in]  Callback         The callback function to issue when transmission\r
+                               completed.\r
+  @param[in]  Context          The opaque context for the callback\r
+\r
+  @retval EFI_NO_MAPPING       There is no interface to the destination.\r
+  @retval EFI_NOT_FOUND        There is no route to the destination\r
+  @retval EFI_SUCCESS          The packet is successfully transmitted.\r
+  @retval Others               Failed to transmit the packet.\r
+\r
+**/\r
+EFI_STATUS\r
+Ip4Output (\r
+  IN IP4_SERVICE            *IpSb,\r
+  IN IP4_PROTOCOL           *IpInstance, OPTIONAL\r
+  IN NET_BUF                *Packet,\r
+  IN IP4_HEAD               *Head,\r
+  IN UINT8                  *Option,\r
+  IN UINT32                 OptLen,\r
+  IN IP4_ADDR               GateWay,\r
+  IN IP4_FRAME_CALLBACK     Callback,\r
+  IN VOID                   *Context\r
+  );\r
+\r
+/**\r
+  Cancel the Packet and all its fragments.\r
+\r
+  @param  IpIf                 The interface from which the Packet is sent\r
+  @param  Packet               The Packet to cancel\r
+  @param  IoStatus             The status returns to the sender.\r
+\r
+**/\r
+VOID\r
+Ip4CancelPacket (\r
+  IN IP4_INTERFACE    *IpIf,\r
+  IN NET_BUF          *Packet,\r
+  IN EFI_STATUS       IoStatus\r
+  );\r
+\r
+extern UINT16  mIp4Id;\r
+#endif\r