3 Copyright (c) 2005 - 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 #ifndef __EFI_IP4_OUTPUT_H__
22 #define __EFI_IP4_OUTPUT_H__
25 The default callback function for system generated packet.
26 It will free the packet.
28 @param Ip4Instance The IP4 child that issued the transmission. It most
30 @param Packet The packet that transmitted.
31 @param IoStatus The result of the transmission, succeeded or failed.
32 @param LinkFlag Not used when transmission. check IP4_FRAME_CALLBACK
34 @param Context The context provided by us
41 IP4_PROTOCOL
*Ip4Instance
,
49 Transmit an IP4 packet. The packet comes either from the IP4
50 child's consumer (IpInstance != NULL) or the IP4 driver itself
51 (IpInstance == NULL). It will route the packet, fragment it,
52 then transmit all the fragments through some interface.
54 @param IpSb The IP4 service instance to transmit the packet
55 @param IpInstance The IP4 child that issues the transmission. It is
56 NULL if the packet is from the system.
57 @param Packet The user data to send, excluding the IP header.
58 @param Head The caller supplied header. The caller should set
59 the following header fields: Tos, TotalLen, Id, tl,
60 Fragment, Protocol, Src and Dst. All the fields are
61 in host byte order. This function will fill in the
62 Ver, HeadLen, Fragment, and checksum. The Fragment
63 only need to include the DF flag. Ip4Output will
64 compute the MF and offset for you.
65 @param Option The original option to append to the IP headers
66 @param OptLen The length of the option
67 @param GateWay The next hop address to transmit packet to.
68 255.255.255.255 means broadcast.
69 @param Callback The callback function to issue when transmission
71 @param Context The opaque context for the callback
73 @retval EFI_NO_MAPPING There is no interface to the destination.
74 @retval EFI_NOT_FOUND There is no route to the destination
75 @retval EFI_SUCCESS The packet is successfully transmitted.
76 @retval Others Failed to transmit the packet.
82 IN IP4_PROTOCOL
*IpInstance
, OPTIONAL
88 IN IP4_FRAME_CALLBACK Callback
,
93 Cancel the Packet and all its fragments.
95 @param IpIf The interface from which the Packet is sent
96 @param Packet The Packet to cancel
97 @param IoStatus The status returns to the sender.
104 IN IP4_INTERFACE
*IpIf
,
106 IN EFI_STATUS IoStatus
109 extern UINT16 mIp4Id
;