]>
Commit | Line | Data |
---|---|---|
a3bcde70 HT |
1 | /** @file\r |
2 | The internal functions and routines to transmit the IP6 packet.\r | |
3 | \r | |
4 | Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
5 | \r | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php.\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef __EFI_IP6_OUTPUT_H__\r | |
17 | #define __EFI_IP6_OUTPUT_H__\r | |
18 | \r | |
19 | extern UINT32 mIp6Id;\r | |
20 | \r | |
21 | /**\r | |
22 | Output all the available source addresses to the list entry head SourceList. The\r | |
23 | number of source addresses are also returned.\r | |
24 | \r | |
25 | @param[in] IpSb Points to a IP6 service binding instance.\r | |
26 | @param[in] Destination The IPv6 destination address.\r | |
27 | @param[out] Source The selected IPv6 source address according to\r | |
28 | the Destination.\r | |
29 | \r | |
30 | @retval EFI_SUCCESS The source addresses were copied to the list entry\r | |
31 | head SourceList.\r | |
32 | @retval EFI_NO_MAPPING The IPv6 stack is not auto configured.\r | |
33 | \r | |
34 | **/\r | |
35 | EFI_STATUS\r | |
36 | Ip6SelectSourceAddress (\r | |
37 | IN IP6_SERVICE *IpSb,\r | |
38 | IN EFI_IPv6_ADDRESS *Destination,\r | |
39 | OUT EFI_IPv6_ADDRESS *Source\r | |
40 | );\r | |
41 | \r | |
42 | /**\r | |
43 | The default callback function for system generated packet.\r | |
44 | It will free the packet.\r | |
45 | \r | |
46 | @param[in] Packet The packet that transmitted.\r | |
47 | @param[in] IoStatus The result of the transmission: succeeded or failed.\r | |
48 | @param[in] LinkFlag Not used when transmission. Check IP6_FRAME_CALLBACK\r | |
49 | for reference.\r | |
50 | @param[in] Context The context provided by us.\r | |
51 | \r | |
52 | **/\r | |
53 | VOID\r | |
54 | Ip6SysPacketSent (\r | |
55 | NET_BUF *Packet,\r | |
56 | EFI_STATUS IoStatus,\r | |
57 | UINT32 LinkFlag,\r | |
58 | VOID *Context\r | |
59 | );\r | |
60 | \r | |
61 | /**\r | |
62 | Transmit an IP6 packet. The packet comes either from the IP6\r | |
63 | child's consumer (IpInstance != NULL) or the IP6 driver itself\r | |
64 | (IpInstance == NULL). It will route the packet, fragment it,\r | |
65 | then transmit all the fragments through an interface.\r | |
66 | \r | |
67 | @param[in] IpSb The IP6 service instance to transmit the packet.\r | |
68 | @param[in] Interface The IP6 interface to transmit the packet. Ignored\r | |
69 | if NULL.\r | |
70 | @param[in] IpInstance The IP6 child that issues the transmission. It is\r | |
71 | NULL if the packet is from the system.\r | |
72 | @param[in] Packet The user data to send, excluding the IP header.\r | |
73 | @param[in] Head The caller supplied header. The caller should set\r | |
74 | the following header fields: NextHeader, HopLimit,\r | |
75 | Src, Dest, FlowLabel, PayloadLength. This function\r | |
76 | will fill in the Ver, TrafficClass.\r | |
77 | @param[in] ExtHdrs The extension headers to append to the IPv6 basic\r | |
78 | header.\r | |
79 | @param[in] ExtHdrsLen The length of the extension headers.\r | |
80 | @param[in] Callback The callback function to issue when transmission\r | |
81 | completed.\r | |
82 | @param[in] Context The opaque context for the callback.\r | |
83 | \r | |
84 | @retval EFI_INVALID_PARAMETER Any input parameter or the packet is invalid.\r | |
85 | @retval EFI_NO_MAPPING There is no interface to the destination.\r | |
86 | @retval EFI_NOT_FOUND There is no route to the destination.\r | |
87 | @retval EFI_SUCCESS The packet successfully transmitted.\r | |
88 | @retval EFI_OUT_OF_RESOURCES Failed to finish the operation due to lack of\r | |
89 | resources.\r | |
90 | @retval Others Failed to transmit the packet.\r | |
91 | \r | |
92 | **/\r | |
93 | EFI_STATUS\r | |
94 | Ip6Output (\r | |
95 | IN IP6_SERVICE *IpSb,\r | |
96 | IN IP6_INTERFACE *Interface OPTIONAL,\r | |
97 | IN IP6_PROTOCOL *IpInstance OPTIONAL,\r | |
98 | IN NET_BUF *Packet,\r | |
99 | IN EFI_IP6_HEADER *Head,\r | |
100 | IN UINT8 *ExtHdrs,\r | |
101 | IN UINT32 ExtHdrsLen,\r | |
102 | IN IP6_FRAME_CALLBACK Callback,\r | |
103 | IN VOID *Context\r | |
104 | );\r | |
105 | \r | |
106 | /**\r | |
107 | Remove all the frames on the interface that pass the FrameToCancel,\r | |
108 | either queued on ARP queues, or that have already been delivered to\r | |
109 | MNP and not yet recycled.\r | |
110 | \r | |
111 | @param[in] Interface Interface to remove the frames from.\r | |
112 | @param[in] IoStatus The transmit status returned to the frames' callback.\r | |
113 | @param[in] FrameToCancel Function to select the frame to cancel; NULL to select all.\r | |
114 | @param[in] Context Opaque parameters passed to FrameToCancel. Ignored if\r | |
115 | FrameToCancel is NULL.\r | |
116 | \r | |
117 | **/\r | |
118 | VOID\r | |
119 | Ip6CancelFrames (\r | |
120 | IN IP6_INTERFACE *Interface,\r | |
121 | IN EFI_STATUS IoStatus,\r | |
122 | IN IP6_FRAME_TO_CANCEL FrameToCancel OPTIONAL,\r | |
123 | IN VOID *Context OPTIONAL\r | |
124 | );\r | |
125 | \r | |
126 | /**\r | |
127 | Cancel the Packet and all its fragments.\r | |
128 | \r | |
129 | @param[in] IpIf The interface from which the Packet is sent.\r | |
130 | @param[in] Packet The Packet to cancel.\r | |
131 | @param[in] IoStatus The status returns to the sender.\r | |
132 | \r | |
133 | **/\r | |
134 | VOID\r | |
135 | Ip6CancelPacket (\r | |
136 | IN IP6_INTERFACE *IpIf,\r | |
137 | IN NET_BUF *Packet,\r | |
138 | IN EFI_STATUS IoStatus\r | |
139 | );\r | |
140 | \r | |
141 | #endif\r |