TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip6Nd.c File Reference
#include "Ip6Impl.h"

Go to the source code of this file.

Functions

EFI_STATUS Ip6UpdateReachableTime (IN OUT IP6_SERVICE *IpSb)
 
EFI_STATUS Ip6BuildEfiNeighborCache (IN IP6_PROTOCOL *IpInstance, OUT UINT32 *NeighborCount, OUT EFI_IP6_NEIGHBOR_CACHE **NeighborCache)
 
EFI_STATUS Ip6BuildPrefixTable (IN IP6_PROTOCOL *IpInstance, OUT UINT32 *PrefixCount, OUT EFI_IP6_ADDRESS_INFO **PrefixTable)
 
IP6_PREFIX_LIST_ENTRYIp6CreatePrefixListEntry (IN IP6_SERVICE *IpSb, IN BOOLEAN OnLinkOrAuto, IN UINT32 ValidLifetime, IN UINT32 PreferredLifetime, IN UINT8 PrefixLength, IN EFI_IPv6_ADDRESS *Prefix)
 
VOID Ip6DestroyPrefixListEntry (IN IP6_SERVICE *IpSb, IN IP6_PREFIX_LIST_ENTRY *PrefixEntry, IN BOOLEAN OnLinkOrAuto, IN BOOLEAN ImmediateDelete)
 
IP6_PREFIX_LIST_ENTRYIp6FindPrefixListEntry (IN IP6_SERVICE *IpSb, IN BOOLEAN OnLinkOrAuto, IN UINT8 PrefixLength, IN EFI_IPv6_ADDRESS *Prefix)
 
VOID Ip6CleanPrefixListTable (IN IP6_SERVICE *IpSb, IN LIST_ENTRY *ListHead)
 
VOID Ip6OnArpResolved (IN VOID *Context)
 
IP6_NEIGHBOR_ENTRYIp6CreateNeighborEntry (IN IP6_SERVICE *IpSb, IN IP6_ARP_CALLBACK CallBack, IN EFI_IPv6_ADDRESS *Ip6Address, IN EFI_MAC_ADDRESS *LinkAddress OPTIONAL)
 
IP6_NEIGHBOR_ENTRYIp6FindNeighborEntry (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Ip6Address)
 
EFI_STATUS Ip6FreeNeighborEntry (IN IP6_SERVICE *IpSb, IN IP6_NEIGHBOR_ENTRY *NeighborCache, IN BOOLEAN SendIcmpError, IN BOOLEAN FullFree, IN EFI_STATUS IoStatus, IN IP6_FRAME_TO_CANCEL FrameToCancel OPTIONAL, IN VOID *Context OPTIONAL)
 
IP6_DEFAULT_ROUTERIp6CreateDefaultRouter (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Ip6Address, IN UINT16 RouterLifetime)
 
VOID Ip6DestroyDefaultRouter (IN IP6_SERVICE *IpSb, IN IP6_DEFAULT_ROUTER *DefaultRouter)
 
VOID Ip6CleanDefaultRouterList (IN IP6_SERVICE *IpSb)
 
IP6_DEFAULT_ROUTERIp6FindDefaultRouter (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Ip6Address)
 
VOID Ip6OnDADFinished (IN BOOLEAN IsDadPassed, IN IP6_INTERFACE *IpIf, IN IP6_DAD_ENTRY *DadEntry)
 
EFI_STATUS Ip6InitDADProcess (IN IP6_INTERFACE *IpIf, IN IP6_ADDRESS_INFO *AddressInfo, IN IP6_DAD_CALLBACK Callback OPTIONAL, IN VOID *Context OPTIONAL)
 
IP6_DAD_ENTRYIp6FindDADEntry (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Target, OUT IP6_INTERFACE **Interface OPTIONAL)
 
EFI_STATUS Ip6SendRouterSolicit (IN IP6_SERVICE *IpSb, IN IP6_INTERFACE *Interface OPTIONAL, IN EFI_IPv6_ADDRESS *SourceAddress OPTIONAL, IN EFI_IPv6_ADDRESS *DestinationAddress OPTIONAL, IN EFI_MAC_ADDRESS *SourceLinkAddress OPTIONAL)
 
