Data Structures | |
struct | IP6_DESTROY_CHILD_BY_ADDR_CALLBACK_CONTEXT |
Defines | |
#define | IP6_LINK_EQUAL(Mac1, Mac2) (CompareMem ((Mac1), (Mac2), sizeof (EFI_MAC_ADDRESS)) == 0) |
#define | IP6_US_TO_SEC(Us) (((Us) + 999999) / 1000000) |
#define | IP6_ETHER_PROTO 0x86DD |
#define | IP6_MAC_LEN 6 |
#define | IP6_IF_ID_LEN 8 |
#define | IP6_INTERFACE_LOCAL_SCOPE 1 |
#define | IP6_LINK_LOCAL_SCOPE 2 |
#define | IP6_SITE_LOCAL_SCOPE 5 |
#define | IP6_INFINIT_LIFETIME 0xFFFFFFFF |
#define | IP6_HOP_LIMIT 255 |
#define | IP6_LINK_LOCAL_PREFIX_LENGTH 64 |
#define | IP6_TIMER_INTERVAL_IN_MS 100 |
#define | IP6_ONE_SECOND_IN_MS 1000 |
#define | IP6_LINK_BROADCAST 0x00000001 |
#define | IP6_LINK_MULTICAST 0x00000002 |
#define | IP6_LINK_PROMISC 0x00000004 |
#define | IP6_U_BIT 0x02 |
Typedefs | |
typedef struct _IP6_INTERFACE | IP6_INTERFACE |
typedef struct _IP6_PROTOCOL | IP6_PROTOCOL |
typedef struct _IP6_SERVICE | IP6_SERVICE |
typedef struct _IP6_ADDRESS_INFO | IP6_ADDRESS_INFO |
Enumerations | |
enum | IP6_ADDRESS_TYPE { Ip6Promiscuous = 1, Ip6Unicast, Ip6Multicast, Ip6AnyCast } |
Functions | |
EFI_STATUS | Ip6BuildEfiAddressList (IN IP6_SERVICE *IpSb, OUT UINT32 *AddressCount, OUT EFI_IP6_ADDRESS_INFO **AddressList) |
EFI_STATUS | Ip6SetToAllNodeMulticast (IN BOOLEAN Router, IN UINT8 Scope, OUT EFI_IPv6_ADDRESS *Ip6Addr) |
UINT8 * | Ip6CreateInterfaceID (IN OUT IP6_SERVICE *IpSb) |
EFI_IPv6_ADDRESS * | Ip6CreateLinkLocalAddr (IN OUT IP6_SERVICE *IpSb) |
VOID | Ip6CreateSNMulticastAddr (IN EFI_IPv6_ADDRESS *Ip6Addr, OUT EFI_IPv6_ADDRESS *MulticastAddr) |
BOOLEAN | Ip6IsSNMulticastAddr (IN EFI_IPv6_ADDRESS *Ip6) |
BOOLEAN | Ip6IsOneOfSetAddress (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Address, OUT IP6_INTERFACE **Interface, OUT IP6_ADDRESS_INFO **AddressInfo) |
BOOLEAN | Ip6IsValidLinkAddress (IN IP6_SERVICE *IpSb, IN EFI_MAC_ADDRESS *LinkAddress) |
VOID | Ip6CopyAddressByPrefix (OUT EFI_IPv6_ADDRESS *Dest, IN EFI_IPv6_ADDRESS *Src, IN UINT8 PrefixLength) |
VOID | Ip6AddAddr (IN OUT IP6_INTERFACE *IpIf, IN IP6_ADDRESS_INFO *AddrInfo) |
EFI_STATUS | Ip6RemoveAddr (IN IP6_SERVICE *IpSb, IN OUT LIST_ENTRY *AddressList, IN OUT UINT32 *AddressCount, IN EFI_IPv6_ADDRESS *Prefix, IN UINT8 PrefixLength) |
EFI_STATUS | Ip6GetMulticastMac (IN EFI_MANAGED_NETWORK_PROTOCOL *Mnp, IN EFI_IPv6_ADDRESS *Multicast, OUT EFI_MAC_ADDRESS *Mac) |
EFI_IP6_HEADER * | Ip6NtohHead (IN OUT EFI_IP6_HEADER *Head) |
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define IP6_ETHER_PROTO 0x86DD |
Referenced by Ip6CreateLinkTxToken(), and Ip6CreateService().
#define IP6_HOP_LIMIT 255 |
#define IP6_IF_ID_LEN 8 |
Referenced by Ip6CreateInterfaceID(), and Ip6CreateService().
#define IP6_INFINIT_LIFETIME 0xFFFFFFFF |
Referenced by Ip6AddNeighbor(), Ip6CandidateSource(), Ip6ConfigOnPolicyChanged(), Ip6ConfigSetMaunualAddress(), Ip6CreateInterface(), Ip6InitMld(), Ip6NdFasterTimerTicking(), Ip6NdTimerTicking(), Ip6OnDADFinished(), Ip6ProcessNeighborAdvertise(), Ip6ProcessNeighborSolicit(), Ip6ProcessRedirect(), and Ip6ProcessRouterAdvertise().
#define IP6_INTERFACE_LOCAL_SCOPE 1 |
#define IP6_LINK_BROADCAST 0x00000001 |
Referenced by Ip6OnFrameReceivedDpc().
#define IP6_LINK_EQUAL | ( | Mac1, | |||
Mac2 | ) | (CompareMem ((Mac1), (Mac2), sizeof (EFI_MAC_ADDRESS)) == 0) |
#define IP6_LINK_LOCAL_PREFIX_LENGTH 64 |
#define IP6_LINK_LOCAL_SCOPE 2 |
#define IP6_LINK_MULTICAST 0x00000002 |
Referenced by Ip6OnFrameReceivedDpc().
#define IP6_LINK_PROMISC 0x00000004 |
Referenced by Ip6OnFrameReceivedDpc().
#define IP6_MAC_LEN 6 |
Referenced by Ip6CreateInterfaceID().
#define IP6_ONE_SECOND_IN_MS 1000 |
Referenced by Ip6ConfigOnPolicyChanged(), Ip6DriverBindingStart(), and Ip6SetAddress().
#define IP6_SITE_LOCAL_SCOPE 5 |
Referenced by Ip6SetToAllNodeMulticast().
#define IP6_TIMER_INTERVAL_IN_MS 100 |
Referenced by Ip6DriverBindingStart(), Ip6InitDADProcess(), and Ip6SetAddress().
#define IP6_U_BIT 0x02 |
Referenced by Ip6CreateInterfaceID().
#define IP6_US_TO_SEC | ( | Us | ) | (((Us) + 999999) / 1000000) |
Referenced by EfiIp6Transmit(), and Ip6InstanceEnquePacket().
typedef struct _IP6_ADDRESS_INFO IP6_ADDRESS_INFO |
typedef struct _IP6_INTERFACE IP6_INTERFACE |
typedef struct _IP6_PROTOCOL IP6_PROTOCOL |
typedef struct _IP6_SERVICE IP6_SERVICE |
enum IP6_ADDRESS_TYPE |
VOID Ip6AddAddr | ( | IN OUT IP6_INTERFACE * | IpIf, | |
IN IP6_ADDRESS_INFO * | AddrInfo | |||
) |
Insert a node IP6_ADDRESS_INFO to an IP6 interface.
[in,out] | IpIf | Points to an IP6 interface. |
[in] | AddrInfo | Points to an IP6_ADDRESS_INFO. |
[in,out] | IpIf | Points to an IP6 interface. |
[in] | AddrInfo | Points to IP6_ADDRESS_INFO |
Referenced by Ip6OnDADFinished().
EFI_STATUS Ip6BuildEfiAddressList | ( | IN IP6_SERVICE * | IpSb, | |
OUT UINT32 * | AddressCount, | |||
OUT EFI_IP6_ADDRESS_INFO ** | AddressList | |||
) |
Build a array of EFI_IP6_ADDRESS_INFO to be returned to the caller. The number of EFI_IP6_ADDRESS_INFO is also returned. If AddressList is NULL, only the address count is returned.
[in] | IpSb | The IP6 service binding instance. |
[out] | AddressCount | The number of returned addresses. |
[out] | AddressList | The pointer to the array of EFI_IP6_ADDRESS_INFO. This is an optional parameter. |
EFI_SUCCESS | The address array is successfully build | |
EFI_OUT_OF_RESOURCES | Failed to allocate the memory for the address info. | |
EFI_INVALID_PARAMETER | Any input parameter is invalid. |
[in] | IpSb | The IP6 service binding instance. |
[out] | AddressCount | The number of returned addresses. |
[out] | AddressList | The pointer to the array of EFI_IP6_ADDRESS_INFO. This is an optional parameter. |
EFI_SUCCESS | The address array successfully built. | |
EFI_OUT_OF_RESOURCES | Failed to allocate the memory for the address info. | |
EFI_INVALID_PARAMETER | Any input parameter is invalid. |
References _IP6_ADDRESS_INFO::Address, IP6_ADDR_INFO_SIGNATURE, IP6_LINK_LOCAL_PREFIX_LENGTH, and _IP6_ADDRESS_INFO::PrefixLength.
Referenced by EfiIp6GetModeData(), and Ip6ConfigGetIfInfo().
VOID Ip6CopyAddressByPrefix | ( | OUT EFI_IPv6_ADDRESS * | Dest, | |
IN EFI_IPv6_ADDRESS * | Src, | |||
IN UINT8 | PrefixLength | |||
) |
Copy the PrefixLength bits from Src to Dest.
[out] | Dest | A pointer to the buffer to copy to. |
[in] | Src | A pointer to the buffer to copy from. |
[in] | PrefixLength | The number of bits to copy. |
Referenced by Ip6BuildEfiRouteTable().
UINT8* Ip6CreateInterfaceID | ( | IN OUT IP6_SERVICE * | IpSb | ) |
This function converts MAC address to 64 bits interface ID according to RFC4291 and returns the interface ID. Currently only 48-bit MAC address is supported by this function.
[in,out] | IpSb | The IP6 service binding instance. |
NULL | The operation fails. |
References IP6_IF_ID_LEN, IP6_MAC_LEN, IP6_SERVICE_SIGNATURE, and IP6_U_BIT.
Referenced by Ip6CreateLinkLocalAddr().
EFI_IPv6_ADDRESS* Ip6CreateLinkLocalAddr | ( | IN OUT IP6_SERVICE * | IpSb | ) |
This function creates link-local address from interface identifier. The interface identifier is normally created from MAC address. It might be manually configured by administrator if the link-local address created from MAC address is a duplicate address.
[in,out] | IpSb | The IP6 service binding instance. |
NULL | If the operation fails. |
References IP6_SERVICE_SIGNATURE, and Ip6CreateInterfaceID().
Referenced by Ip6CreateInterface().
VOID Ip6CreateSNMulticastAddr | ( | IN EFI_IPv6_ADDRESS * | Ip6Addr, | |
OUT EFI_IPv6_ADDRESS * | MulticastAddr | |||
) |
Compute the solicited-node multicast address for an unicast or anycast address, by taking the low-order 24 bits of this address, and appending those bits to the prefix FF02:0:0:0:0:1:FF00::/104.
Ip6Addr | The unicast or anycast address, in network order. | |
MulticastAddr | The generated solicited-node multicast address, in network order. |
[in] | Ip6Addr | The unicast or anycast address, in network order. |
[out] | MulticastAddr | The generated solicited-node multicast address, in network order. |
Referenced by Ip6InitDADProcess(), Ip6IsSNMulticastAddr(), Ip6NdFasterTimerTicking(), Ip6Output(), and Ip6RemoveAddr().
EFI_STATUS Ip6GetMulticastMac | ( | IN EFI_MANAGED_NETWORK_PROTOCOL * | Mnp, | |
IN EFI_IPv6_ADDRESS * | Multicast, | |||
OUT EFI_MAC_ADDRESS * | Mac | |||
) |
Get the MAC address for a multicast IP address. Call Mnp's McastIpToMac to find the MAC address instead of hard-coding the NIC to be Ethernet.
[in] | Mnp | The Mnp instance to get the MAC address. |
[in] | Multicast | The multicast IP address to translate. |
[out] | Mac | The buffer to hold the translated address. |
EFI_SUCCESS | The multicast IP is successfully translated to a multicast MAC address. | |
Other | The address is not converted because an error occurred. |
[in] | Mnp | The Mnp instance to get the MAC address. |
[in] | Multicast | The multicast IP address to translate. |
[out] | Mac | The buffer to hold the translated address. |
EFI_SUCCESS | The multicast IP successfully translated to a multicast MAC address. | |
Other | The address is not converted because an error occurred. |
Referenced by Ip6InitMld(), Ip6JoinGroup(), and Ip6SendFrame().
BOOLEAN Ip6IsOneOfSetAddress | ( | IN IP6_SERVICE * | IpSb, | |
IN EFI_IPv6_ADDRESS * | Address, | |||
OUT IP6_INTERFACE ** | Interface, | |||
OUT IP6_ADDRESS_INFO ** | AddressInfo | |||
) |
Check whether the incoming IPv6 address is one of the maintained address in the IP6 service binding instance.
[in] | IpSb | Points to a IP6 service binding instance |
[in] | Address | The IP6 address to be checked. |
[out] | Interface | If not NULL, output the IP6 interface which maintains the Address. |
[out] | AddressInfo | If not NULL, output the IP6 address information of the Address. |
TRUE | Yes, it is one of the maintained addresses. | |
FALSE | No, it is not one of the maintained addresses. |
[in] | IpSb | Points to a IP6 service binding instance. |
[in] | Address | The IP6 address to be checked. |
[out] | Interface | If not NULL, output the IP6 interface which maintains the Address. |
[out] | AddressInfo | If not NULL, output the IP6 address information of the Address. |
TRUE | Yes, it is one of the maintained address. | |
FALSE | No, it is not one of the maintained address. |
References _IP6_ADDRESS_INFO::Address, _IP6_INTERFACE::AddressList, IP6_ADDR_INFO_SIGNATURE, and IP6_INTERFACE_SIGNATURE.
Referenced by EfiIp6Neighbors(), Ip6ConfigOnDhcp6Event(), Ip6ConfigProtocol(), Ip6ConfigSetMaunualAddress(), Ip6IcmpReplyEcho(), Ip6IsValidAddress(), Ip6PreProcessPacket(), Ip6ProcessNeighborSolicit(), Ip6ProcessRedirect(), Ip6ProcessRouterAdvertise(), Ip6SelectInterface(), Ip6SelectSourceAddress(), and Ip6SetAddress().
BOOLEAN Ip6IsSNMulticastAddr | ( | IN EFI_IPv6_ADDRESS * | Ip6 | ) |
Check whether the incoming Ipv6 address is a solicited-node multicast address.
[in] | Ip6 | Ip6 address, in network order. |
TRUE | Yes, solicited-node multicast address | |
FALSE | No |
References Ip6CreateSNMulticastAddr().
Referenced by Ip6ProcessNeighborSolicit(), and Ip6SendNeighborSolicit().
BOOLEAN Ip6IsValidLinkAddress | ( | IN IP6_SERVICE * | IpSb, | |
IN EFI_MAC_ADDRESS * | LinkAddress | |||
) |
Check whether the incoming MAC address is valid.
[in] | IpSb | Points to a IP6 service binding instance. |
[in] | LinkAddress | The MAC address. |
TRUE | Yes, it is valid. | |
FALSE | No, it is not valid. |
Referenced by EfiIp6Neighbors().
EFI_IP6_HEADER* Ip6NtohHead | ( | IN OUT EFI_IP6_HEADER * | Head | ) |
Convert the multibyte field in IP header's byter order. In spite of its name, it can also be used to convert from host to network byte order.
[in,out] | Head | The IP head to convert. |
Referenced by Ip6IpSecProcessPacket(), Ip6PreProcessPacket(), Ip6Reassemble(), and Ip6WrapRxData().
EFI_STATUS Ip6RemoveAddr | ( | IN IP6_SERVICE * | IpSb, | |
IN OUT LIST_ENTRY * | AddressList, | |||
IN OUT UINT32 * | AddressCount, | |||
IN EFI_IPv6_ADDRESS * | Prefix, | |||
IN UINT8 | PrefixLength | |||
) |
Remove the IPv6 address from the address list node points to IP6_ADDRESS_INFO.
This function removes the matching IPv6 addresses from the address list and adjusts the address count of the address list. If IpSb is not NULL, this function calls Ip6LeaveGroup to see whether it should call Mnp->Groups() to remove the its solicited-node multicast MAC address from the filter list and sends out a Multicast Listener Done. If Prefix is NULL, all address in the address list will be removed. If Prefix is not NULL, the address that matching the Prefix with PrefixLength in the address list will be removed.
[in] | IpSb | NULL or points to IP6 service binding instance. |
[in,out] | AddressList | address list array |
[in,out] | AddressCount | the count of addresses in address list array |
[in] | Prefix | NULL or an IPv6 address prefix |
[in] | PrefixLength | the length of Prefix |
EFI_SUCCESS | The operation completed successfully. | |
EFI_NOT_FOUND | The address matching the Prefix with PrefixLength cannot be found in address list. | |
EFI_INVALID_PARAMETER | Any input parameter is invalid. |
This function removes the matching IPv6 addresses from the address list and adjusts the address count of the address list. If IpSb is not NULL, this function calls Ip6LeaveGroup to see whether it should call Mnp->Groups() to remove the its solicited-node multicast MAC address from the filter list and sends out a Multicast Listener Done. If Prefix is NULL, all address in the address list will be removed. If Prefix is not NULL, the address that matching the Prefix with PrefixLength in the address list will be removed.
[in] | IpSb | NULL or points to IP6 service binding instance. |
[in,out] | AddressList | Address list array. |
[in,out] | AddressCount | The count of addresses in address list array. |
[in] | Prefix | NULL or an IPv6 address prefix. |
[in] | PrefixLength | The length of Prefix. |
EFI_SUCCESS | The operation completed successfully. | |
EFI_NOT_FOUND | The address matching the Prefix with PrefixLength cannot be found in the address list. | |
EFI_INVALID_PARAMETER | Any input parameter is invalid. |
References _IP6_ADDRESS_INFO::Address, IP6_ADDR_INFO_SIGNATURE, IP6_SERVICE_SIGNATURE, Ip6CreateSNMulticastAddr(), Ip6DestroyInstanceByAddress(), Ip6LeaveGroup(), and _IP6_ADDRESS_INFO::PrefixLength.
Referenced by Ip6CleanInterface(), Ip6ConfigOnDhcp6Event(), Ip6ConfigOnPolicyChanged(), Ip6ConfigSetMaunualAddress(), Ip6DestroyPrefixListEntry(), and Ip6SelectSourceAddress().
EFI_STATUS Ip6SetToAllNodeMulticast | ( | IN BOOLEAN | Router, | |
IN UINT8 | Scope, | |||
OUT EFI_IPv6_ADDRESS * | Ip6Addr | |||
) |
Generate the multicast addresses identify the group of all IPv6 nodes or IPv6 routers defined in RFC4291.
All Nodes Addresses: FF01::1, FF02::1. All Router Addresses: FF01::2, FF02::2, FF05::2.
[in] | Router | If TRUE, generate all routers addresses, else generate all node addresses. |
[in] | Scope | interface-local(1), link-local(2), or site-local(5) |
[out] | Ip6Addr | The generated multicast address. |
EFI_INVALID_PARAMETER | Any input parameter is invalid. | |
EFI_SUCCESS | The address is generated. |
References IP6_SITE_LOCAL_SCOPE.
Referenced by Ip6CleanService(), Ip6InitMld(), Ip6OnDADFinished(), Ip6ProcessMldQuery(), Ip6ProcessNeighborSolicit(), Ip6SendMldDone(), and Ip6SendRouterSolicit().