|
typedef struct _EFI_IP6_PROTOCOL | EFI_IP6_PROTOCOL |
|
typedef struct _EFI_IP6_HEADER | EFI_IP6_HEADER |
|
typedef struct
_EFI_IP6_FRAGMENT_DATA | EFI_IP6_FRAGMENT_DATA |
|
typedef struct
_EFI_IP6_RECEIVE_DATA | EFI_IP6_RECEIVE_DATA |
|
typedef struct
_EFI_IP6_OVERRIDE_DATA | EFI_IP6_OVERRIDE_DATA |
|
typedef struct
_EFI_IP6_TRANSMIT_DATA | EFI_IP6_TRANSMIT_DATA |
|
typedef EFI_STATUS(EFIAPI * | EFI_IP6_GET_MODE_DATA )(IN EFI_IP6_PROTOCOL *This, OUT EFI_IP6_MODE_DATA *Ip6ModeData, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData) |
|
typedef EFI_STATUS(EFIAPI * | EFI_IP6_CONFIGURE )(IN EFI_IP6_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA *Ip6ConfigData) |
|
typedef EFI_STATUS(EFIAPI * | EFI_IP6_GROUPS )(IN EFI_IP6_PROTOCOL *This, IN BOOLEAN JoinFlag, IN EFI_IPv6_ADDRESS *GroupAddress) |
|
typedef EFI_STATUS(EFIAPI * | EFI_IP6_ROUTES )(IN EFI_IP6_PROTOCOL *This, IN BOOLEAN DeleteRoute, IN EFI_IPv6_ADDRESS *Destination, IN UINT8 PrefixLength, IN EFI_IPv6_ADDRESS *GatewayAddress) |
|
typedef EFI_STATUS(EFIAPI * | EFI_IP6_NEIGHBORS )(IN EFI_IP6_PROTOCOL *This, IN BOOLEAN DeleteFlag, IN EFI_IPv6_ADDRESS *TargetIp6Address, IN EFI_MAC_ADDRESS *TargetLinkAddress, IN UINT32 Timeout, IN BOOLEAN Override) |
|
typedef EFI_STATUS(EFIAPI * | EFI_IP6_TRANSMIT )(IN EFI_IP6_PROTOCOL *This, IN EFI_IP6_COMPLETION_TOKEN *Token) |
|
typedef EFI_STATUS(EFIAPI * | EFI_IP6_RECEIVE )(IN EFI_IP6_PROTOCOL *This, IN EFI_IP6_COMPLETION_TOKEN *Token) |
|
typedef EFI_STATUS(EFIAPI * | EFI_IP6_CANCEL )(IN EFI_IP6_PROTOCOL *This, IN EFI_IP6_COMPLETION_TOKEN *Token) |
|
typedef EFI_STATUS(EFIAPI * | EFI_IP6_POLL )(IN EFI_IP6_PROTOCOL *This) |
|
This file defines the EFI IPv6 (Internet Protocol version 6) Protocol interface. It is split into the following three main sections:
- EFI IPv6 Service Binding Protocol
- EFI IPv6 Variable (deprecated in UEFI 2.4B)
- EFI IPv6 Protocol The EFI IPv6 Protocol provides basic network IPv6 packet I/O services, which includes support for Neighbor Discovery Protocol (ND), Multicast Listener Discovery Protocol (MLD), and a subset of the Internet Control Message Protocol (ICMPv6).
Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
- Revision Reference:
- This Protocol is introduced in UEFI Specification 2.2
Assigns an IPv6 address and subnet mask to this EFI IPv6 Protocol driver instance.
The Configure() function is used to set, change, or reset the operational parameters and filter settings for this EFI IPv6 Protocol instance. Until these parameters have been set, no network traffic can be sent or received by this instance. Once the parameters have been reset (by calling this function with Ip6ConfigData set to NULL), no more traffic can be sent or received until these parameters have been set again. Each EFI IPv6 Protocol instance can be started and stopped independently of each other by enabling or disabling their receive filter settings with the Configure() function.
If Ip6ConfigData.StationAddress is a valid non-zero IPv6 unicast address, it is required to be one of the currently configured IPv6 addresses list in the EFI IPv6 drivers, or else EFI_INVALID_PARAMETER will be returned. If Ip6ConfigData.StationAddress is unspecified, the IPv6 driver will bind a source address according to the source address selection algorithm. Clients could frequently call GetModeData() to check get currently configured IPv6 address list in the EFI IPv6 driver. If both Ip6ConfigData.StationAddress and Ip6ConfigData.Destination are unspecified, when transmitting the packet afterwards, the source address filled in each outgoing IPv6 packet is decided based on the destination of this packet. .
If operational parameters are reset or changed, any pending transmit and receive requests will be cancelled. Their completion token status will be set to EFI_ABORTED and their events will be signaled.
- Parameters
-
[in] | This | Pointer to the EFI_IP6_PROTOCOL instance. |
[in] | Ip6ConfigData | Pointer to the EFI IPv6 Protocol configuration data structure. |
- Return values
-
EFI_SUCCESS | The driver instance was successfully opened. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
- This is NULL.
- Ip6ConfigData.StationAddress is neither zero nor a unicast IPv6 address.
- Ip6ConfigData.StationAddress is neither zero nor one of the configured IP addresses in the EFI IPv6 driver.
- Ip6ConfigData.DefaultProtocol is illegal.
|
EFI_OUT_OF_RESOURCES | The EFI IPv6 Protocol driver instance data could not be allocated. |
EFI_NO_MAPPING | The IPv6 driver was responsible for choosing a source address for this instance, but no source address was available for use. |
EFI_ALREADY_STARTED | The interface is already open and must be stopped before the IPv6 address or prefix length can be changed. |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. The EFI IPv6 Protocol driver instance is not opened. |
EFI_UNSUPPORTED | Default protocol specified through Ip6ConfigData.DefaulProtocol isn't supported. |
Add or delete Neighbor cache entries.
The Neighbors() function is used to add, update, or delete an entry from neighbor cache. IPv6 neighbor cache entries are typically inserted and updated by the network protocol driver as network traffic is processed. Most neighbor cache entries will time out and be deleted if the network traffic stops. Neighbor cache entries that were inserted by Neighbors() may be static (will not timeout) or dynamic (will time out).
The implementation should follow the neighbor cache timeout mechanism which is defined in RFC4861. The default neighbor cache timeout value should be tuned for the expected network environment
- Parameters
-
[in] | This | Pointer to the EFI_IP6_PROTOCOL instance. |
[in] | DeleteFlag | Set to TRUE to delete the specified cache entry, set to FALSE to add (or update, if it already exists and Override is TRUE) the specified cache entry. TargetIp6Address is used as the key to find the requested cache entry. |
[in] | TargetIp6Address | Pointer to Target IPv6 address. |
[in] | TargetLinkAddress | Pointer to link-layer address of the target. Ignored if NULL. |
[in] | Timeout | Time in 100-ns units that this entry will remain in the neighbor cache, it will be deleted after Timeout. A value of zero means that the entry is permanent. A non-zero value means that the entry is dynamic. |
[in] | Override | If TRUE, the cached link-layer address of the matching entry will be overridden and updated; if FALSE, EFI_ACCESS_DENIED will be returned if a corresponding cache entry already existed. |
- Return values
-
EFI_SUCCESS | The data has been queued for transmission. |
EFI_NOT_STARTED | This instance has not been started. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
- This is NULL.
- TargetIpAddress is NULL.
- *TargetLinkAddress is invalid when not NULL.
- *TargetIpAddress is not a valid unicast IPv6 address.
- *TargetIpAddress is one of the local configured IPv6 addresses.
|
EFI_OUT_OF_RESOURCES | Could not add the entry to the neighbor cache. |
EFI_NOT_FOUND | This entry is not in the neighbor cache (when DeleteFlag is TRUE or when DeleteFlag is FALSE while TargetLinkAddress is NULL.). |
EFI_ACCESS_DENIED | The to-be-added entry is already defined in the neighbor cache, and that entry is tagged as un-overridden (when DeleteFlag is FALSE). |
Polls for incoming data packets and processes outgoing data packets.
The Poll() function polls for incoming data packets and processes outgoing data packets. Network drivers and applications can call the EFI_IP6_PROTOCOL.Poll() function to increase the rate that data packets are moved between the communications device and the transmit and receive queues.
In some systems the periodic timer event may not poll the underlying communications device fast enough to transmit and/or receive all data packets without missing incoming packets or dropping outgoing packets. Drivers and applications that are experiencing packet loss should try calling the EFI_IP6_PROTOCOL.Poll() function more often.
- Parameters
-
[in] | This | Pointer to the EFI_IP6_PROTOCOL instance. |
- Return values
-
EFI_SUCCESS | Incoming or outgoing data was processed. |
EFI_NOT_STARTED | This EFI IPv6 Protocol instance has not been started. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. |
EFI_NOT_READY | No incoming or outgoing data is processed. |
EFI_TIMEOUT | Data was dropped out of the transmit and/or receive queue. Consider increasing the polling rate. |
Places a receiving request into the receiving queue.
The Receive() function places a completion token into the receive packet queue. This function is always asynchronous.
The Token.Event field in the completion token must be filled in by the caller and cannot be NULL. When the receive operation completes, the EFI IPv6 Protocol driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event is signaled.
- Parameters
-
[in] | This | Pointer to the EFI_IP6_PROTOCOL instance. |
[in] | Token | Pointer to a token that is associated with the receive data descriptor. |
- Return values
-
EFI_SUCCESS | The receive completion token was cached. |
EFI_NOT_STARTED | This EFI IPv6 Protocol instance has not been started. |
EFI_NO_MAPPING | When IP6 driver responsible for binding source address to this instance, while no source address is available for use. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
- This is NULL.
- Token is NULL.
- Token.Event is NULL.
|
EFI_OUT_OF_RESOURCES | The receive completion token could not be queued due to a lack of system resources (usually memory). |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. The EFI IPv6 Protocol instance has been reset to startup defaults. |
EFI_ACCESS_DENIED | The receive completion token with the same Token.Event was already in the receive queue. |
EFI_NOT_READY | The receive request could not be queued because the receive queue is full. |
Adds and deletes routing table entries.
The Routes() function adds a route to or deletes a route from the routing table.
Routes are determined by comparing the leftmost PrefixLength bits of Destination with the destination IPv6 address arithmetically. The gateway address must be on the same subnet as the configured station address.
The default route is added with Destination and PrefixLegth both set to all zeros. The default route matches all destination IPv6 addresses that do not match any other routes.
All EFI IPv6 Protocol instances share a routing table.
- Parameters
-
[in] | This | Pointer to the EFI_IP6_PROTOCOL instance. |
[in] | DeleteRoute | Set to TRUE to delete this route from the routing table. Set to FALSE to add this route to the routing table. Destination, PrefixLength and Gateway are used as the key to each route entry. |
[in] | Destination | The address prefix of the subnet that needs to be routed. |
[in] | PrefixLength | The prefix length of Destination. Ignored if Destination is NULL. |
[in] | GatewayAddress | The unicast gateway IPv6 address for this route. |
- Return values
-
EFI_SUCCESS | The operation completed successfully. |
EFI_NOT_STARTED | The driver instance has not been started. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
- This is NULL.
- When DeleteRoute is TRUE, both Destination and GatewayAddress are NULL.
- When DeleteRoute is FALSE, either Destination or GatewayAddress is NULL.
- *GatewayAddress is not a valid unicast IPv6 address.
- *GatewayAddress is one of the local configured IPv6 addresses.
|
EFI_OUT_OF_RESOURCES | Could not add the entry to the routing table. |
EFI_NOT_FOUND | This route is not in the routing table (when DeleteRoute is TRUE). |
EFI_ACCESS_DENIED | The route is already defined in the routing table (when DeleteRoute is FALSE). |