EFI_STATUS Ip6SendNeighborAdvertise (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *SourceAddress, IN EFI_IPv6_ADDRESS *DestinationAddress, IN EFI_IPv6_ADDRESS *TargetIp6Address, IN EFI_MAC_ADDRESS *TargetLinkAddress, IN BOOLEAN IsRouter, IN BOOLEAN Override, IN BOOLEAN Solicited)
 
EFI_STATUS Ip6SendNeighborSolicit (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *SourceAddress, IN EFI_IPv6_ADDRESS *DestinationAddress, IN EFI_IPv6_ADDRESS *TargetIp6Address, IN EFI_MAC_ADDRESS *SourceLinkAddress OPTIONAL)
 
EFI_STATUS Ip6ProcessNeighborSolicit (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
 
EFI_STATUS Ip6ProcessNeighborAdvertise (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
 
EFI_STATUS Ip6ProcessRouterAdvertise (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
 
EFI_STATUS Ip6ProcessRedirect (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
 
EFI_STATUS Ip6AddNeighbor (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *TargetIp6Address, IN EFI_MAC_ADDRESS *TargetLinkAddress OPTIONAL, IN UINT32 Timeout, IN BOOLEAN Override)
 
EFI_STATUS Ip6DelNeighbor (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *TargetIp6Address, IN EFI_MAC_ADDRESS *TargetLinkAddress OPTIONAL, IN UINT32 Timeout, IN BOOLEAN Override)
 
VOID EFIAPI Ip6NdFasterTimerTicking (IN EFI_EVENT Event, IN VOID *Context)
 
VOID Ip6NdTimerTicking (IN IP6_SERVICE *IpSb)
 

Variables

EFI_MAC_ADDRESS mZeroMacAddress
 

Detailed Description

Implementation of Neighbor Discovery support routines.

Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Ip6Nd.c.

Function Documentation

◆ Ip6AddNeighbor()

EFI_STATUS Ip6AddNeighbor ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS TargetIp6Address,
IN EFI_MAC_ADDRESS *TargetLinkAddress  OPTIONAL,
IN UINT32  Timeout,
IN BOOLEAN  Override 
)

Add Neighbor cache entries. It is a work function for EfiIp6Neighbors().

Parameters
[in]IpSbThe IP6 service binding instance.
[in]TargetIp6AddressPointer to Target IPv6 address.
[in]TargetLinkAddressPointer to link-layer address of the target. Ignored if NULL.
[in]TimeoutTime 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]OverrideIf TRUE, the cached link-layer address of the matching entry will be overridden and updated; if FALSE, and if a corresponding cache entry already existed, EFI_ACCESS_DENIED will be returned.
Return values
EFI_SUCCESSThe neighbor cache entry has been added.
EFI_OUT_OF_RESOURCESCould not add the entry to the neighbor cache due to insufficient resources.
EFI_NOT_FOUNDTargetLinkAddress is NULL.
EFI_ACCESS_DENIEDThe to-be-added entry is already defined in the neighbor cache, and that entry is tagged as un-overridden (when DeleteFlag is FALSE).

Definition at line 2703 of file Ip6Nd.c.

◆ Ip6BuildEfiNeighborCache()

EFI_STATUS Ip6BuildEfiNeighborCache ( IN IP6_PROTOCOL IpInstance,
OUT UINT32 *  NeighborCount,
OUT EFI_IP6_NEIGHBOR_CACHE **  NeighborCache 
)

Build a array of EFI_IP6_NEIGHBOR_CACHE to be returned to the caller. The number of EFI_IP6_NEIGHBOR_CACHE is also returned.

Parameters
[in]IpInstanceThe pointer to IP6_PROTOCOL instance.
[out]NeighborCountThe number of returned neighbor cache entries.
[out]NeighborCacheThe pointer to the array of EFI_IP6_NEIGHBOR_CACHE.
Return values
EFI_SUCCESSThe EFI_IP6_NEIGHBOR_CACHE successfully built.
EFI_OUT_OF_RESOURCESFailed to allocate the memory for the route table.

Definition at line 56 of file Ip6Nd.c.

◆ Ip6BuildPrefixTable()

EFI_STATUS Ip6BuildPrefixTable ( IN IP6_PROTOCOL IpInstance,
OUT UINT32 *  PrefixCount,
OUT EFI_IP6_ADDRESS_INFO **  PrefixTable 
)

Build a array of EFI_IP6_ADDRESS_INFO to be returned to the caller. The number of prefix entries is also returned.

Parameters
[in]IpInstanceThe pointer to IP6_PROTOCOL instance.
[out]PrefixCountThe number of returned prefix entries.
[out]PrefixTableThe pointer to the array of PrefixTable.
Return values
EFI_SUCCESSThe prefix table successfully built.
EFI_OUT_OF_RESOURCESFailed to allocate the memory for the prefix table.

Definition at line 122 of file Ip6Nd.c.

◆ Ip6CleanDefaultRouterList()

VOID Ip6CleanDefaultRouterList ( IN IP6_SERVICE IpSb)

Clean an IP6 default router list.

Parameters
[in]IpSbThe pointer to the IP6_SERVICE instance.

Definition at line 765 of file Ip6Nd.c.

◆ Ip6CleanPrefixListTable()

VOID Ip6CleanPrefixListTable ( IN IP6_SERVICE IpSb,
IN LIST_ENTRY ListHead 
)

Release the resource in the prefix list table, and destroy the list entry and corresponding addresses or route entries.

Parameters
[in]IpSbThe pointer to the IP6_SERVICE instance.
[in]ListHeadThe list entry head of the prefix list table.

Definition at line 391 of file Ip6Nd.c.

◆ Ip6CreateDefaultRouter()

IP6_DEFAULT_ROUTER * Ip6CreateDefaultRouter ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS Ip6Address,
IN UINT16  RouterLifetime 
)

Allocate and initialize an IP6 default router entry.

Parameters
[in]IpSbThe pointer to the IP6_SERVICE instance.
[in]Ip6AddressThe IPv6 address of the default router.
[in]RouterLifetimeThe lifetime associated with the default router, in units of seconds.
Returns
NULL if it failed to allocate memory for the default router node. Otherwise, point to the created default router node.

Definition at line 691 of file Ip6Nd.c.

◆ Ip6CreateNeighborEntry()

IP6_NEIGHBOR_ENTRY * Ip6CreateNeighborEntry ( IN IP6_SERVICE IpSb,
IN IP6_ARP_CALLBACK  CallBack,
IN EFI_IPv6_ADDRESS Ip6Address,
IN EFI_MAC_ADDRESS *LinkAddress  OPTIONAL 
)

Allocate and initialize an IP6 neighbor cache entry.

Parameters
[in]IpSbThe pointer to the IP6_SERVICE instance.
[in]CallBackThe callback function to be called when address resolution is finished.
[in]Ip6AddressPoints to the IPv6 address of the neighbor.
[in]LinkAddressPoints to the MAC address of the neighbor. Ignored if NULL.
Returns
NULL if failed to allocate memory for the neighbor cache entry. Otherwise, point to the created neighbor cache entry.

Definition at line 505 of file Ip6Nd.c.

◆ Ip6CreatePrefixListEntry()

IP6_PREFIX_LIST_ENTRY * Ip6CreatePrefixListEntry ( IN IP6_SERVICE IpSb,
IN BOOLEAN  OnLinkOrAuto,
IN UINT32  ValidLifetime,
IN UINT32  PreferredLifetime,
IN UINT8  PrefixLength,
IN EFI_IPv6_ADDRESS Prefix 
)

Allocate and initialize a IP6 prefix list entry.

Parameters
[in]IpSbThe pointer to IP6_SERVICE instance.
[in]OnLinkOrAutoIf TRUE, the entry is created for the on link prefix list. Otherwise, it is created for the autoconfiguration prefix list.
[in]ValidLifetimeThe length of time in seconds that the prefix is valid for the purpose of on-link determination.
[in]PreferredLifetimeThe length of time in seconds that addresses generated from the prefix via stateless address autoconfiguration remain preferred.
[in]PrefixLengthThe prefix length of the Prefix.
[in]PrefixThe prefix address.
Returns
NULL if it failed to allocate memory for the prefix node. Otherwise, point to the created or existing prefix list entry.

Definition at line 191 of file Ip6Nd.c.

◆ Ip6DelNeighbor()

EFI_STATUS Ip6DelNeighbor ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS TargetIp6Address,
IN EFI_MAC_ADDRESS *TargetLinkAddress  OPTIONAL,
IN UINT32  Timeout,
IN BOOLEAN  Override 
)

