2
Implementation of EFI_IP6_PROTOCOL protocol interfaces and type definitions.
4
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
6
This program and the accompanying materials
7
are licensed and made available under the terms and conditions of the BSD License
8
which accompanies this distribution. The full text of the license may be found at
9
http://opensource.org/licenses/bsd-license.php.
11
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16
#ifndef __EFI_IP6_IMPL_H__
17
#define __EFI_IP6_IMPL_H__
21
#include <Protocol/ServiceBinding.h>
22
#include <Protocol/ManagedNetwork.h>
23
#include <Protocol/IpSec.h>
24
#include <Protocol/Ip6.h>
25
#include <Protocol/Ip6Config.h>
26
#include <Protocol/Dhcp6.h>
27
#include <Protocol/DevicePath.h>
28
#include <Protocol/HiiConfigRouting.h>
29
#include <Protocol/HiiConfigAccess.h>
31
#include <Library/DebugLib.h>
32
#include <Library/UefiBootServicesTableLib.h>
33
#include <Library/UefiRuntimeServicesTableLib.h>
34
#include <Library/BaseLib.h>
35
#include <Library/UefiLib.h>
36
#include <Library/NetLib.h>
37
#include <Library/BaseMemoryLib.h>
38
#include <Library/MemoryAllocationLib.h>
39
#include <Library/DpcLib.h>
40
#include <Library/HiiLib.h>
41
#include <Library/UefiHiiServicesLib.h>
42
#include <Library/DevicePathLib.h>
43
#include <Library/PrintLib.h>
45
#include <Guid/MdeModuleHii.h>
47
#include "Ip6Common.h"
48
#include "Ip6Driver.h"
54
#include "Ip6Option.h"
55
#include "Ip6Output.h"
57
#include "Ip6ConfigNv.h"
58
#include "Ip6ConfigImpl.h"
60
#define IP6_PROTOCOL_SIGNATURE SIGNATURE_32 ('I', 'P', '6', 'P')
61
#define IP6_SERVICE_SIGNATURE SIGNATURE_32 ('I', 'P', '6', 'S')
64
// The state of IP6 protocol. It starts from UNCONFIGED. if it is
65
// successfully configured, it goes to CONFIGED. if configure NULL
66
// is called, it becomes UNCONFIGED again. If (partly) destroyed, it
69
#define IP6_STATE_UNCONFIGED 0
70
#define IP6_STATE_CONFIGED 1
71
#define IP6_STATE_DESTROY 2
74
// The state of IP6 service. It starts from UNSTARTED. It transits
75
// to STARTED if autoconfigure is started. If default address is
76
// configured, it becomes CONFIGED. and if partly destroyed, it goes
79
#define IP6_SERVICE_UNSTARTED 0
80
#define IP6_SERVICE_STARTED 1
81
#define IP6_SERVICE_CONFIGED 2
82
#define IP6_SERVICE_DESTROY 3
84
#define IP6_INSTANCE_FROM_PROTOCOL(Ip6) \
85
CR ((Ip6), IP6_PROTOCOL, Ip6Proto, IP6_PROTOCOL_SIGNATURE)
87
#define IP6_SERVICE_FROM_PROTOCOL(Sb) \
88
CR ((Sb), IP6_SERVICE, ServiceBinding, IP6_SERVICE_SIGNATURE)
90
#define IP6_NO_MAPPING(IpInstance) (!(IpInstance)->Interface->Configured)
92
extern EFI_IPSEC2_PROTOCOL *mIpSec;
95
// IP6_TXTOKEN_WRAP wraps the upper layer's transmit token.
96
// The user's data is kept in the Packet. When fragment is
97
// needed, each fragment of the Packet has a reference to the
98
// Packet, no data is actually copied. The Packet will be
99
// released when all the fragments of it have been recycled by
100
// MNP. Upon then, the IP6_TXTOKEN_WRAP will be released, and
101
// user's event signalled.
104
IP6_PROTOCOL *IpInstance;
105
EFI_IP6_COMPLETION_TOKEN *Token;
106
EFI_EVENT IpSecRecycleSignal;
113
EFI_EVENT IpSecRecycleSignal;
118
// IP6_RXDATA_WRAP wraps the data IP6 child delivers to the
119
// upper layers. The received packet is kept in the Packet.
120
// The Packet itself may be constructured from some fragments.
121
// All the fragments of the Packet is organized by a
122
// IP6_ASSEMBLE_ENTRY structure. If the Packet is recycled by
123
// the upper layer, the assemble entry and its associated
124
// fragments will be freed at last.
128
IP6_PROTOCOL *IpInstance;
130
EFI_IP6_RECEIVE_DATA RxData;
133
struct _IP6_PROTOCOL {
136
EFI_IP6_PROTOCOL Ip6Proto;
140
IP6_SERVICE *Service;
141
LIST_ENTRY Link; // Link to all the IP protocol from the service
143
UINT8 PrefixLength; // PrefixLength of the configured station address.
145
// User's transmit/receive tokens, and received/deliverd packets
148
NET_MAP TxTokens; // map between (User's Token, IP6_TXTOKE_WRAP)
149
LIST_ENTRY Received; // Received but not delivered packet
150
LIST_ENTRY Delivered; // Delivered and to be recycled packets
151
EFI_LOCK RecycleLock;
153
IP6_INTERFACE *Interface;
154
LIST_ENTRY AddrLink; // Ip instances with the same IP address.
156
EFI_IPv6_ADDRESS *GroupList; // stored in network order.
159
EFI_IP6_CONFIG_DATA ConfigData;
162
struct _IP6_SERVICE {
164
EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;
169
// List of all the IP instances and interfaces, and default
170
// interface and route table and caches.
175
LIST_ENTRY Interfaces;
177
IP6_INTERFACE *DefaultInterface;
178
IP6_ROUTE_TABLE *RouteTable;
180
IP6_LINK_RX_TOKEN RecvRequest;
183
// Ip reassemble utilities and MLD data
185
IP6_ASSEMBLE_TABLE Assemble;
186
IP6_MLD_SERVICE_DATA MldCtrl;
188
EFI_IPv6_ADDRESS LinkLocalAddr;
190
BOOLEAN LinkLocalDadFail;
191
BOOLEAN Dhcp6NeedStart;
192
BOOLEAN Dhcp6NeedInfoRequest;
199
UINT32 BaseReachableTime;
200
UINT32 ReachableTime;
202
LIST_ENTRY NeighborTable;
204
LIST_ENTRY OnlinkPrefix;
205
LIST_ENTRY AutonomousPrefix;
207
LIST_ENTRY DefaultRouterList;
210
UINT8 InterfaceIdLen;
213
BOOLEAN RouterAdvertiseReceived;
218
// Low level protocol used by this service instance
221
EFI_HANDLE Controller;
223
EFI_HANDLE MnpChildHandle;
224
EFI_MANAGED_NETWORK_PROTOCOL *Mnp;
226
EFI_MANAGED_NETWORK_CONFIG_DATA MnpConfigData;
227
EFI_SIMPLE_NETWORK_MODE SnpMode;
230
EFI_EVENT FasterTimer;
233
// IPv6 Configuration Protocol instance
235
IP6_CONFIG_INSTANCE Ip6ConfigInstance;
238
// The string representation of the current mac address of the
239
// NIC this IP6_SERVICE works on.
242
UINT32 MaxPacketSize;
243
UINT32 OldMaxPacketSize;
247
The callback function for the net buffer which wraps the user's
248
transmit token. Although this function seems simple,
249
there are some subtle aspects.
250
When a user requests the IP to transmit a packet by passing it a
251
token, the token is wrapped in an IP6_TXTOKEN_WRAP and the data
252
is wrapped in a net buffer. The net buffer's Free function is
253
set to Ip6FreeTxToken. The Token and token wrap are added to the
254
IP child's TxToken map. Then the buffer is passed to Ip6Output for
255
transmission. If an error occurs before that, the buffer
256
is freed, which in turn frees the token wrap. The wrap may
257
have been added to the TxToken map or not, and the user's event
258
shouldn't be signaled because we are still in the EfiIp6Transmit. If
259
the buffer has been sent by Ip6Output, it should be removed from
260
the TxToken map and the user's event signaled. The token wrap and buffer
261
are bound together. Refer to the comments in Ip6Output for information
262
about IP fragmentation.
264
@param[in] Context The token's wrap.
274
Config the MNP parameter used by IP. The IP driver use one MNP
275
child to transmit/receive frames. By default, it configures MNP
276
to receive unicast/multicast/broadcast. And it will enable/disable
277
the promiscuous receive according to whether there is IP child
278
enable that or not. If Force is FALSE, it will iterate through
279
all the IP children to check whether the promiscuous receive
280
setting has been changed. If it hasn't been changed, it won't
281
reconfigure the MNP. If Force is TRUE, the MNP is configured
282
whether that is changed or not.
284
@param[in] IpSb The IP6 service instance that is to be changed.
285
@param[in] Force Force the configuration or not.
287
@retval EFI_SUCCESS The MNP successfully configured/reconfigured.
288
@retval Others The configuration failed.
292
Ip6ServiceConfigMnp (
293
IN IP6_SERVICE *IpSb,
298
Cancel the user's receive/transmit request. It is the worker function of
301
@param[in] IpInstance The IP6 child.
302
@param[in] Token The token to cancel. If NULL, all tokens will be
305
@retval EFI_SUCCESS The token was cancelled.
306
@retval EFI_NOT_FOUND The token isn't found on either the
307
transmit or receive queue.
308
@retval EFI_DEVICE_ERROR Not all tokens are cancelled when Token is NULL.
313
IN IP6_PROTOCOL *IpInstance,
314
IN EFI_IP6_COMPLETION_TOKEN *Token OPTIONAL
318
Initialize the IP6_PROTOCOL structure to the unconfigured states.
320
@param[in] IpSb The IP6 service instance.
321
@param[in, out] IpInstance The IP6 child instance.
326
IN IP6_SERVICE *IpSb,
327
IN OUT IP6_PROTOCOL *IpInstance
331
Clean up the IP6 child, release all the resources used by it.
333
@param[in, out] IpInstance The IP6 child to clean up.
335
@retval EFI_SUCCESS The IP6 child was cleaned up
336
@retval EFI_DEVICE_ERROR Some resources failed to be released.
341
IN OUT IP6_PROTOCOL *IpInstance
345
// EFI_IP6_PROTOCOL interface prototypes
349
Gets the current operational settings for this instance of the EFI IPv6 Protocol driver.
351
The GetModeData() function returns the current operational mode data for this driver instance.
352
The data fields in EFI_IP6_MODE_DATA are read only. This function is used optionally to
353
retrieve the operational mode data of underlying networks or drivers.
355
@param[in] This The pointer to the EFI_IP6_PROTOCOL instance.
356
@param[out] Ip6ModeData The pointer to the EFI IPv6 Protocol mode data structure.
357
@param[out] MnpConfigData The pointer to the managed network configuration data structure.
358
@param[out] SnpModeData The pointer to the simple network mode data structure.
360
@retval EFI_SUCCESS The operation completed successfully.
361
@retval EFI_INVALID_PARAMETER This is NULL.
362
@retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.
368
IN EFI_IP6_PROTOCOL *This,
369
OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL,
370
OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
371
OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
375
Assigns an IPv6 address and subnet mask to this EFI IPv6 Protocol driver instance.
377
The Configure() function is used to set, change, or reset the operational parameters and filter
378
settings for this EFI IPv6 Protocol instance. Until these parameters have been set, no network traffic
379
can be sent or received by this instance. Once the parameters have been reset (by calling this
380
function with Ip6ConfigData set to NULL), no more traffic can be sent or received until these
381
parameters have been set again. Each EFI IPv6 Protocol instance can be started and stopped
382
independently of each other by enabling or disabling their receive filter settings with the
383
Configure() function.
385
If Ip6ConfigData.StationAddress is a valid non-zero IPv6 unicast address, it is required
386
to be one of the currently configured IPv6 addresses list in the EFI IPv6 drivers, or else
387
EFI_INVALID_PARAMETER will be returned. If Ip6ConfigData.StationAddress is
388
unspecified, the IPv6 driver will bind a source address according to the source address selection
389
algorithm. Clients could frequently call GetModeData() to check get a currently configured IPv6.
390
If both Ip6ConfigData.StationAddress and Ip6ConfigData.Destination are unspecified, when
391
transmitting the packet afterwards, the source address filled in each outgoing IPv6 packet
392
is decided based on the destination of this packet.
394
If operational parameters are reset or changed, any pending transmit and receive requests will be
395
cancelled. Their completion token status will be set to EFI_ABORTED, and their events will be
398
@param[in] This The pointer to the EFI_IP6_PROTOCOL instance.
399
@param[in] Ip6ConfigData The pointer to the EFI IPv6 Protocol configuration data structure.
400
If NULL, reset the configuration data.
402
@retval EFI_SUCCESS The driver instance was successfully opened.
403
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
405
- Ip6ConfigData.StationAddress is neither zero nor
406
a unicast IPv6 address.
407
- Ip6ConfigData.StationAddress is neither zero nor
408
one of the configured IP addresses in the EFI IPv6 driver.
409
- Ip6ConfigData.DefaultProtocol is illegal.
410
@retval EFI_OUT_OF_RESOURCES The EFI IPv6 Protocol driver instance data could not be allocated.
411
@retval EFI_NO_MAPPING The IPv6 driver was responsible for choosing a source address for
412
this instance, but no source address was available for use.
413
@retval EFI_ALREADY_STARTED The interface is already open and must be stopped before the IPv6
414
address or prefix length can be changed.
415
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI IPv6
416
Protocol driver instance was not opened.
417
@retval EFI_UNSUPPORTED Default protocol specified through
418
Ip6ConfigData.DefaulProtocol isn't supported.
424
IN EFI_IP6_PROTOCOL *This,
425
IN EFI_IP6_CONFIG_DATA *Ip6ConfigData OPTIONAL
429
Joins and leaves multicast groups.
431
The Groups() function is used to join and leave multicast group sessions. Joining a group will
432
enable reception of matching multicast packets. Leaving a group will disable reception of matching
433
multicast packets. Source-Specific Multicast isn't required to be supported.
435
If JoinFlag is FALSE and GroupAddress is NULL, all joined groups will be left.
437
@param[in] This The pointer to the EFI_IP6_PROTOCOL instance.
438
@param[in] JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
439
@param[in] GroupAddress The pointer to the IPv6 multicast address.
440
This is an optional parameter that may be NULL.
442
@retval EFI_SUCCESS The operation completed successfully.
443
@retval EFI_INVALID_PARAMETER One or more of the following is TRUE:
445
- JoinFlag is TRUE and GroupAddress is NULL.
446
- GroupAddress is not NULL and *GroupAddress is
447
not a multicast IPv6 address.
448
- GroupAddress is not NULL and *GroupAddress is in the
449
range of SSM destination address.
450
@retval EFI_NOT_STARTED This instance has not been started.
451
@retval EFI_OUT_OF_RESOURCES System resources could not be allocated.
452
@retval EFI_UNSUPPORTED This EFI IPv6 Protocol implementation does not support multicast groups.
453
@retval EFI_ALREADY_STARTED The group address is already in the group table (when
455
@retval EFI_NOT_FOUND The group address is not in the group table (when JoinFlag is FALSE).
456
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
462
IN EFI_IP6_PROTOCOL *This,
464
IN EFI_IPv6_ADDRESS *GroupAddress OPTIONAL
468
Adds and deletes routing table entries.
470
The Routes() function adds a route to or deletes a route from the routing table.
472
Routes are determined by comparing the leftmost PrefixLength bits of Destination with
473
the destination IPv6 address arithmetically. The gateway address must be on the same subnet as the
474
configured station address.
476
The default route is added with Destination and PrefixLegth both set to all zeros. The
477
default route matches all destination IPv6 addresses that do not match any other routes.
479
All EFI IPv6 Protocol instances share a routing table.
481
@param[in] This The pointer to the EFI_IP6_PROTOCOL instance.
482
@param[in] DeleteRoute Set to TRUE to delete this route from the routing table. Set to
483
FALSE to add this route to the routing table. Destination,
484
PrefixLength and Gateway are used as the key to each
486
@param[in] Destination The address prefix of the subnet that needs to be routed.
487
This is an optional parameter that may be NULL.
488
@param[in] PrefixLength The prefix length of Destination. Ignored if Destination
490
@param[in] GatewayAddress The unicast gateway IPv6 address for this route.
491
This is an optional parameter that may be NULL.
493
@retval EFI_SUCCESS The operation completed successfully.
494
@retval EFI_NOT_STARTED The driver instance has not been started.
495
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
497
- When DeleteRoute is TRUE, both Destination and
498
GatewayAddress are NULL.
499
- When DeleteRoute is FALSE, either Destination or
500
GatewayAddress is NULL.
501
- *GatewayAddress is not a valid unicast IPv6 address.
502
- *GatewayAddress is one of the local configured IPv6
504
@retval EFI_OUT_OF_RESOURCES Could not add the entry to the routing table.
505
@retval EFI_NOT_FOUND This route is not in the routing table (when DeleteRoute is TRUE).
506
@retval EFI_ACCESS_DENIED The route is already defined in the routing table (when
507
DeleteRoute is FALSE).
513
IN EFI_IP6_PROTOCOL *This,
514
IN BOOLEAN DeleteRoute,
515
IN EFI_IPv6_ADDRESS *Destination OPTIONAL,
516
IN UINT8 PrefixLength,
517
IN EFI_IPv6_ADDRESS *GatewayAddress OPTIONAL
521
Add or delete Neighbor cache entries.
523
The Neighbors() function is used to add, update, or delete an entry from a neighbor cache.
524
IPv6 neighbor cache entries are typically inserted and updated by the network protocol driver as
525
network traffic is processed. Most neighbor cache entries will timeout and be deleted if the network
526
traffic stops. Neighbor cache entries that were inserted by Neighbors() may be static (will not
527
timeout) or dynamic (will timeout).
529
The implementation should follow the neighbor cache timeout mechanism defined in
530
RFC4861. The default neighbor cache timeout value should be tuned for the expected network
533
@param[in] This The pointer to the EFI_IP6_PROTOCOL instance.
534
@param[in] DeleteFlag Set to TRUE to delete the specified cache entry. Set to FALSE to
535
add (or update, if it already exists and Override is TRUE) the
536
specified cache entry. TargetIp6Address is used as the key
537
to find the requested cache entry.
538
@param[in] TargetIp6Address The pointer to the Target IPv6 address.
539
@param[in] TargetLinkAddress The pointer to link-layer address of the target. Ignored if NULL.
540
@param[in] Timeout Time in 100-ns units that this entry will remain in the neighbor
541
cache, it will be deleted after Timeout. A value of zero means that
542
the entry is permanent. A non-zero value means that the entry is
544
@param[in] Override If TRUE, the cached link-layer address of the matching entry will
545
be overridden and updated; if FALSE, EFI_ACCESS_DENIED
546
will be returned if a corresponding cache entry already exists.
548
@retval EFI_SUCCESS The data has been queued for transmission.
549
@retval EFI_NOT_STARTED This instance has not been started.
550
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
552
- TargetIpAddress is NULL.
553
- *TargetLinkAddress is invalid when not NULL.
554
- *TargetIpAddress is not a valid unicast IPv6 address.
555
- *TargetIpAddress is one of the local configured IPv6
557
@retval EFI_OUT_OF_RESOURCES Could not add the entry to the neighbor cache.
558
@retval EFI_NOT_FOUND This entry is not in the neighbor cache (when DeleteFlag is
559
TRUE or when DeleteFlag is FALSE while
560
TargetLinkAddress is NULL.).
561
@retval EFI_ACCESS_DENIED The to-be-added entry is already defined in the neighbor cache,
562
and that entry is tagged as un-overridden (when Override
569
IN EFI_IP6_PROTOCOL *This,
570
IN BOOLEAN DeleteFlag,
571
IN EFI_IPv6_ADDRESS *TargetIp6Address,
572
IN EFI_MAC_ADDRESS *TargetLinkAddress OPTIONAL,
578
Places outgoing data packets into the transmit queue.
580
The Transmit() function places a sending request in the transmit queue of this
581
EFI IPv6 Protocol instance. Whenever the packet in the token is sent out or some
582
errors occur, the event in the token will be signaled and the status is updated.
584
@param[in] This The pointer to the EFI_IP6_PROTOCOL instance.
585
@param[in] Token The pointer to the transmit token.
587
@retval EFI_SUCCESS The data has been queued for transmission.
588
@retval EFI_NOT_STARTED This instance has not been started.
589
@retval EFI_NO_MAPPING The IPv6 driver was responsible for choosing
590
a source address for this transmission,
591
but no source address was available for use.
592
@retval EFI_INVALID_PARAMETER One or more of the following is TRUE:
595
- Token.Event is NULL.
596
- Token.Packet.TxData is NULL.
597
- Token.Packet.ExtHdrsLength is not zero and
598
Token.Packet.ExtHdrs is NULL.
599
- Token.Packet.FragmentCount is zero.
600
- One or more of the Token.Packet.TxData.
601
FragmentTable[].FragmentLength fields is zero.
602
- One or more of the Token.Packet.TxData.
603
FragmentTable[].FragmentBuffer fields is NULL.
604
- Token.Packet.TxData.DataLength is zero or not
605
equal to the sum of fragment lengths.
606
- Token.Packet.TxData.DestinationAddress is non-
607
zero when DestinationAddress is configured as
608
non-zero when doing Configure() for this
609
EFI IPv6 protocol instance.
610
- Token.Packet.TxData.DestinationAddress is
611
unspecified when DestinationAddress is unspecified
612
when doing Configure() for this EFI IPv6 protocol
614
@retval EFI_ACCESS_DENIED The transmit completion token with the same Token.
615
The event was already in the transmit queue.
616
@retval EFI_NOT_READY The completion token could not be queued because
617
the transmit queue is full.
618
@retval EFI_NOT_FOUND Not route is found to the destination address.
619
@retval EFI_OUT_OF_RESOURCES Could not queue the transmit data.
620
@retval EFI_BUFFER_TOO_SMALL Token.Packet.TxData.TotalDataLength is too
622
@retval EFI_BAD_BUFFER_SIZE If Token.Packet.TxData.DataLength is beyond the
623
maximum that which can be described through the
624
Fragment Offset field in Fragment header when
625
performing fragmentation.
626
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
632
IN EFI_IP6_PROTOCOL *This,
633
IN EFI_IP6_COMPLETION_TOKEN *Token
637
Places a receiving request into the receiving queue.
639
The Receive() function places a completion token into the receive packet queue.
640
This function is always asynchronous.
642
The Token.Event field in the completion token must be filled in by the caller
643
and cannot be NULL. When the receive operation completes, the EFI IPv6 Protocol
644
driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event
647
Current Udp implementation creates an IP child for each Udp child.
648
It initates a asynchronous receive immediately whether or not
649
there is no mapping. Therefore, disable the returning EFI_NO_MAPPING for now.
650
To enable it, the following check must be performed:
652
if (NetIp6IsUnspecifiedAddr (&Config->StationAddress) && IP6_NO_MAPPING (IpInstance)) {
653
Status = EFI_NO_MAPPING;
657
@param[in] This The pointer to the EFI_IP6_PROTOCOL instance.
658
@param[in] Token The pointer to a token that is associated with the
659
receive data descriptor.
661
@retval EFI_SUCCESS The receive completion token was cached.
662
@retval EFI_NOT_STARTED This EFI IPv6 Protocol instance has not been started.
663
@retval EFI_NO_MAPPING When IP6 driver responsible for binding source address to this instance,
664
while no source address is available for use.
665
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
668
- Token.Event is NULL.
669
@retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system
670
resources (usually memory).
671
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
672
The EFI IPv6 Protocol instance has been reset to startup defaults.
673
@retval EFI_ACCESS_DENIED The receive completion token with the same Token.Event was already
674
in the receive queue.
675
@retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.
681
IN EFI_IP6_PROTOCOL *This,
682
IN EFI_IP6_COMPLETION_TOKEN *Token
686
Abort an asynchronous transmit or receive request.
688
The Cancel() function is used to abort a pending transmit or receive request.
689
If the token is in the transmit or receive request queues, after calling this
690
function, Token->Status will be set to EFI_ABORTED, and then Token->Event will
691
be signaled. If the token is not in one of the queues, which usually means the
692
asynchronous operation has completed, this function will not signal the token,
693
and EFI_NOT_FOUND is returned.
695
@param[in] This The pointer to the EFI_IP6_PROTOCOL instance.
696
@param[in] Token The pointer to a token that has been issued by
697
EFI_IP6_PROTOCOL.Transmit() or
698
EFI_IP6_PROTOCOL.Receive(). If NULL, all pending
699
tokens are aborted. Type EFI_IP6_COMPLETION_TOKEN is
700
defined in EFI_IP6_PROTOCOL.Transmit().
702
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
703
Token->Event was signaled. When Token is NULL, all
704
pending requests were aborted, and their events were signaled.
705
@retval EFI_INVALID_PARAMETER This is NULL.
706
@retval EFI_NOT_STARTED This instance has not been started.
707
@retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was
708
not found in the transmit or receive queue. It has either completed
709
or was not issued by Transmit() and Receive().
710
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
716
IN EFI_IP6_PROTOCOL *This,
717
IN EFI_IP6_COMPLETION_TOKEN *Token OPTIONAL
721
Polls for incoming data packets and processes outgoing data packets.
723
The Poll() function polls for incoming data packets and processes outgoing data
724
packets. Network drivers and applications can call the EFI_IP6_PROTOCOL.Poll()
725
function to increase the rate that data packets are moved between the communications
726
device and the transmit and receive queues.
728
In some systems the periodic timer event may not poll the underlying communications
729
device fast enough to transmit and/or receive all data packets without missing
730
incoming packets or dropping outgoing packets. Drivers and applications that are
731
experiencing packet loss should try calling the EFI_IP6_PROTOCOL.Poll() function
734
@param[in] This The pointer to the EFI_IP6_PROTOCOL instance.
736
@retval EFI_SUCCESS Incoming or outgoing data was processed.
737
@retval EFI_NOT_STARTED This EFI IPv6 Protocol instance has not been started.
738
@retval EFI_INVALID_PARAMETER This is NULL.
739
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
740
@retval EFI_NOT_READY No incoming or outgoing data was processed.
741
@retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
742
Consider increasing the polling rate.
748
IN EFI_IP6_PROTOCOL *This