Functions | |
EFI_STATUS | Ip6CandidateSource (IN IP6_SERVICE *IpSb, OUT LIST_ENTRY *SourceList, OUT UINT32 *SourceCount) |
UINT8 | Ip6CommonPrefixLen (IN EFI_IPv6_ADDRESS *AddressA, IN EFI_IPv6_ADDRESS *AddressB) |
EFI_STATUS | Ip6SelectSourceAddress (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Destination, OUT EFI_IPv6_ADDRESS *Source) |
IP6_INTERFACE * | Ip6SelectInterface (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Destination, IN OUT EFI_IPv6_ADDRESS *Source) |
VOID | Ip6SysPacketSent (NET_BUF *Packet, EFI_STATUS IoStatus, UINT32 LinkFlag, VOID *Context) |
EFI_STATUS | Ip6PrependHead (IN IP6_SERVICE *IpSb, IN NET_BUF *Packet, IN EFI_IP6_HEADER *Head, IN UINT16 FragmentOffset, IN UINT8 *ExtHdrs, IN UINT32 ExtHdrsLen, IN UINT8 LastHeader, IN UINT32 HeadLen) |
EFI_STATUS | Ip6Output (IN IP6_SERVICE *IpSb, IN IP6_INTERFACE *Interface, IN IP6_PROTOCOL *IpInstance, IN NET_BUF *Packet, IN EFI_IP6_HEADER *Head, IN UINT8 *ExtHdrs, IN UINT32 ExtHdrsLen, IN IP6_FRAME_CALLBACK Callback, IN VOID *Context) |
BOOLEAN | Ip6CancelPacketFragments (IN IP6_LINK_TX_TOKEN *Frame, IN VOID *Context) |
VOID | Ip6CancelFrames (IN IP6_INTERFACE *Interface, IN EFI_STATUS IoStatus, IN IP6_FRAME_TO_CANCEL FrameToCancel, IN VOID *Context) |
VOID | Ip6CancelPacket (IN IP6_INTERFACE *IpIf, IN NET_BUF *Packet, IN EFI_STATUS IoStatus) |
Variables | |
UINT32 | mIp6Id |
Copyright (c) 2009 - 2015, 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.
VOID Ip6CancelFrames | ( | IN IP6_INTERFACE * | Interface, | |
IN EFI_STATUS | IoStatus, | |||
IN IP6_FRAME_TO_CANCEL | FrameToCancel, | |||
IN VOID * | Context | |||
) |
Remove all the frames on the interface that pass the FrameToCancel, either queued on ARP queues or that have already been delivered to MNP and not yet recycled.
[in] | Interface | Interface to remove the frames from. |
[in] | IoStatus | The transmit status returned to the frames' callback. |
[in] | FrameToCancel | Function to select the frame to cancel; NULL to select all. |
[in] | Context | Opaque parameters passed to FrameToCancel. Ignored if FrameToCancel is NULL. |
References IP6_SERVICE_SIGNATURE, Ip6FreeNeighborEntry(), _IP6_SERVICE::Mnp, and IP6_LINK_TX_TOKEN::MnpToken.
Referenced by Ip6CancelPacket(), and Ip6CleanInterface().
VOID Ip6CancelPacket | ( | IN IP6_INTERFACE * | IpIf, | |
IN NET_BUF * | Packet, | |||
IN EFI_STATUS | IoStatus | |||
) |
Cancel the Packet and all its fragments.
[in] | IpIf | The interface from which the Packet is sent. |
[in] | Packet | The Packet to cancel. |
[in] | IoStatus | The status returns to the sender. |
References Ip6CancelFrames(), and Ip6CancelPacketFragments().
Referenced by Ip6CancelTxTokens(), Ip6Output(), and Ip6SentPacketTicking().
BOOLEAN Ip6CancelPacketFragments | ( | IN IP6_LINK_TX_TOKEN * | Frame, | |
IN VOID * | Context | |||
) |
The filter function to find a packet and all its fragments. The packet's fragments have their Context set to the packet.
[in] | Frame | The frames hold by the low level interface. |
[in] | Context | Context to the function, which is the packet. |
TRUE | This is the packet to cancel or its fragments. | |
FALSE | This is an unrelated packet. |
Referenced by Ip6CancelPacket().
EFI_STATUS Ip6CandidateSource | ( | IN IP6_SERVICE * | IpSb, | |
OUT LIST_ENTRY * | SourceList, | |||
OUT UINT32 * | SourceCount | |||
) |
Output all the available source addresses to a list entry head SourceList. The number of source addresses are also returned.
[in] | IpSb | Points to an IP6 service binding instance. |
[out] | SourceList | The list entry head of all source addresses. It is the caller's responsiblity to free the resources. |
[out] | SourceCount | The number of source addresses. |
EFI_SUCCESS | The source addresses were copied to a list entry head SourceList. | |
EFI_OUT_OF_RESOURCES | Failed to allocate resources to complete the operation. |
References _IP6_ADDRESS_INFO::Address, _IP6_INTERFACE::AddressList, IP6_ADDR_INFO_SIGNATURE, IP6_INFINIT_LIFETIME, IP6_LINK_LOCAL_PREFIX_LENGTH, _IP6_ADDRESS_INFO::IsAnycast, _IP6_ADDRESS_INFO::Link, _IP6_ADDRESS_INFO::PreferredLifetime, _IP6_ADDRESS_INFO::PrefixLength, _IP6_ADDRESS_INFO::Signature, and _IP6_ADDRESS_INFO::ValidLifetime.
Referenced by Ip6SelectSourceAddress().
UINT8 Ip6CommonPrefixLen | ( | IN EFI_IPv6_ADDRESS * | AddressA, | |
IN EFI_IPv6_ADDRESS * | AddressB | |||
) |
Calculate how many bits are the same between two IPv6 addresses.
[in] | AddressA | Points to an IPv6 address. |
[in] | AddressB | Points to another IPv6 address. |
Referenced by Ip6SelectSourceAddress().
EFI_STATUS Ip6Output | ( | IN IP6_SERVICE * | IpSb, | |
IN IP6_INTERFACE * | Interface, | |||
IN IP6_PROTOCOL * | IpInstance, | |||
IN NET_BUF * | Packet, | |||
IN EFI_IP6_HEADER * | Head, | |||
IN UINT8 * | ExtHdrs, | |||
IN UINT32 | ExtHdrsLen, | |||
IN IP6_FRAME_CALLBACK | Callback, | |||
IN VOID * | Context | |||
) |
Transmit an IP6 packet. The packet comes either from the IP6 child's consumer (IpInstance != NULL) or the IP6 driver itself (IpInstance == NULL). It will route the packet, fragment it, then transmit all the fragments through an interface.
[in] | IpSb | The IP6 service instance to transmit the packet. |
[in] | Interface | The IP6 interface to transmit the packet. Ignored if NULL. |
[in] | IpInstance | The IP6 child that issues the transmission. It is NULL if the packet is from the system. |
[in] | Packet | The user data to send, excluding the IP header. |
[in] | Head | The caller supplied header. The caller should set the following header fields: NextHeader, HopLimit, Src, Dest, FlowLabel, PayloadLength. This function will fill in the Ver, TrafficClass. |
[in] | ExtHdrs | The extension headers to append to the IPv6 basic header. |
[in] | ExtHdrsLen | The length of the extension headers. |
[in] | Callback | The callback function to issue when transmission completed. |
[in] | Context | The opaque context for the callback. |
EFI_INVALID_PARAMETER | Any input parameter or the packet is invalid. | |
EFI_NO_MAPPING | There is no interface to the destination. | |
EFI_NOT_FOUND | There is no route to the destination. | |
EFI_SUCCESS | The packet successfully transmitted. | |
EFI_OUT_OF_RESOURCES | Failed to finish the operation due to lack of resources. | |
Others | Failed to transmit the packet. |
References IP6_ROUTE_ENTRY::Flag, _IP6_NEIGHBOR_ENTRY::Interface, IP6_GET_TICKS, IP6_PACKET_TOO_BIG, IP6_SERVICE_SIGNATURE, Ip6CancelPacket(), Ip6CreateNeighborEntry(), Ip6CreateSNMulticastAddr(), Ip6FillFragmentHeader(), Ip6FindNeighborEntry(), Ip6FindRouteEntry(), Ip6FreeRouteCacheEntry(), Ip6FreeRouteEntry(), Ip6IpSecProcessPacket(), Ip6IsAnycast(), Ip6IsExtsValid(), Ip6OnArpResolved(), Ip6PrependHead(), Ip6Route(), Ip6SelectInterface(), Ip6SelectSourceAddress(), Ip6SendFrame(), Ip6SendNeighborSolicit(), Ip6SysPacketSent(), mIp6Id, _IP6_NEIGHBOR_ENTRY::Neighbor, IP6_ROUTE_CACHE_ENTRY::NextHop, _IP6_NEIGHBOR_ENTRY::Ticks, IP6_TXTOKEN_WRAP::Token, and _IP6_NEIGHBOR_ENTRY::Transmit.
Referenced by EfiIp6Transmit(), Ip6IcmpReplyEcho(), Ip6SendIcmpError(), Ip6SendMldDone(), Ip6SendMldReport(), Ip6SendNeighborAdvertise(), Ip6SendNeighborSolicit(), and Ip6SendRouterSolicit().
EFI_STATUS Ip6PrependHead | ( | IN IP6_SERVICE * | IpSb, | |
IN NET_BUF * | Packet, | |||
IN EFI_IP6_HEADER * | Head, | |||
IN UINT16 | FragmentOffset, | |||
IN UINT8 * | ExtHdrs, | |||
IN UINT32 | ExtHdrsLen, | |||
IN UINT8 | LastHeader, | |||
IN UINT32 | HeadLen | |||
) |
Prefix an IP6 basic head and unfragmentable extension headers and a fragment header to the Packet. Used for IP6 fragmentation.
[in] | IpSb | The IP6 service instance to transmit the packet. |
[in] | Packet | The packet to prefix the IP6 header to. |
[in] | Head | The caller supplied header. |
[in] | FragmentOffset | The fragment offset of the data following the header. |
[in] | ExtHdrs | The length of the original extension header. |
[in] | ExtHdrsLen | The length of the extension headers. |
[in] | LastHeader | The pointer of next header of last extension header. |
[in] | HeadLen | The length of the unfragmented part of the IP6 header. |
EFI_BAD_BUFFER_SIZE | There is no enought room in the head space of Packet. | |
EFI_SUCCESS | The operation performed successfully. |
References IP6_FRAGMENT_OFFSET_MASK, and Ip6FillFragmentHeader().
Referenced by Ip6Output().
IP6_INTERFACE* Ip6SelectInterface | ( | IN IP6_SERVICE * | IpSb, | |
IN EFI_IPv6_ADDRESS * | Destination, | |||
IN OUT EFI_IPv6_ADDRESS * | Source | |||
) |
Select an interface to send the packet generated in the IP6 driver itself: that is, not by the requests of the IP6 child's consumer. Such packets include the ICMPv6 echo replies and other ICMPv6 error packets.
[in] | IpSb | The IP4 service that wants to send the packets. |
[in] | Destination | The destination of the packet. |
[in,out] | Source | The source of the packet. |
References IP6_SERVICE_SIGNATURE, Ip6IsOneOfSetAddress(), and Ip6SelectSourceAddress().
Referenced by Ip6Output().
EFI_STATUS Ip6SelectSourceAddress | ( | IN IP6_SERVICE * | IpSb, | |
IN EFI_IPv6_ADDRESS * | Destination, | |||
OUT EFI_IPv6_ADDRESS * | Source | |||
) |
Output all the available source addresses to a list entry head SourceList. The number of source addresses are also returned.
[in] | IpSb | Points to a IP6 service binding instance. |
[in] | Destination | The IPv6 destination address. |
[out] | Source | The selected IPv6 source address according to the Destination. |
EFI_SUCCESS | The source addresses were copied to a list entry head SourceList. | |
EFI_NO_MAPPING | The IPv6 stack is not auto configured. |
References _IP6_ADDRESS_INFO::Address, IP6_ADDR_INFO_SIGNATURE, IP6_SERVICE_SIGNATURE, Ip6CandidateSource(), Ip6CommonPrefixLen(), Ip6IsOneOfSetAddress(), Ip6RemoveAddr(), _IP6_PREFIX_LIST_ENTRY::PreferredLifetime, _IP6_PREFIX_LIST_ENTRY::Prefix, and _IP6_PREFIX_LIST_ENTRY::PrefixLength.
Referenced by EfiIp6Transmit(), Ip6ConfigProtocol(), Ip6NdFasterTimerTicking(), Ip6Output(), and Ip6SelectInterface().
VOID Ip6SysPacketSent | ( | NET_BUF * | Packet, | |
EFI_STATUS | IoStatus, | |||
UINT32 | LinkFlag, | |||
VOID * | Context | |||
) |
The default callback function for the system generated packet. It will free the packet.
[in] | Packet | The packet that transmitted. |
[in] | IoStatus | The result of the transmission, succeeded or failed. |
[in] | LinkFlag | Not used when transmitted. Check IP6_FRAME_CALLBACK for reference. |
[in] | Context | The context provided by us. |
Referenced by Ip6IcmpReplyEcho(), Ip6Output(), Ip6SendIcmpError(), Ip6SendMldDone(), Ip6SendMldReport(), Ip6SendNeighborAdvertise(), Ip6SendNeighborSolicit(), and Ip6SendRouterSolicit().
UINT32 mIp6Id |
Referenced by Ip6DriverBindingStart(), Ip6FillFragmentHeader(), and Ip6Output().