Delete or update Neighbor cache entries. It is a work function for EfiIp6Neighbors().

Parameters
[in]IpSbThe IP6 service binding instance.
[in]TargetIp6AddressPointer to Target IPv6 address.
[in]TargetLinkAddressPointer to link-layer address of the target. Ignored if NULL.
[in]TimeoutTime 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]OverrideIf TRUE, the cached link-layer address of the matching entry will be overridden and updated; if FALSE, and if a corresponding cache entry already existed, EFI_ACCESS_DENIED will be returned.
Return values
EFI_SUCCESSThe neighbor cache entry has been updated or deleted.
EFI_NOT_FOUNDThis entry is not in the neighbor cache.

Definition at line 2765 of file Ip6Nd.c.

◆ Ip6DestroyDefaultRouter()

VOID Ip6DestroyDefaultRouter ( IN IP6_SERVICE IpSb,
IN IP6_DEFAULT_ROUTER DefaultRouter 
)

Destroy an IP6 default router entry.

Parameters
[in]IpSbThe pointer to the IP6_SERVICE instance.
[in]DefaultRouterThe to be destroyed IP6_DEFAULT_ROUTER.

Definition at line 738 of file Ip6Nd.c.

◆ Ip6DestroyPrefixListEntry()

VOID Ip6DestroyPrefixListEntry ( IN IP6_SERVICE IpSb,
IN IP6_PREFIX_LIST_ENTRY PrefixEntry,
IN BOOLEAN  OnLinkOrAuto,
IN BOOLEAN  ImmediateDelete 
)

