]>
Commit | Line | Data |
---|---|---|
bdb140d7 | 1 | /** @file\r |
bdb140d7 | 2 | This file defines the EFI IPv6 (Internet Protocol version 6)\r |
3 | Protocol interface. It is split into the following three main\r | |
4 | sections:\r | |
5 | - EFI IPv6 Service Binding Protocol\r | |
d551cc64 | 6 | - EFI IPv6 Variable (deprecated in UEFI 2.4B)\r |
bdb140d7 | 7 | - EFI IPv6 Protocol\r |
8 | The EFI IPv6 Protocol provides basic network IPv6 packet I/O services,\r | |
9 | which includes support for Neighbor Discovery Protocol (ND), Multicast\r | |
10 | Listener Discovery Protocol (MLD), and a subset of the Internet Control\r | |
11 | Message Protocol (ICMPv6).\r | |
bdb140d7 | 12 | \r |
d551cc64 | 13 | Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 14 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
bce46f7e | 15 | \r |
16 | @par Revision Reference:\r | |
17 | This Protocol is introduced in UEFI Specification 2.2\r | |
bdb140d7 | 18 | \r |
19 | **/\r | |
20 | \r | |
21 | #ifndef __EFI_IP6_PROTOCOL_H__\r | |
22 | #define __EFI_IP6_PROTOCOL_H__\r | |
23 | \r | |
24 | #include <Protocol/ManagedNetwork.h>\r | |
25 | \r | |
bdb140d7 | 26 | #define EFI_IP6_SERVICE_BINDING_PROTOCOL_GUID \\r |
27 | { \\r | |
28 | 0xec835dd3, 0xfe0f, 0x617b, {0xa6, 0x21, 0xb3, 0x50, 0xc3, 0xe1, 0x33, 0x88 } \\r | |
29 | }\r | |
30 | \r | |
31 | #define EFI_IP6_PROTOCOL_GUID \\r | |
32 | { \\r | |
33 | 0x2c8759d5, 0x5c2d, 0x66ef, {0x92, 0x5f, 0xb6, 0x6c, 0x10, 0x19, 0x57, 0xe2 } \\r | |
34 | }\r | |
35 | \r | |
36 | typedef struct _EFI_IP6_PROTOCOL EFI_IP6_PROTOCOL;\r | |
37 | \r | |
abbfadd7 | 38 | ///\r |
d551cc64 FS |
39 | /// EFI_IP6_ADDRESS_PAIR is deprecated in the UEFI 2.4B and should not be used any more.\r |
40 | /// The definition in here is only present to provide backwards compatability.\r | |
abbfadd7 | 41 | ///\r |
2f88bd3a | 42 | typedef struct {\r |
abbfadd7 | 43 | ///\r |
44 | /// The EFI IPv6 Protocol instance handle that is using this address/prefix pair.\r | |
45 | ///\r | |
46 | EFI_HANDLE InstanceHandle;\r | |
47 | ///\r | |
48 | /// IPv6 address in network byte order.\r | |
49 | ///\r | |
50 | EFI_IPv6_ADDRESS Ip6Address;\r | |
51 | ///\r | |
52 | /// The length of the prefix associated with the Ip6Address.\r | |
53 | ///\r | |
54 | UINT8 PrefixLength;\r | |
bce46f7e | 55 | } EFI_IP6_ADDRESS_PAIR;\r |
abbfadd7 | 56 | \r |
57 | ///\r | |
d551cc64 FS |
58 | /// EFI_IP6_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.\r |
59 | /// The definition in here is only present to provide backwards compatability.\r | |
abbfadd7 | 60 | ///\r |
61 | typedef struct {\r | |
62 | ///\r | |
63 | /// The handle of the driver that creates this entry.\r | |
64 | ///\r | |
65 | EFI_HANDLE DriverHandle;\r | |
66 | ///\r | |
67 | /// The number of IPv6 address pairs that follow this data structure.\r | |
68 | ///\r | |
69 | UINT32 AddressCount;\r | |
70 | ///\r | |
71 | /// List of IPv6 address pairs that are currently in use.\r | |
72 | ///\r | |
73 | EFI_IP6_ADDRESS_PAIR AddressPairs[1];\r | |
74 | } EFI_IP6_VARIABLE_DATA;\r | |
75 | \r | |
bdb140d7 | 76 | ///\r |
77 | /// ICMPv6 type definitions for error messages\r | |
78 | ///\r | |
79 | ///@{\r | |
2f88bd3a MK |
80 | #define ICMP_V6_DEST_UNREACHABLE 0x1\r |
81 | #define ICMP_V6_PACKET_TOO_BIG 0x2\r | |
82 | #define ICMP_V6_TIME_EXCEEDED 0x3\r | |
83 | #define ICMP_V6_PARAMETER_PROBLEM 0x4\r | |
bdb140d7 | 84 | ///@}\r |
85 | \r | |
86 | ///\r | |
87 | /// ICMPv6 type definition for informational messages\r | |
88 | ///\r | |
89 | ///@{\r | |
2f88bd3a MK |
90 | #define ICMP_V6_ECHO_REQUEST 0x80\r |
91 | #define ICMP_V6_ECHO_REPLY 0x81\r | |
92 | #define ICMP_V6_LISTENER_QUERY 0x82\r | |
93 | #define ICMP_V6_LISTENER_REPORT 0x83\r | |
94 | #define ICMP_V6_LISTENER_DONE 0x84\r | |
95 | #define ICMP_V6_ROUTER_SOLICIT 0x85\r | |
96 | #define ICMP_V6_ROUTER_ADVERTISE 0x86\r | |
97 | #define ICMP_V6_NEIGHBOR_SOLICIT 0x87\r | |
98 | #define ICMP_V6_NEIGHBOR_ADVERTISE 0x88\r | |
99 | #define ICMP_V6_REDIRECT 0x89\r | |
100 | #define ICMP_V6_LISTENER_REPORT_2 0x8F\r | |
bdb140d7 | 101 | ///@}\r |
102 | \r | |
103 | ///\r | |
104 | /// ICMPv6 code definitions for ICMP_V6_DEST_UNREACHABLE\r | |
105 | ///\r | |
106 | ///@{\r | |
2f88bd3a MK |
107 | #define ICMP_V6_NO_ROUTE_TO_DEST 0x0\r |
108 | #define ICMP_V6_COMM_PROHIBITED 0x1\r | |
109 | #define ICMP_V6_BEYOND_SCOPE 0x2\r | |
110 | #define ICMP_V6_ADDR_UNREACHABLE 0x3\r | |
111 | #define ICMP_V6_PORT_UNREACHABLE 0x4\r | |
112 | #define ICMP_V6_SOURCE_ADDR_FAILED 0x5\r | |
113 | #define ICMP_V6_ROUTE_REJECTED 0x6\r | |
bdb140d7 | 114 | ///@}\r |
bce46f7e | 115 | \r |
bdb140d7 | 116 | ///\r |
117 | /// ICMPv6 code definitions for ICMP_V6_TIME_EXCEEDED\r | |
118 | ///\r | |
119 | ///@{\r | |
2f88bd3a MK |
120 | #define ICMP_V6_TIMEOUT_HOP_LIMIT 0x0\r |
121 | #define ICMP_V6_TIMEOUT_REASSEMBLE 0x1\r | |
bdb140d7 | 122 | ///@}\r |
bce46f7e | 123 | \r |
bdb140d7 | 124 | ///\r |
125 | /// ICMPv6 code definitions for ICMP_V6_PARAMETER_PROBLEM\r | |
126 | ///\r | |
127 | ///@{\r | |
2f88bd3a MK |
128 | #define ICMP_V6_ERRONEOUS_HEADER 0x0\r |
129 | #define ICMP_V6_UNRECOGNIZE_NEXT_HDR 0x1\r | |
130 | #define ICMP_V6_UNRECOGNIZE_OPTION 0x2\r | |
bdb140d7 | 131 | ///@}\r |
132 | \r | |
133 | ///\r | |
134 | /// EFI_IP6_CONFIG_DATA\r | |
135 | /// is used to report and change IPv6 session parameters.\r | |
136 | ///\r | |
137 | typedef struct {\r | |
bce46f7e | 138 | ///\r |
139 | /// For the IPv6 packet to send and receive, this is the default value\r | |
140 | /// of the 'Next Header' field in the last IPv6 extension header or in\r | |
141 | /// the IPv6 header if there are no extension headers. Ignored when\r | |
bdb140d7 | 142 | /// AcceptPromiscuous is TRUE.\r |
bce46f7e | 143 | ///\r |
2f88bd3a | 144 | UINT8 DefaultProtocol;\r |
bce46f7e | 145 | ///\r |
146 | /// Set to TRUE to receive all IPv6 packets that get through the\r | |
147 | /// receive filters.\r | |
148 | /// Set to FALSE to receive only the DefaultProtocol IPv6\r | |
149 | /// packets that get through the receive filters. Ignored when\r | |
bdb140d7 | 150 | /// AcceptPromiscuous is TRUE.\r |
bce46f7e | 151 | ///\r |
2f88bd3a | 152 | BOOLEAN AcceptAnyProtocol;\r |
bce46f7e | 153 | ///\r |
154 | /// Set to TRUE to receive ICMP error report packets. Ignored when\r | |
bdb140d7 | 155 | /// AcceptPromiscuous or AcceptAnyProtocol is TRUE.\r |
bce46f7e | 156 | ///\r |
2f88bd3a | 157 | BOOLEAN AcceptIcmpErrors;\r |
bce46f7e | 158 | ///\r |
159 | /// Set to TRUE to receive all IPv6 packets that are sent to any\r | |
160 | /// hardware address or any protocol address. Set to FALSE to stop\r | |
bdb140d7 | 161 | /// receiving all promiscuous IPv6 packets.\r |
bce46f7e | 162 | ///\r |
2f88bd3a | 163 | BOOLEAN AcceptPromiscuous;\r |
bce46f7e | 164 | ///\r |
165 | /// The destination address of the packets that will be transmitted.\r | |
bdb140d7 | 166 | /// Ignored if it is unspecified.\r |
bce46f7e | 167 | ///\r |
2f88bd3a | 168 | EFI_IPv6_ADDRESS DestinationAddress;\r |
bce46f7e | 169 | ///\r |
170 | /// The station IPv6 address that will be assigned to this EFI IPv6\r | |
171 | /// Protocol instance. This field can be set and changed only when\r | |
172 | /// the EFI IPv6 driver is transitioning from the stopped to the started\r | |
173 | /// states. If the StationAddress is specified, the EFI IPv6 Protocol\r | |
174 | /// driver will deliver only incoming IPv6 packets whose destination\r | |
175 | /// matches this IPv6 address exactly. The StationAddress is required\r | |
176 | /// to be one of currently configured IPv6 addresses. An address\r | |
177 | /// containing all zeroes is also accepted as a special case. Under this\r | |
178 | /// situation, the IPv6 driver is responsible for binding a source\r | |
179 | /// address to this EFI IPv6 protocol instance according to the source\r | |
180 | /// address selection algorithm. Only incoming packets destined to\r | |
181 | /// the selected address will be delivered to the user. And the\r | |
182 | /// selected station address can be retrieved through later\r | |
183 | /// GetModeData() call. If no address is available for selecting,\r | |
184 | /// EFI_NO_MAPPING will be returned, and the station address will\r | |
185 | /// only be successfully bound to this EFI IPv6 protocol instance\r | |
bdb140d7 | 186 | /// after IP6ModeData.IsConfigured changed to TRUE.\r |
bce46f7e | 187 | ///\r |
2f88bd3a | 188 | EFI_IPv6_ADDRESS StationAddress;\r |
bce46f7e | 189 | ///\r |
190 | /// TrafficClass field in transmitted IPv6 packets. Default value\r | |
bdb140d7 | 191 | /// is zero.\r |
bce46f7e | 192 | ///\r |
2f88bd3a | 193 | UINT8 TrafficClass;\r |
bce46f7e | 194 | ///\r |
195 | /// HopLimit field in transmitted IPv6 packets.\r | |
196 | ///\r | |
2f88bd3a | 197 | UINT8 HopLimit;\r |
bce46f7e | 198 | ///\r |
199 | /// FlowLabel field in transmitted IPv6 packets. Default value is\r | |
bdb140d7 | 200 | /// zero.\r |
bce46f7e | 201 | ///\r |
2f88bd3a | 202 | UINT32 FlowLabel;\r |
bce46f7e | 203 | ///\r |
204 | /// The timer timeout value (number of microseconds) for the\r | |
205 | /// receive timeout event to be associated with each assembled\r | |
bdb140d7 | 206 | /// packet. Zero means do not drop assembled packets.\r |
bce46f7e | 207 | ///\r |
2f88bd3a | 208 | UINT32 ReceiveTimeout;\r |
bce46f7e | 209 | ///\r |
210 | /// The timer timeout value (number of microseconds) for the\r | |
211 | /// transmit timeout event to be associated with each outgoing\r | |
bdb140d7 | 212 | /// packet. Zero means do not drop outgoing packets.\r |
bce46f7e | 213 | ///\r |
2f88bd3a | 214 | UINT32 TransmitTimeout;\r |
bdb140d7 | 215 | } EFI_IP6_CONFIG_DATA;\r |
216 | \r | |
217 | ///\r | |
218 | /// EFI_IP6_ADDRESS_INFO\r | |
219 | ///\r | |
220 | typedef struct {\r | |
2f88bd3a MK |
221 | EFI_IPv6_ADDRESS Address; ///< The IPv6 address.\r |
222 | UINT8 PrefixLength; ///< The length of the prefix associated with the Address.\r | |
bdb140d7 | 223 | } EFI_IP6_ADDRESS_INFO;\r |
224 | \r | |
225 | ///\r | |
226 | /// EFI_IP6_ROUTE_TABLE\r | |
227 | /// is the entry structure that is used in routing tables\r | |
bce46f7e | 228 | ///\r |
bdb140d7 | 229 | typedef struct {\r |
230 | ///\r | |
bce46f7e | 231 | /// The IPv6 address of the gateway to be used as the next hop for\r |
232 | /// packets to this prefix. If the IPv6 address is all zeros, then the\r | |
bdb140d7 | 233 | /// prefix is on-link.\r |
234 | ///\r | |
2f88bd3a | 235 | EFI_IPv6_ADDRESS Gateway;\r |
bdb140d7 | 236 | ///\r |
237 | /// The destination prefix to be routed.\r | |
238 | ///\r | |
2f88bd3a | 239 | EFI_IPv6_ADDRESS Destination;\r |
bdb140d7 | 240 | ///\r |
241 | /// The length of the prefix associated with the Destination.\r | |
242 | ///\r | |
2f88bd3a | 243 | UINT8 PrefixLength;\r |
bdb140d7 | 244 | } EFI_IP6_ROUTE_TABLE;\r |
245 | \r | |
246 | ///\r | |
247 | /// EFI_IP6_NEIGHBOR_STATE\r | |
248 | ///\r | |
249 | typedef enum {\r | |
250 | ///\r | |
bce46f7e | 251 | /// Address resolution is being performed on this entry. Specially,\r |
252 | /// Neighbor Solicitation has been sent to the solicited-node\r | |
253 | /// multicast address of the target, but corresponding Neighbor\r | |
bdb140d7 | 254 | /// Advertisement has not been received.\r |
255 | ///\r | |
bce46f7e | 256 | EfiNeighborInComplete,\r |
bdb140d7 | 257 | ///\r |
bce46f7e | 258 | /// Positive confirmation was received that the forward path to the\r |
bdb140d7 | 259 | /// neighbor was functioning properly.\r |
260 | ///\r | |
261 | EfiNeighborReachable,\r | |
262 | ///\r | |
2f88bd3a MK |
263 | /// Reachable Time has elapsed since the last positive confirmation\r |
264 | /// was received. In this state, the forward path to the neighbor was\r | |
265 | /// functioning properly.\r | |
bdb140d7 | 266 | ///\r |
267 | EfiNeighborStale,\r | |
268 | ///\r | |
bce46f7e | 269 | /// This state is an optimization that gives upper-layer protocols\r |
bdb140d7 | 270 | /// additional time to provide reachability confirmation.\r |
271 | ///\r | |
272 | EfiNeighborDelay,\r | |
273 | ///\r | |
bce46f7e | 274 | /// A reachability confirmation is actively sought by retransmitting\r |
275 | /// Neighbor Solicitations every RetransTimer milliseconds until a\r | |
bdb140d7 | 276 | /// reachability confirmation is received.\r |
277 | ///\r | |
278 | EfiNeighborProbe\r | |
279 | } EFI_IP6_NEIGHBOR_STATE;\r | |
280 | \r | |
281 | ///\r | |
282 | /// EFI_IP6_NEIGHBOR_CACHE\r | |
bce46f7e | 283 | /// is the entry structure that is used in neighbor cache. It records a set\r |
284 | /// of entries about individual neighbors to which traffic has been sent recently.\r | |
bdb140d7 | 285 | ///\r |
286 | typedef struct {\r | |
2f88bd3a MK |
287 | EFI_IPv6_ADDRESS Neighbor; ///< The on-link unicast/anycast IP address of the neighbor.\r |
288 | EFI_MAC_ADDRESS LinkAddress; ///< Link-layer address of the neighbor.\r | |
289 | EFI_IP6_NEIGHBOR_STATE State; ///< State of this neighbor cache entry.\r | |
bdb140d7 | 290 | } EFI_IP6_NEIGHBOR_CACHE;\r |
291 | \r | |
292 | ///\r | |
293 | /// EFI_IP6_ICMP_TYPE\r | |
bce46f7e | 294 | /// is used to describe those ICMP messages that are supported by this EFI\r |
bdb140d7 | 295 | /// IPv6 Protocol driver.\r |
296 | ///\r | |
297 | typedef struct {\r | |
2f88bd3a MK |
298 | UINT8 Type; ///< The type of ICMP message.\r |
299 | UINT8 Code; ///< The code of the ICMP message.\r | |
bce46f7e | 300 | } EFI_IP6_ICMP_TYPE;\r |
bdb140d7 | 301 | \r |
302 | ///\r | |
303 | /// EFI_IP6_MODE_DATA\r | |
304 | ///\r | |
bce46f7e | 305 | typedef struct {\r |
bdb140d7 | 306 | ///\r |
bce46f7e | 307 | /// Set to TRUE after this EFI IPv6 Protocol instance is started.\r |
308 | /// All other fields in this structure are undefined until this field is TRUE.\r | |
bdb140d7 | 309 | /// Set to FALSE when the EFI IPv6 Protocol instance is stopped.\r |
bce46f7e | 310 | ///\r |
2f88bd3a | 311 | BOOLEAN IsStarted;\r |
bdb140d7 | 312 | ///\r |
313 | /// The maximum packet size, in bytes, of the packet which the upper layer driver could feed.\r | |
314 | ///\r | |
2f88bd3a | 315 | UINT32 MaxPacketSize;\r |
bce46f7e | 316 | ///\r |
bdb140d7 | 317 | /// Current configuration settings. Undefined until IsStarted is TRUE.\r |
318 | ///\r | |
2f88bd3a | 319 | EFI_IP6_CONFIG_DATA ConfigData;\r |
bce46f7e | 320 | ///\r |
321 | /// Set to TRUE when the EFI IPv6 Protocol instance is configured.\r | |
322 | /// The instance is configured when it has a station address and\r | |
323 | /// corresponding prefix length.\r | |
bdb140d7 | 324 | /// Set to FALSE when the EFI IPv6 Protocol instance is not configured.\r |
325 | ///\r | |
2f88bd3a | 326 | BOOLEAN IsConfigured;\r |
bce46f7e | 327 | ///\r |
328 | /// Number of configured IPv6 addresses on this interface.\r | |
bdb140d7 | 329 | ///\r |
2f88bd3a | 330 | UINT32 AddressCount;\r |
bce46f7e | 331 | ///\r |
332 | /// List of currently configured IPv6 addresses and corresponding\r | |
333 | /// prefix lengths assigned to this interface. It is caller's\r | |
bdb140d7 | 334 | /// responsibility to free this buffer.\r |
bce46f7e | 335 | ///\r |
2f88bd3a | 336 | EFI_IP6_ADDRESS_INFO *AddressList;\r |
bce46f7e | 337 | ///\r |
338 | /// Number of joined multicast groups. Undefined until\r | |
bdb140d7 | 339 | /// IsConfigured is TRUE.\r |
340 | ///\r | |
2f88bd3a | 341 | UINT32 GroupCount;\r |
bce46f7e | 342 | ///\r |
343 | /// List of joined multicast group addresses. It is caller's\r | |
344 | /// responsibility to free this buffer. Undefined until\r | |
bdb140d7 | 345 | /// IsConfigured is TRUE.\r |
346 | ///\r | |
2f88bd3a | 347 | EFI_IPv6_ADDRESS *GroupTable;\r |
bce46f7e | 348 | ///\r |
349 | /// Number of entries in the routing table. Undefined until\r | |
bdb140d7 | 350 | /// IsConfigured is TRUE.\r |
351 | ///\r | |
2f88bd3a | 352 | UINT32 RouteCount;\r |
bce46f7e | 353 | ///\r |
bdb140d7 | 354 | /// Routing table entries. It is caller's responsibility to free this buffer.\r |
355 | ///\r | |
2f88bd3a | 356 | EFI_IP6_ROUTE_TABLE *RouteTable;\r |
bdb140d7 | 357 | ///\r |
bce46f7e | 358 | /// Number of entries in the neighbor cache. Undefined until\r |
bdb140d7 | 359 | /// IsConfigured is TRUE.\r |
360 | ///\r | |
2f88bd3a | 361 | UINT32 NeighborCount;\r |
bdb140d7 | 362 | ///\r |
bce46f7e | 363 | /// Neighbor cache entries. It is caller's responsibility to free this\r |
364 | /// buffer. Undefined until IsConfigured is TRUE.\r | |
365 | ///\r | |
2f88bd3a | 366 | EFI_IP6_NEIGHBOR_CACHE *NeighborCache;\r |
bce46f7e | 367 | ///\r |
368 | /// Number of entries in the prefix table. Undefined until\r | |
bdb140d7 | 369 | /// IsConfigured is TRUE.\r |
370 | ///\r | |
2f88bd3a | 371 | UINT32 PrefixCount;\r |
bce46f7e | 372 | ///\r |
373 | /// On-link Prefix table entries. It is caller's responsibility to free this\r | |
374 | /// buffer. Undefined until IsConfigured is TRUE.\r | |
bdb140d7 | 375 | ///\r |
2f88bd3a | 376 | EFI_IP6_ADDRESS_INFO *PrefixTable;\r |
bce46f7e | 377 | ///\r |
bdb140d7 | 378 | /// Number of entries in the supported ICMP types list.\r |
379 | ///\r | |
2f88bd3a | 380 | UINT32 IcmpTypeCount;\r |
bce46f7e | 381 | ///\r |
382 | /// Array of ICMP types and codes that are supported by this EFI\r | |
383 | /// IPv6 Protocol driver. It is caller's responsibility to free this\r | |
bdb140d7 | 384 | /// buffer.\r |
385 | ///\r | |
2f88bd3a | 386 | EFI_IP6_ICMP_TYPE *IcmpTypeList;\r |
bdb140d7 | 387 | } EFI_IP6_MODE_DATA;\r |
388 | \r | |
389 | ///\r | |
390 | /// EFI_IP6_HEADER\r | |
391 | /// The fields in the IPv6 header structure are defined in the Internet\r | |
392 | /// Protocol version6 specification.\r | |
393 | ///\r | |
394 | #pragma pack(1)\r | |
395 | typedef struct _EFI_IP6_HEADER {\r | |
2f88bd3a MK |
396 | UINT8 TrafficClassH : 4;\r |
397 | UINT8 Version : 4;\r | |
398 | UINT8 FlowLabelH : 4;\r | |
399 | UINT8 TrafficClassL : 4;\r | |
400 | UINT16 FlowLabelL;\r | |
401 | UINT16 PayloadLength;\r | |
402 | UINT8 NextHeader;\r | |
403 | UINT8 HopLimit;\r | |
404 | EFI_IPv6_ADDRESS SourceAddress;\r | |
405 | EFI_IPv6_ADDRESS DestinationAddress;\r | |
bdb140d7 | 406 | } EFI_IP6_HEADER;\r |
9591f383 | 407 | #pragma pack()\r |
bdb140d7 | 408 | \r |
409 | ///\r | |
410 | /// EFI_IP6_FRAGMENT_DATA\r | |
bce46f7e | 411 | /// describes the location and length of the IPv6 packet\r |
bdb140d7 | 412 | /// fragment to transmit or that has been received.\r |
413 | ///\r | |
414 | typedef struct _EFI_IP6_FRAGMENT_DATA {\r | |
2f88bd3a MK |
415 | UINT32 FragmentLength; ///< Length of fragment data. This field may not be set to zero.\r |
416 | VOID *FragmentBuffer; ///< Pointer to fragment data. This field may not be set to NULL.\r | |
bdb140d7 | 417 | } EFI_IP6_FRAGMENT_DATA;\r |
418 | \r | |
419 | ///\r | |
420 | /// EFI_IP6_RECEIVE_DATA\r | |
421 | ///\r | |
422 | typedef struct _EFI_IP6_RECEIVE_DATA {\r | |
bce46f7e | 423 | ///\r |
424 | /// Time when the EFI IPv6 Protocol driver accepted the packet.\r | |
bdb140d7 | 425 | /// Ignored if it is zero.\r |
bce46f7e | 426 | ///\r |
2f88bd3a | 427 | EFI_TIME TimeStamp;\r |
bce46f7e | 428 | ///\r |
429 | /// After this event is signaled, the receive data structure is released\r | |
bdb140d7 | 430 | /// and must not be referenced.\r |
bce46f7e | 431 | ///\r |
2f88bd3a | 432 | EFI_EVENT RecycleSignal;\r |
bdb140d7 | 433 | ///\r |
2f88bd3a MK |
434 | /// Length of the IPv6 packet headers, including both the IPv6\r |
435 | /// header and any extension headers.\r | |
bdb140d7 | 436 | ///\r |
2f88bd3a | 437 | UINT32 HeaderLength;\r |
bce46f7e | 438 | ///\r |
439 | /// Pointer to the IPv6 packet header. If the IPv6 packet was\r | |
440 | /// fragmented, this argument is a pointer to the header in the first\r | |
441 | /// fragment.\r | |
442 | ///\r | |
2f88bd3a | 443 | EFI_IP6_HEADER *Header;\r |
bce46f7e | 444 | ///\r |
445 | /// Sum of the lengths of IPv6 packet buffers in FragmentTable. May\r | |
bdb140d7 | 446 | /// be zero.\r |
bce46f7e | 447 | ///\r |
2f88bd3a | 448 | UINT32 DataLength;\r |
bce46f7e | 449 | ///\r |
bdb140d7 | 450 | /// Number of IPv6 payload fragments. May be zero.\r |
bce46f7e | 451 | ///\r |
2f88bd3a | 452 | UINT32 FragmentCount;\r |
bce46f7e | 453 | ///\r |
bdb140d7 | 454 | /// Array of payload fragment lengths and buffer pointers.\r |
bce46f7e | 455 | ///\r |
2f88bd3a | 456 | EFI_IP6_FRAGMENT_DATA FragmentTable[1];\r |
bdb140d7 | 457 | } EFI_IP6_RECEIVE_DATA;\r |
458 | \r | |
459 | ///\r | |
460 | /// EFI_IP6_OVERRIDE_DATA\r | |
bce46f7e | 461 | /// The information and flags in the override data structure will override\r |
462 | /// default parameters or settings for one Transmit() function call.\r | |
bdb140d7 | 463 | ///\r |
464 | typedef struct _EFI_IP6_OVERRIDE_DATA {\r | |
2f88bd3a MK |
465 | UINT8 Protocol; ///< Protocol type override.\r |
466 | UINT8 HopLimit; ///< Hop-Limit override.\r | |
467 | UINT32 FlowLabel; ///< Flow-Label override.\r | |
bdb140d7 | 468 | } EFI_IP6_OVERRIDE_DATA;\r |
bce46f7e | 469 | \r |
bdb140d7 | 470 | ///\r |
bce46f7e | 471 | /// EFI_IP6_TRANSMIT_DATA\r |
bdb140d7 | 472 | ///\r |
bce46f7e | 473 | typedef struct _EFI_IP6_TRANSMIT_DATA {\r |
474 | ///\r | |
475 | /// The destination IPv6 address. If it is unspecified,\r | |
bdb140d7 | 476 | /// ConfigData.DestinationAddress will be used instead.\r |
bce46f7e | 477 | ///\r |
2f88bd3a | 478 | EFI_IPv6_ADDRESS DestinationAddress;\r |
bce46f7e | 479 | ///\r |
bdb140d7 | 480 | /// If not NULL, the IPv6 transmission control override data.\r |
bce46f7e | 481 | ///\r |
2f88bd3a | 482 | EFI_IP6_OVERRIDE_DATA *OverrideData;\r |
bce46f7e | 483 | ///\r |
484 | /// Total length in byte of the IPv6 extension headers specified in\r | |
bdb140d7 | 485 | /// ExtHdrs.\r |
bce46f7e | 486 | ///\r |
2f88bd3a | 487 | UINT32 ExtHdrsLength;\r |
bce46f7e | 488 | ///\r |
489 | /// Pointer to the IPv6 extension headers. The IP layer will append\r | |
490 | /// the required extension headers if they are not specified by\r | |
bdb140d7 | 491 | /// ExtHdrs. Ignored if ExtHdrsLength is zero.\r |
bce46f7e | 492 | ///\r |
2f88bd3a | 493 | VOID *ExtHdrs;\r |
bce46f7e | 494 | ///\r |
495 | /// The protocol of first extension header in ExtHdrs. Ignored if\r | |
bdb140d7 | 496 | /// ExtHdrsLength is zero.\r |
bce46f7e | 497 | ///\r |
2f88bd3a | 498 | UINT8 NextHeader;\r |
bce46f7e | 499 | ///\r |
bdb140d7 | 500 | /// Total length in bytes of the FragmentTable data to transmit.\r |
bce46f7e | 501 | ///\r |
2f88bd3a | 502 | UINT32 DataLength;\r |
bce46f7e | 503 | ///\r |
bdb140d7 | 504 | /// Number of entries in the fragment data table.\r |
bce46f7e | 505 | ///\r |
2f88bd3a | 506 | UINT32 FragmentCount;\r |
bce46f7e | 507 | ///\r |
bdb140d7 | 508 | /// Start of the fragment data table.\r |
bce46f7e | 509 | ///\r |
2f88bd3a | 510 | EFI_IP6_FRAGMENT_DATA FragmentTable[1];\r |
bdb140d7 | 511 | } EFI_IP6_TRANSMIT_DATA;\r |
512 | \r | |
513 | ///\r | |
514 | /// EFI_IP6_COMPLETION_TOKEN\r | |
515 | /// structures are used for both transmit and receive operations.\r | |
516 | ///\r | |
517 | typedef struct {\r | |
518 | ///\r | |
bce46f7e | 519 | /// This Event will be signaled after the Status field is updated by\r |
bdb140d7 | 520 | /// the EFI IPv6 Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r |
521 | ///\r | |
2f88bd3a | 522 | EFI_EVENT Event;\r |
bdb140d7 | 523 | ///\r |
524 | /// Will be set to one of the following values:\r | |
bce46f7e | 525 | /// - EFI_SUCCESS: The receive or transmit completed\r |
bdb140d7 | 526 | /// successfully.\r |
527 | /// - EFI_ABORTED: The receive or transmit was aborted\r | |
528 | /// - EFI_TIMEOUT: The transmit timeout expired.\r | |
529 | /// - EFI_ICMP_ERROR: An ICMP error packet was received.\r | |
bce46f7e | 530 | /// - EFI_DEVICE_ERROR: An unexpected system or network\r |
bdb140d7 | 531 | /// error occurred.\r |
bce46f7e | 532 | /// - EFI_SECURITY_VIOLATION: The transmit or receive was\r |
bdb140d7 | 533 | /// failed because of an IPsec policy check.\r |
c5c3e7e2 | 534 | /// - EFI_NO_MEDIA: There was a media error.\r |
bdb140d7 | 535 | ///\r |
2f88bd3a | 536 | EFI_STATUS Status;\r |
bdb140d7 | 537 | union {\r |
538 | ///\r | |
539 | /// When the Token is used for receiving, RxData is a pointer to the EFI_IP6_RECEIVE_DATA.\r | |
540 | ///\r | |
2f88bd3a | 541 | EFI_IP6_RECEIVE_DATA *RxData;\r |
bdb140d7 | 542 | ///\r |
543 | /// When the Token is used for transmitting, TxData is a pointer to the EFI_IP6_TRANSMIT_DATA.\r | |
544 | ///\r | |
2f88bd3a | 545 | EFI_IP6_TRANSMIT_DATA *TxData;\r |
bdb140d7 | 546 | } Packet;\r |
547 | } EFI_IP6_COMPLETION_TOKEN;\r | |
548 | \r | |
549 | /**\r | |
550 | Gets the current operational settings for this instance of the EFI IPv6 Protocol driver.\r | |
bce46f7e | 551 | \r |
552 | The GetModeData() function returns the current operational mode data for this driver instance.\r | |
553 | The data fields in EFI_IP6_MODE_DATA are read only. This function is used optionally to\r | |
bdb140d7 | 554 | retrieve the operational mode data of underlying networks or drivers..\r |
555 | \r | |
556 | @param[in] This Pointer to the EFI_IP6_PROTOCOL instance.\r | |
557 | @param[out] Ip6ModeData Pointer to the EFI IPv6 Protocol mode data structure.\r | |
558 | @param[out] MnpConfigData Pointer to the managed network configuration data structure.\r | |
559 | @param[out] SnpModeData Pointer to the simple network mode data structure.\r | |
bce46f7e | 560 | \r |
bdb140d7 | 561 | @retval EFI_SUCCESS The operation completed successfully.\r |
562 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
563 | @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.\r | |
564 | \r | |
565 | **/\r | |
bce46f7e | 566 | typedef\r |
bdb140d7 | 567 | EFI_STATUS\r |
5e6f3ee2 | 568 | (EFIAPI *EFI_IP6_GET_MODE_DATA)(\r |
bdb140d7 | 569 | IN EFI_IP6_PROTOCOL *This,\r |
570 | OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL,\r | |
571 | OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,\r | |
572 | OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL\r | |
573 | );\r | |
574 | \r | |
575 | /**\r | |
576 | Assigns an IPv6 address and subnet mask to this EFI IPv6 Protocol driver instance.\r | |
bce46f7e | 577 | \r |
578 | The Configure() function is used to set, change, or reset the operational parameters and filter\r | |
579 | settings for this EFI IPv6 Protocol instance. Until these parameters have been set, no network traffic\r | |
580 | can be sent or received by this instance. Once the parameters have been reset (by calling this\r | |
581 | function with Ip6ConfigData set to NULL), no more traffic can be sent or received until these\r | |
582 | parameters have been set again. Each EFI IPv6 Protocol instance can be started and stopped\r | |
583 | independently of each other by enabling or disabling their receive filter settings with the\r | |
bdb140d7 | 584 | Configure() function.\r |
bce46f7e | 585 | \r |
586 | If Ip6ConfigData.StationAddress is a valid non-zero IPv6 unicast address, it is required\r | |
587 | to be one of the currently configured IPv6 addresses list in the EFI IPv6 drivers, or else\r | |
588 | EFI_INVALID_PARAMETER will be returned. If Ip6ConfigData.StationAddress is\r | |
589 | unspecified, the IPv6 driver will bind a source address according to the source address selection\r | |
590 | algorithm. Clients could frequently call GetModeData() to check get currently configured IPv6\r | |
591 | address list in the EFI IPv6 driver. If both Ip6ConfigData.StationAddress and\r | |
592 | Ip6ConfigData.Destination are unspecified, when transmitting the packet afterwards, the\r | |
bdb140d7 | 593 | source address filled in each outgoing IPv6 packet is decided based on the destination of this packet. .\r |
bce46f7e | 594 | \r |
595 | If operational parameters are reset or changed, any pending transmit and receive requests will be\r | |
596 | cancelled. Their completion token status will be set to EFI_ABORTED and their events will be\r | |
bdb140d7 | 597 | signaled.\r |
598 | \r | |
599 | @param[in] This Pointer to the EFI_IP6_PROTOCOL instance.\r | |
600 | @param[in] Ip6ConfigData Pointer to the EFI IPv6 Protocol configuration data structure.\r | |
bce46f7e | 601 | \r |
bdb140d7 | 602 | @retval EFI_SUCCESS The driver instance was successfully opened.\r |
603 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
604 | - This is NULL.\r | |
bce46f7e | 605 | - Ip6ConfigData.StationAddress is neither zero nor\r |
bdb140d7 | 606 | a unicast IPv6 address.\r |
bce46f7e | 607 | - Ip6ConfigData.StationAddress is neither zero nor\r |
bdb140d7 | 608 | one of the configured IP addresses in the EFI IPv6 driver.\r |
bce46f7e | 609 | - Ip6ConfigData.DefaultProtocol is illegal.\r |
bdb140d7 | 610 | @retval EFI_OUT_OF_RESOURCES The EFI IPv6 Protocol driver instance data could not be allocated.\r |
bce46f7e | 611 | @retval EFI_NO_MAPPING The IPv6 driver was responsible for choosing a source address for\r |
612 | this instance, but no source address was available for use.\r | |
613 | @retval EFI_ALREADY_STARTED The interface is already open and must be stopped before the IPv6\r | |
bdb140d7 | 614 | address or prefix length can be changed.\r |
bce46f7e | 615 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI IPv6\r |
bdb140d7 | 616 | Protocol driver instance is not opened.\r |
bce46f7e | 617 | @retval EFI_UNSUPPORTED Default protocol specified through\r |
bdb140d7 | 618 | Ip6ConfigData.DefaulProtocol isn't supported.\r |
619 | \r | |
620 | **/\r | |
bce46f7e | 621 | typedef\r |
bdb140d7 | 622 | EFI_STATUS\r |
5e6f3ee2 | 623 | (EFIAPI *EFI_IP6_CONFIGURE)(\r |
bdb140d7 | 624 | IN EFI_IP6_PROTOCOL *This,\r |
625 | IN EFI_IP6_CONFIG_DATA *Ip6ConfigData OPTIONAL\r | |
626 | );\r | |
627 | \r | |
628 | /**\r | |
629 | Joins and leaves multicast groups.\r | |
bce46f7e | 630 | \r |
631 | The Groups() function is used to join and leave multicast group sessions. Joining a group will\r | |
632 | enable reception of matching multicast packets. Leaving a group will disable reception of matching\r | |
bdb140d7 | 633 | multicast packets. Source-Specific Multicast isn't required to be supported.\r |
bce46f7e | 634 | \r |
bdb140d7 | 635 | If JoinFlag is FALSE and GroupAddress is NULL, all joined groups will be left.\r |
636 | \r | |
637 | @param[in] This Pointer to the EFI_IP6_PROTOCOL instance.\r | |
638 | @param[in] JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.\r | |
639 | @param[in] GroupAddress Pointer to the IPv6 multicast address.\r | |
bce46f7e | 640 | \r |
bdb140d7 | 641 | @retval EFI_SUCCESS The operation completed successfully.\r |
642 | @retval EFI_INVALID_PARAMETER One or more of the following is TRUE:\r | |
643 | - This is NULL.\r | |
644 | - JoinFlag is TRUE and GroupAddress is NULL.\r | |
645 | - GroupAddress is not NULL and *GroupAddress is\r | |
bce46f7e | 646 | not a multicast IPv6 address.\r |
647 | - GroupAddress is not NULL and *GroupAddress is in the\r | |
bdb140d7 | 648 | range of SSM destination address.\r |
649 | @retval EFI_NOT_STARTED This instance has not been started.\r | |
650 | @retval EFI_OUT_OF_RESOURCES System resources could not be allocated.\r | |
651 | @retval EFI_UNSUPPORTED This EFI IPv6 Protocol implementation does not support multicast groups.\r | |
652 | @retval EFI_ALREADY_STARTED The group address is already in the group table (when\r | |
653 | JoinFlag is TRUE).\r | |
654 | @retval EFI_NOT_FOUND The group address is not in the group table (when JoinFlag is FALSE).\r | |
655 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
656 | \r | |
657 | **/\r | |
bce46f7e | 658 | typedef\r |
bdb140d7 | 659 | EFI_STATUS\r |
5e6f3ee2 | 660 | (EFIAPI *EFI_IP6_GROUPS)(\r |
bdb140d7 | 661 | IN EFI_IP6_PROTOCOL *This,\r |
662 | IN BOOLEAN JoinFlag,\r | |
663 | IN EFI_IPv6_ADDRESS *GroupAddress OPTIONAL\r | |
664 | );\r | |
665 | \r | |
666 | /**\r | |
667 | Adds and deletes routing table entries.\r | |
668 | \r | |
669 | The Routes() function adds a route to or deletes a route from the routing table.\r | |
bce46f7e | 670 | \r |
671 | Routes are determined by comparing the leftmost PrefixLength bits of Destination with\r | |
bdb140d7 | 672 | the destination IPv6 address arithmetically. The gateway address must be on the same subnet as the\r |
673 | configured station address.\r | |
bce46f7e | 674 | \r |
675 | The default route is added with Destination and PrefixLegth both set to all zeros. The\r | |
bdb140d7 | 676 | default route matches all destination IPv6 addresses that do not match any other routes.\r |
677 | \r | |
678 | All EFI IPv6 Protocol instances share a routing table.\r | |
bce46f7e | 679 | \r |
bdb140d7 | 680 | @param[in] This Pointer to the EFI_IP6_PROTOCOL instance.\r |
bce46f7e | 681 | @param[in] DeleteRoute Set to TRUE to delete this route from the routing table. Set to\r |
682 | FALSE to add this route to the routing table. Destination,\r | |
683 | PrefixLength and Gateway are used as the key to each\r | |
bdb140d7 | 684 | route entry.\r |
685 | @param[in] Destination The address prefix of the subnet that needs to be routed.\r | |
bce46f7e | 686 | @param[in] PrefixLength The prefix length of Destination. Ignored if Destination\r |
bdb140d7 | 687 | is NULL.\r |
688 | @param[in] GatewayAddress The unicast gateway IPv6 address for this route.\r | |
689 | \r | |
690 | @retval EFI_SUCCESS The operation completed successfully.\r | |
691 | @retval EFI_NOT_STARTED The driver instance has not been started.\r | |
692 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
693 | - This is NULL.\r | |
bce46f7e | 694 | - When DeleteRoute is TRUE, both Destination and\r |
bdb140d7 | 695 | GatewayAddress are NULL.\r |
bce46f7e | 696 | - When DeleteRoute is FALSE, either Destination or\r |
bdb140d7 | 697 | GatewayAddress is NULL.\r |
698 | - *GatewayAddress is not a valid unicast IPv6 address.\r | |
bce46f7e | 699 | - *GatewayAddress is one of the local configured IPv6\r |
bdb140d7 | 700 | addresses.\r |
701 | @retval EFI_OUT_OF_RESOURCES Could not add the entry to the routing table.\r | |
702 | @retval EFI_NOT_FOUND This route is not in the routing table (when DeleteRoute is TRUE).\r | |
703 | @retval EFI_ACCESS_DENIED The route is already defined in the routing table (when\r | |
704 | DeleteRoute is FALSE).\r | |
bce46f7e | 705 | \r |
bdb140d7 | 706 | **/\r |
bce46f7e | 707 | typedef\r |
bdb140d7 | 708 | EFI_STATUS\r |
5e6f3ee2 | 709 | (EFIAPI *EFI_IP6_ROUTES)(\r |
bdb140d7 | 710 | IN EFI_IP6_PROTOCOL *This,\r |
711 | IN BOOLEAN DeleteRoute,\r | |
5e6f3ee2 | 712 | IN EFI_IPv6_ADDRESS *Destination OPTIONAL,\r |
bdb140d7 | 713 | IN UINT8 PrefixLength,\r |
bce46f7e | 714 | IN EFI_IPv6_ADDRESS *GatewayAddress OPTIONAL\r |
bdb140d7 | 715 | );\r |
716 | \r | |
717 | /**\r | |
718 | Add or delete Neighbor cache entries.\r | |
719 | \r | |
bce46f7e | 720 | The Neighbors() function is used to add, update, or delete an entry from neighbor cache.\r |
721 | IPv6 neighbor cache entries are typically inserted and updated by the network protocol driver as\r | |
722 | network traffic is processed. Most neighbor cache entries will time out and be deleted if the network\r | |
723 | traffic stops. Neighbor cache entries that were inserted by Neighbors() may be static (will not\r | |
bdb140d7 | 724 | timeout) or dynamic (will time out).\r |
bce46f7e | 725 | \r |
726 | The implementation should follow the neighbor cache timeout mechanism which is defined in\r | |
727 | RFC4861. The default neighbor cache timeout value should be tuned for the expected network\r | |
bdb140d7 | 728 | environment\r |
729 | \r | |
730 | @param[in] This Pointer to the EFI_IP6_PROTOCOL instance.\r | |
bce46f7e | 731 | @param[in] DeleteFlag Set to TRUE to delete the specified cache entry, set to FALSE to\r |
732 | add (or update, if it already exists and Override is TRUE) the\r | |
733 | specified cache entry. TargetIp6Address is used as the key\r | |
bdb140d7 | 734 | to find the requested cache entry.\r |
735 | @param[in] TargetIp6Address Pointer to Target IPv6 address.\r | |
bce46f7e | 736 | @param[in] TargetLinkAddress Pointer to link-layer address of the target. Ignored if NULL.\r |
737 | @param[in] Timeout Time in 100-ns units that this entry will remain in the neighbor\r | |
738 | cache, it will be deleted after Timeout. A value of zero means that\r | |
739 | the entry is permanent. A non-zero value means that the entry is\r | |
740 | dynamic.\r | |
741 | @param[in] Override If TRUE, the cached link-layer address of the matching entry will\r | |
742 | be overridden and updated; if FALSE, EFI_ACCESS_DENIED\r | |
bdb140d7 | 743 | will be returned if a corresponding cache entry already existed.\r |
744 | \r | |
745 | @retval EFI_SUCCESS The data has been queued for transmission.\r | |
746 | @retval EFI_NOT_STARTED This instance has not been started.\r | |
747 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
748 | - This is NULL.\r | |
749 | - TargetIpAddress is NULL.\r | |
750 | - *TargetLinkAddress is invalid when not NULL.\r | |
751 | - *TargetIpAddress is not a valid unicast IPv6 address.\r | |
bce46f7e | 752 | - *TargetIpAddress is one of the local configured IPv6\r |
bdb140d7 | 753 | addresses.\r |
754 | @retval EFI_OUT_OF_RESOURCES Could not add the entry to the neighbor cache.\r | |
bce46f7e | 755 | @retval EFI_NOT_FOUND This entry is not in the neighbor cache (when DeleteFlag is\r |
756 | TRUE or when DeleteFlag is FALSE while\r | |
bdb140d7 | 757 | TargetLinkAddress is NULL.).\r |
bce46f7e | 758 | @retval EFI_ACCESS_DENIED The to-be-added entry is already defined in the neighbor cache,\r |
759 | and that entry is tagged as un-overridden (when DeleteFlag\r | |
bdb140d7 | 760 | is FALSE).\r |
761 | \r | |
762 | **/\r | |
bce46f7e | 763 | typedef\r |
bdb140d7 | 764 | EFI_STATUS\r |
5e6f3ee2 | 765 | (EFIAPI *EFI_IP6_NEIGHBORS)(\r |
bdb140d7 | 766 | IN EFI_IP6_PROTOCOL *This,\r |
767 | IN BOOLEAN DeleteFlag,\r | |
768 | IN EFI_IPv6_ADDRESS *TargetIp6Address,\r | |
769 | IN EFI_MAC_ADDRESS *TargetLinkAddress,\r | |
770 | IN UINT32 Timeout,\r | |
771 | IN BOOLEAN Override\r | |
772 | );\r | |
773 | \r | |
774 | /**\r | |
775 | Places outgoing data packets into the transmit queue.\r | |
776 | \r | |
777 | The Transmit() function places a sending request in the transmit queue of this\r | |
778 | EFI IPv6 Protocol instance. Whenever the packet in the token is sent out or some\r | |
779 | errors occur, the event in the token will be signaled and the status is updated.\r | |
780 | \r | |
781 | @param[in] This Pointer to the EFI_IP6_PROTOCOL instance.\r | |
782 | @param[in] Token Pointer to the transmit token.\r | |
783 | \r | |
784 | @retval EFI_SUCCESS The data has been queued for transmission.\r | |
785 | @retval EFI_NOT_STARTED This instance has not been started.\r | |
bce46f7e | 786 | @retval EFI_NO_MAPPING The IPv6 driver was responsible for choosing a source address for\r |
bdb140d7 | 787 | this transmission, but no source address was available for use.\r |
788 | @retval EFI_INVALID_PARAMETER One or more of the following is TRUE:\r | |
789 | - This is NULL.\r | |
790 | - Token is NULL.\r | |
791 | - Token.Event is NULL.\r | |
792 | - Token.Packet.TxData is NULL.\r | |
793 | - Token.Packet.ExtHdrsLength is not zero and Token.Packet.ExtHdrs is NULL.\r | |
794 | - Token.Packet.FragmentCount is zero.\r | |
795 | - One or more of the Token.Packet.TxData.FragmentTable[].FragmentLength fields is zero.\r | |
796 | - One or more of the Token.Packet.TxData.FragmentTable[].FragmentBuffer fields is NULL.\r | |
797 | - Token.Packet.TxData.DataLength is zero or not equal to the sum of fragment lengths.\r | |
bce46f7e | 798 | - Token.Packet.TxData.DestinationAddress is non-zero when DestinationAddress is configured as\r |
bdb140d7 | 799 | non-zero when doing Configure() for this EFI IPv6 protocol instance.\r |
bce46f7e | 800 | - Token.Packet.TxData.DestinationAddress is unspecified when DestinationAddress is unspecified\r |
bdb140d7 | 801 | when doing Configure() for this EFI IPv6 protocol instance.\r |
802 | @retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event\r | |
803 | was already in the transmit queue.\r | |
804 | @retval EFI_NOT_READY The completion token could not be queued because the transmit\r | |
bce46f7e | 805 | queue is full.\r |
bdb140d7 | 806 | @retval EFI_NOT_FOUND Not route is found to destination address.\r |
807 | @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data.\r | |
808 | @retval EFI_BUFFER_TOO_SMALL Token.Packet.TxData.TotalDataLength is too\r | |
809 | short to transmit.\r | |
bce46f7e | 810 | @retval EFI_BAD_BUFFER_SIZE If Token.Packet.TxData.DataLength is beyond the\r |
bdb140d7 | 811 | maximum that which can be described through the Fragment Offset\r |
812 | field in Fragment header when performing fragmentation.\r | |
813 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
814 | \r | |
815 | **/\r | |
bce46f7e | 816 | typedef\r |
bdb140d7 | 817 | EFI_STATUS\r |
5e6f3ee2 | 818 | (EFIAPI *EFI_IP6_TRANSMIT)(\r |
bdb140d7 | 819 | IN EFI_IP6_PROTOCOL *This,\r |
820 | IN EFI_IP6_COMPLETION_TOKEN *Token\r | |
821 | );\r | |
822 | \r | |
823 | /**\r | |
824 | Places a receiving request into the receiving queue.\r | |
bce46f7e | 825 | \r |
bdb140d7 | 826 | The Receive() function places a completion token into the receive packet queue.\r |
827 | This function is always asynchronous.\r | |
bce46f7e | 828 | \r |
bdb140d7 | 829 | The Token.Event field in the completion token must be filled in by the caller\r |
830 | and cannot be NULL. When the receive operation completes, the EFI IPv6 Protocol\r | |
831 | driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event\r | |
832 | is signaled.\r | |
833 | \r | |
834 | @param[in] This Pointer to the EFI_IP6_PROTOCOL instance.\r | |
ea6898b9 | 835 | @param[in] Token Pointer to a token that is associated with the receive data descriptor.\r |
bce46f7e | 836 | \r |
bdb140d7 | 837 | @retval EFI_SUCCESS The receive completion token was cached.\r |
838 | @retval EFI_NOT_STARTED This EFI IPv6 Protocol instance has not been started.\r | |
bce46f7e | 839 | @retval EFI_NO_MAPPING When IP6 driver responsible for binding source address to this instance,\r |
bdb140d7 | 840 | while no source address is available for use.\r |
841 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
842 | - This is NULL.\r | |
843 | - Token is NULL.\r | |
844 | - Token.Event is NULL.\r | |
845 | @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system\r | |
846 | resources (usually memory).\r | |
847 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
848 | The EFI IPv6 Protocol instance has been reset to startup defaults.\r | |
849 | @retval EFI_ACCESS_DENIED The receive completion token with the same Token.Event was already\r | |
850 | in the receive queue.\r | |
851 | @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.\r | |
bce46f7e | 852 | \r |
853 | **/\r | |
854 | typedef\r | |
855 | EFI_STATUS\r | |
856 | (EFIAPI *EFI_IP6_RECEIVE)(\r | |
bdb140d7 | 857 | IN EFI_IP6_PROTOCOL *This,\r |
858 | IN EFI_IP6_COMPLETION_TOKEN *Token\r | |
859 | );\r | |
860 | \r | |
861 | /**\r | |
862 | Abort an asynchronous transmit or receive request.\r | |
bce46f7e | 863 | \r |
bdb140d7 | 864 | The Cancel() function is used to abort a pending transmit or receive request.\r |
865 | If the token is in the transmit or receive request queues, after calling this\r | |
866 | function, Token->Status will be set to EFI_ABORTED and then Token->Event will\r | |
867 | be signaled. If the token is not in one of the queues, which usually means the\r | |
868 | asynchronous operation has completed, this function will not signal the token\r | |
869 | and EFI_NOT_FOUND is returned.\r | |
870 | \r | |
871 | @param[in] This Pointer to the EFI_IP6_PROTOCOL instance.\r | |
872 | @param[in] Token Pointer to a token that has been issued by\r | |
873 | EFI_IP6_PROTOCOL.Transmit() or\r | |
874 | EFI_IP6_PROTOCOL.Receive(). If NULL, all pending\r | |
875 | tokens are aborted. Type EFI_IP6_COMPLETION_TOKEN is\r | |
876 | defined in EFI_IP6_PROTOCOL.Transmit().\r | |
bce46f7e | 877 | \r |
bdb140d7 | 878 | @retval EFI_SUCCESS The asynchronous I/O request was aborted and\r |
879 | Token->Event was signaled. When Token is NULL, all\r | |
880 | pending requests were aborted and their events were signaled.\r | |
881 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
882 | @retval EFI_NOT_STARTED This instance has not been started.\r | |
883 | @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was\r | |
884 | not found in the transmit or receive queue. It has either completed\r | |
885 | or was not issued by Transmit() and Receive().\r | |
886 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
bce46f7e | 887 | \r |
888 | **/\r | |
889 | typedef\r | |
890 | EFI_STATUS\r | |
891 | (EFIAPI *EFI_IP6_CANCEL)(\r | |
bdb140d7 | 892 | IN EFI_IP6_PROTOCOL *This,\r |
893 | IN EFI_IP6_COMPLETION_TOKEN *Token OPTIONAL\r | |
894 | );\r | |
895 | \r | |
896 | /**\r | |
897 | Polls for incoming data packets and processes outgoing data packets.\r | |
bce46f7e | 898 | \r |
bdb140d7 | 899 | The Poll() function polls for incoming data packets and processes outgoing data\r |
900 | packets. Network drivers and applications can call the EFI_IP6_PROTOCOL.Poll()\r | |
901 | function to increase the rate that data packets are moved between the communications\r | |
902 | device and the transmit and receive queues.\r | |
bce46f7e | 903 | \r |
bdb140d7 | 904 | In some systems the periodic timer event may not poll the underlying communications\r |
905 | device fast enough to transmit and/or receive all data packets without missing\r | |
906 | incoming packets or dropping outgoing packets. Drivers and applications that are\r | |
907 | experiencing packet loss should try calling the EFI_IP6_PROTOCOL.Poll() function\r | |
908 | more often.\r | |
909 | \r | |
910 | @param[in] This Pointer to the EFI_IP6_PROTOCOL instance.\r | |
911 | \r | |
912 | @retval EFI_SUCCESS Incoming or outgoing data was processed.\r | |
913 | @retval EFI_NOT_STARTED This EFI IPv6 Protocol instance has not been started.\r | |
914 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
915 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
916 | @retval EFI_NOT_READY No incoming or outgoing data is processed.\r | |
917 | @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.\r | |
918 | Consider increasing the polling rate.\r | |
919 | \r | |
920 | **/\r | |
bce46f7e | 921 | typedef\r |
bdb140d7 | 922 | EFI_STATUS\r |
5e6f3ee2 | 923 | (EFIAPI *EFI_IP6_POLL)(\r |
bdb140d7 | 924 | IN EFI_IP6_PROTOCOL *This\r |
925 | );\r | |
926 | \r | |
927 | ///\r | |
928 | /// The EFI IPv6 Protocol implements a simple packet-oriented interface that can be\r | |
929 | /// used by drivers, daemons, and applications to transmit and receive network packets.\r | |
930 | ///\r | |
5e6f3ee2 | 931 | struct _EFI_IP6_PROTOCOL {\r |
2f88bd3a MK |
932 | EFI_IP6_GET_MODE_DATA GetModeData;\r |
933 | EFI_IP6_CONFIGURE Configure;\r | |
934 | EFI_IP6_GROUPS Groups;\r | |
935 | EFI_IP6_ROUTES Routes;\r | |
936 | EFI_IP6_NEIGHBORS Neighbors;\r | |
937 | EFI_IP6_TRANSMIT Transmit;\r | |
938 | EFI_IP6_RECEIVE Receive;\r | |
939 | EFI_IP6_CANCEL Cancel;\r | |
940 | EFI_IP6_POLL Poll;\r | |
5e6f3ee2 | 941 | };\r |
bdb140d7 | 942 | \r |
2f88bd3a MK |
943 | extern EFI_GUID gEfiIp6ServiceBindingProtocolGuid;\r |
944 | extern EFI_GUID gEfiIp6ProtocolGuid;\r | |
bdb140d7 | 945 | \r |
946 | #endif\r |