Destroy a IP6 prefix list entry.

Parameters
[in]IpSbThe pointer to IP6_SERVICE instance.
[in]PrefixEntryThe to be destroyed prefix list entry.
[in]OnLinkOrAutoIf TRUE, the entry is removed from on link prefix list. Otherwise remove from autoconfiguration prefix list.
[in]ImmediateDeleteIf TRUE, remove the entry directly. Otherwise, check the reference count to see whether it should be removed.

Definition at line 281 of file Ip6Nd.c.

◆ Ip6FindDADEntry()

IP6_DAD_ENTRY * Ip6FindDADEntry ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS Target,
OUT IP6_INTERFACE **Interface  OPTIONAL 
)

Search IP6_DAD_ENTRY from the Duplicate Address Detection List.

Parameters
[in]IpSbThe pointer to the IP6_SERVICE instance.
[in]TargetThe address information which needs DAD performed .
[out]InterfaceIf not NULL, output the IP6 interface that configures the tentative address.
Returns
NULL if failed to find the matching DAD entry. Otherwise, point to the found DAD entry.

Definition at line 1064 of file Ip6Nd.c.

◆ Ip6FindDefaultRouter()

IP6_DEFAULT_ROUTER * Ip6FindDefaultRouter ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS Ip6Address 
)

Search a default router node from an IP6 default router list.

Parameters
[in]IpSbThe pointer to the IP6_SERVICE instance.
[in]Ip6AddressThe IPv6 address of the to be searched default router node.
Returns
NULL if it failed to find the matching default router node. Otherwise, point to the found default router node.

Definition at line 788 of file Ip6Nd.c.

◆ Ip6FindNeighborEntry()

IP6_NEIGHBOR_ENTRY * Ip6FindNeighborEntry ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS Ip6Address 
)

Search a IP6 neighbor cache entry.

Parameters
[in]IpSbThe pointer to the IP6_SERVICE instance.
[in]Ip6AddressPoints to the IPv6 address of the neighbor.
Returns
NULL if it failed to find the matching neighbor cache entry. Otherwise, point to the found neighbor cache entry.

Definition at line 566 of file Ip6Nd.c.

◆ Ip6FindPrefixListEntry()

IP6_PREFIX_LIST_ENTRY * Ip6FindPrefixListEntry ( IN IP6_SERVICE IpSb,
IN BOOLEAN  OnLinkOrAuto,
IN UINT8  PrefixLength,
IN EFI_IPv6_ADDRESS Prefix 
)

Search the list array to find an IP6 prefix list entry.

Parameters
[in]IpSbThe pointer to IP6_SERVICE instance.
[in]OnLinkOrAutoIf TRUE, the search the link prefix list, Otherwise search the autoconfiguration prefix list.
[in]PrefixLengthThe prefix length of the Prefix
[in]PrefixThe prefix address.
Returns
NULL if cannot find the IP6 prefix list entry. Otherwise, return the pointer to the IP6 prefix list entry.

Definition at line 337 of file Ip6Nd.c.

◆ Ip6FreeNeighborEntry()

EFI_STATUS Ip6FreeNeighborEntry ( IN IP6_SERVICE IpSb,
IN IP6_NEIGHBOR_ENTRY NeighborCache,
IN BOOLEAN  SendIcmpError,
IN BOOLEAN  FullFree,
IN EFI_STATUS  IoStatus,
IN IP6_FRAME_TO_CANCEL FrameToCancel  OPTIONAL,
IN VOID *Context  OPTIONAL 
)

Free a IP6 neighbor cache entry and remove all the frames on the address resolution queue that pass the FrameToCancel. That is, either FrameToCancel is NULL, or it returns true for the frame.

Parameters
[in]IpSbThe pointer to the IP6_SERVICE instance.
[in]NeighborCacheThe to be free neighbor cache entry.
[in]SendIcmpErrorIf TRUE, send out ICMP error.
[in]FullFreeIf TRUE, remove the neighbor cache entry. Otherwise remove the pending frames.
[in]IoStatusThe status returned to the cancelled frames' callback function.
[in]FrameToCancelFunction to select which frame to cancel. This is an optional parameter that may be NULL.
[in]ContextOpaque parameter to the FrameToCancel. Ignored if FrameToCancel is NULL.
Return values
EFI_INVALID_PARAMETERThe input parameter is invalid.
EFI_SUCCESSThe operation finished successfully.

Definition at line 613 of file Ip6Nd.c.

◆ Ip6InitDADProcess()

EFI_STATUS Ip6InitDADProcess ( IN IP6_INTERFACE IpIf,
IN IP6_ADDRESS_INFO AddressInfo,
IN IP6_DAD_CALLBACK Callback  OPTIONAL,
IN VOID *Context  OPTIONAL 
)

Create a DAD (Duplicate Address Detection) entry and queue it to be performed.

Parameters
[in]IpIfPoints to the IP6_INTERFACE.
[in]AddressInfoThe address information which needs DAD performed.
[in]CallbackThe callback routine that will be called after DAD is performed. This is an optional parameter that may be NULL.
[in]ContextThe opaque parameter for a DAD callback routine. This is an optional parameter that may be NULL.
Return values
EFI_SUCCESSThe DAD entry was created and queued.
EFI_OUT_OF_RESOURCESFailed to allocate the memory to complete the operation.

Definition at line 974 of file Ip6Nd.c.

◆ Ip6NdFasterTimerTicking()

VOID EFIAPI Ip6NdFasterTimerTicking ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

The heartbeat timer of ND module in IP6_TIMER_INTERVAL_IN_MS milliseconds. This time routine handles DAD module and neighbor state transition. It is also responsible for sending out router solicitations.

Parameters
[in]EventThe IP6 service instance's heartbeat timer.
[in]ContextThe IP6 service instance.

Definition at line 2797 of file Ip6Nd.c.

◆ Ip6NdTimerTicking()

VOID Ip6NdTimerTicking ( IN IP6_SERVICE IpSb)

The heartbeat timer of ND module in 1 second. This time routine handles following things: 1) maintain default router list; 2) maintain prefix options; 3) maintain route caches.

Parameters
[in]IpSbThe IP6 service binding instance.

Definition at line 3124 of file Ip6Nd.c.

◆ Ip6OnArpResolved()

VOID Ip6OnArpResolved ( IN VOID *  Context)

Callback function when address resolution is finished. It will cancel all the queued frames if the address resolution failed, or transmit them if the request succeeded.

Parameters
[in]ContextThe context of the callback, a pointer to IP6_NEIGHBOR_ENTRY.

Definition at line 416 of file Ip6Nd.c.

◆ Ip6OnDADFinished()

VOID Ip6OnDADFinished ( IN BOOLEAN  IsDadPassed,
IN IP6_INTERFACE IpIf,
IN IP6_DAD_ENTRY DadEntry 
)

The function to be called after DAD (Duplicate Address Detection) is performed.

Parameters
[in]IsDadPassedIf TRUE, the DAD operation succeed. Otherwise, the DAD operation failed.
[in]IpIfPoints to the IP6_INTERFACE.
[in]DadEntryThe DAD entry which already performed DAD.

Definition at line 818 of file Ip6Nd.c.

◆ Ip6ProcessNeighborAdvertise()

EFI_STATUS Ip6ProcessNeighborAdvertise ( IN IP6_SERVICE IpSb,
IN EFI_IP6_HEADER Head,
IN NET_BUF Packet 
)

Process the Neighbor Advertisement message.

Parameters
[in]IpSbThe IP service that received the packet.
[in]HeadThe IP head of the message.
[in]PacketThe content of the message with IP head removed.
Return values
EFI_SUCCESSThe packet processed successfully.
EFI_INVALID_PARAMETERThe packet is invalid.
EFI_ICMP_ERRORThe packet indicates that DAD is failed.
OthersFailed to process the packet.

Definition at line 1708 of file Ip6Nd.c.

◆ Ip6ProcessNeighborSolicit()

EFI_STATUS Ip6ProcessNeighborSolicit ( IN IP6_SERVICE IpSb,
IN EFI_IP6_HEADER Head,
IN NET_BUF Packet 
)

Process the Neighbor Solicitation message. The message may be sent for Duplicate Address Detection or Address Resolution.

Parameters
[in]IpSbThe IP service that received the packet.
[in]HeadThe IP head of the message.
[in]PacketThe content of the message with IP head removed.
Return values
EFI_SUCCESSThe packet processed successfully.
EFI_INVALID_PARAMETERThe packet is invalid.
EFI_ICMP_ERRORThe packet indicates that DAD is failed.
OthersFailed to process the packet.

Definition at line 1476 of file Ip6Nd.c.

◆ Ip6ProcessRedirect()

EFI_STATUS Ip6ProcessRedirect ( IN IP6_SERVICE IpSb,
IN EFI_IP6_HEADER Head,
IN NET_BUF Packet 
)

Process the ICMPv6 redirect message. Find the instance, then update its route cache.

Parameters
[in]IpSbThe IP6 service binding instance that received the packet.
[in]HeadThe IP head of the received ICMPv6 packet.
[in]PacketThe content of the ICMPv6 redirect packet with the IP head removed.
Return values
EFI_INVALID_PARAMETERThe parameter is invalid.
EFI_OUT_OF_RESOURCESInsufficient resources to complete the operation.
EFI_SUCCESSSuccessfully updated the route caches.

Definition at line 2416 of file Ip6Nd.c.

◆ Ip6ProcessRouterAdvertise()

EFI_STATUS Ip6ProcessRouterAdvertise ( IN IP6_SERVICE IpSb,
IN EFI_IP6_HEADER Head,
IN NET_BUF Packet 
)

Process the Router Advertisement message according to RFC4861.

Parameters
[in]IpSbThe IP service that received the packet.
[in]HeadThe IP head of the message.
[in]PacketThe content of the message with the IP head removed.
Return values
EFI_SUCCESSThe packet processed successfully.
EFI_INVALID_PARAMETERThe packet is invalid.
EFI_OUT_OF_RESOURCESInsufficient resources to complete the operation.
OthersFailed to process the packet.

Definition at line 1943 of file Ip6Nd.c.

◆ Ip6SendNeighborAdvertise()

EFI_STATUS Ip6SendNeighborAdvertise ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS SourceAddress,
IN EFI_IPv6_ADDRESS DestinationAddress,
IN EFI_IPv6_ADDRESS TargetIp6Address,
IN EFI_MAC_ADDRESS TargetLinkAddress,
IN BOOLEAN  IsRouter,
IN BOOLEAN  Override,
IN BOOLEAN  Solicited 
)

Generate a Neighbor Advertisement message and send it out to Destination Address.

Parameters
[in]IpSbThe IP service to send the packet.
[in]SourceAddressThe source address of the message.
[in]DestinationAddressThe destination address of the message.
[in]TargetIp6AddressThe target address field in the Neighbor Solicitation message that prompted this advertisement.
[in]TargetLinkAddressThe MAC address for the target, i.e. the sender of the advertisement.
[in]IsRouterIf TRUE, indicates the sender is a router.
[in]OverrideIf TRUE, indicates the advertisement should override an existing cache entry and update the MAC address.
[in]SolicitedIf TRUE, indicates the advertisement was sent in response to a Neighbor Solicitation from the Destination address.
Return values
EFI_OUT_OF_RESOURCESInsufficient resources to complete the operation.
EFI_SUCCESSThe Neighbor Advertise message was successfully sent.

Definition at line 1225 of file Ip6Nd.c.

◆ Ip6SendNeighborSolicit()

EFI_STATUS Ip6SendNeighborSolicit ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS SourceAddress,
IN EFI_IPv6_ADDRESS DestinationAddress,
IN EFI_IPv6_ADDRESS TargetIp6Address,
IN EFI_MAC_ADDRESS *SourceLinkAddress  OPTIONAL 
)

Generate the Neighbor Solicitation message and send it to the Destination Address.

Parameters
[in]IpSbThe IP service to send the packet
[in]SourceAddressThe source address of the message.
[in]DestinationAddressThe destination address of the message.
[in]TargetIp6AddressThe IP address of the target of the solicitation. It must not be a multicast address.
[in]SourceLinkAddressThe MAC address for the sender. If not NULL, a source link-layer address option will be appended to the message.
Return values
EFI_INVALID_PARAMETERAny input parameter is invalid.
EFI_OUT_OF_RESOURCESInsufficient resources to complete the operation.
EFI_SUCCESSThe Neighbor Advertise message was successfully sent.

Definition at line 1340 of file Ip6Nd.c.

◆ Ip6SendRouterSolicit()

EFI_STATUS Ip6SendRouterSolicit ( IN IP6_SERVICE IpSb,
IN IP6_INTERFACE *Interface  OPTIONAL,
IN EFI_IPv6_ADDRESS *SourceAddress  OPTIONAL,
IN EFI_IPv6_ADDRESS *DestinationAddress  OPTIONAL,
IN EFI_MAC_ADDRESS *SourceLinkAddress  OPTIONAL 
)

Generate router solicit message and send it out to Destination Address or All Router Link Local scope multicast address.

Parameters
[in]IpSbThe IP service to send the packet.
[in]InterfaceIf not NULL, points to the IP6 interface to send the packet.
[in]SourceAddressIf not NULL, the source address of the message.
[in]DestinationAddressIf not NULL, the destination address of the message.
[in]SourceLinkAddressIf not NULL, the MAC address of the source. A source link-layer address option will be appended to the message.
Return values
EFI_OUT_OF_RESOURCESInsufficient resources to complete the operation.
EFI_SUCCESSThe router solicit message was successfully sent.

Definition at line 1114 of file Ip6Nd.c.

◆ Ip6UpdateReachableTime()

EFI_STATUS Ip6UpdateReachableTime ( IN OUT IP6_SERVICE IpSb)

Update the ReachableTime in IP6 service binding instance data, in milliseconds.

Parameters
[in,out]IpSbPoints to the IP6_SERVICE.
Return values
EFI_SUCCESSReachableTime Updated
othersFailed to update ReachableTime

Definition at line 23 of file Ip6Nd.c.

Variable Documentation

◆ mZeroMacAddress

EFI_MAC_ADDRESS mZeroMacAddress

Definition at line 12 of file Ip6Nd.c.