TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip6If.h File Reference

Go to the source code of this file.

Data Structures

struct  IP6_LINK_RX_TOKEN
 
struct  IP6_LINK_TX_TOKEN
 
struct  _IP6_ADDRESS_INFO
 
struct  _IP6_INTERFACE
 

Macros

#define IP6_LINK_RX_SIGNATURE   SIGNATURE_32 ('I', 'P', '6', 'R')
 
#define IP6_LINK_TX_SIGNATURE   SIGNATURE_32 ('I', 'P', '6', 'T')
 
#define IP6_INTERFACE_SIGNATURE   SIGNATURE_32 ('I', 'P', '6', 'I')
 
#define IP6_ADDR_INFO_SIGNATURE   SIGNATURE_32 ('I', 'P', 'A', 'I')
 

Typedefs

typedef VOID(* IP6_FRAME_CALLBACK) (NET_BUF *Packet, EFI_STATUS IoStatus, UINT32 LinkFlag, VOID *Context)
 
typedef BOOLEAN(* IP6_FRAME_TO_CANCEL) (IP6_LINK_TX_TOKEN *Frame, VOID *Context)
 

Functions

IP6_INTERFACEIp6CreateInterface (IN IP6_SERVICE *IpSb, IN BOOLEAN LinkLocal)
 
VOID Ip6CleanInterface (IN IP6_INTERFACE *Interface, IN IP6_PROTOCOL *IpInstance OPTIONAL)
 
VOID Ip6FreeLinkTxToken (IN IP6_LINK_TX_TOKEN *Token)
 
VOID EFIAPI Ip6OnFrameReceived (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS Ip6ReceiveFrame (IN IP6_FRAME_CALLBACK CallBack, IN IP6_SERVICE *IpSb)
 
EFI_STATUS Ip6SendFrame (IN IP6_INTERFACE *Interface, IN IP6_PROTOCOL *IpInstance OPTIONAL, IN NET_BUF *Packet, IN EFI_IPv6_ADDRESS *NextHop, IN IP6_FRAME_CALLBACK CallBack, IN VOID *Context)
 
VOID EFIAPI Ip6TimerTicking (IN EFI_EVENT Event, IN VOID *Context)
 

Detailed Description

Definition for IP6 pseudo interface structure.

Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Ip6If.h.

Macro Definition Documentation

◆ IP6_ADDR_INFO_SIGNATURE

#define IP6_ADDR_INFO_SIGNATURE   SIGNATURE_32 ('I', 'P', 'A', 'I')

Definition at line 16 of file Ip6If.h.

◆ IP6_INTERFACE_SIGNATURE

#define IP6_INTERFACE_SIGNATURE   SIGNATURE_32 ('I', 'P', '6', 'I')

Definition at line 15 of file Ip6If.h.

◆ IP6_LINK_RX_SIGNATURE

#define IP6_LINK_RX_SIGNATURE   SIGNATURE_32 ('I', 'P', '6', 'R')

Definition at line 13 of file Ip6If.h.

◆ IP6_LINK_TX_SIGNATURE

#define IP6_LINK_TX_SIGNATURE   SIGNATURE_32 ('I', 'P', '6', 'T')

Definition at line 14 of file Ip6If.h.

Typedef Documentation

◆ IP6_FRAME_CALLBACK

typedef VOID(* IP6_FRAME_CALLBACK) (NET_BUF *Packet, EFI_STATUS IoStatus, UINT32 LinkFlag, VOID *Context)

Definition at line 34 of file Ip6If.h.

◆ IP6_FRAME_TO_CANCEL

typedef BOOLEAN(* IP6_FRAME_TO_CANCEL) (IP6_LINK_TX_TOKEN *Frame, VOID *Context)

Definition at line 90 of file Ip6If.h.

Function Documentation

◆ Ip6CleanInterface()

VOID Ip6CleanInterface ( IN IP6_INTERFACE Interface,
IN IP6_PROTOCOL *IpInstance  OPTIONAL 
)

Free the interface used by IpInstance. All the IP instance with the same Ip/prefix pair share the same interface. It is reference counted. All the frames that haven't been sent will be cancelled. Because the IpInstance is optional, the caller must remove IpInstance from the interface's instance list.

Parameters
[in]InterfaceThe interface used by the IpInstance.
[in]IpInstanceThe IP instance that free the interface. NULL if the IP driver is releasing the default interface.

Definition at line 297 of file Ip6If.c.

◆ Ip6CreateInterface()

IP6_INTERFACE * Ip6CreateInterface ( IN IP6_SERVICE IpSb,
IN BOOLEAN  LinkLocal 
)

Create an IP6_INTERFACE.

Parameters
[in]IpSbThe IP6 service binding instance.
[in]LinkLocalIf TRUE, the instance is created for link-local address. Otherwise, it is not for a link-local address.
Returns
Point to the created IP6_INTERFACE, otherwise NULL.

Definition at line 206 of file Ip6If.c.

◆ Ip6FreeLinkTxToken()

VOID Ip6FreeLinkTxToken ( IN IP6_LINK_TX_TOKEN Token)

Free the link layer transmit token. It will close the event then free the memory used.

Parameters
[in]TokenToken to free.

Free the link layer transmit token. It will close the event, then free the memory used.

Parameters
[in]TokenToken to free.

Definition at line 432 of file Ip6If.c.

◆ Ip6OnFrameReceived()

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

Request Ip6OnFrameReceivedDpc as a DPC at TPL_CALLBACK

Parameters
EventThe receive event delivered to MNP for receive.
ContextContext for the callback.

Request Ip6OnFrameReceivedDpc as a DPC at TPL_CALLBACK.

Parameters
EventThe receive event delivered to MNP for receive.
ContextContext for the callback.

Definition at line 538 of file Ip6If.c.

◆ Ip6ReceiveFrame()

EFI_STATUS Ip6ReceiveFrame ( IN IP6_FRAME_CALLBACK  CallBack,
IN IP6_SERVICE IpSb 
)

Request to receive the packet from the interface.

Parameters
[in]CallBackFunction to call when the receive finished.
[in]IpSbPoints to the IP6 service binding instance.
Return values
EFI_ALREADY_STARTEDThere is already a pending receive request.
EFI_OUT_OF_RESOURCESFailed to allocate resources to receive.
EFI_SUCCESSThe receive request has been started.

Request to receive the packet from the interface.

Parameters
[in]CallBackFunction to call when receive finished.
[in]IpSbPoints to IP6 service binding instance.
Return values
EFI_ALREADY_STARTEDThere is already a pending receive request.
EFI_OUT_OF_RESOURCESFailed to allocate resource to receive.
EFI_SUCCESSThe receive request has been started.

Definition at line 561 of file Ip6If.c.

◆ Ip6SendFrame()

EFI_STATUS Ip6SendFrame ( IN IP6_INTERFACE Interface,
IN IP6_PROTOCOL *IpInstance  OPTIONAL,
IN NET_BUF Packet,
IN EFI_IPv6_ADDRESS NextHop,
IN IP6_FRAME_CALLBACK  CallBack,
IN VOID *  Context 
)

Send a frame from the interface. If the next hop is multicast address, it is transmitted immediately. If the next hop is a unicast, and the NextHop's MAC is not known, it will perform address resolution. If some error happened, the CallBack won't be called. So, the caller must test the return value, and take action when there is an error.

Parameters
[in]InterfaceThe interface to send the frame from
[in]IpInstanceThe IP child that request the transmission. NULL if it is the IP6 driver itself.
[in]PacketThe packet to transmit.
[in]NextHopThe immediate destination to transmit the packet to.
[in]CallBackFunction to call back when transmit finished.
[in]ContextOpaque parameter to the call back.
Return values
EFI_OUT_OF_RESOURCESFailed to allocate resource to send the frame.
EFI_NO_MAPPINGCan't resolve the MAC for the nexthop.
EFI_SUCCESSThe packet successfully transmitted.

Send a frame from the interface. If the next hop is a multicast address, it is transmitted immediately. If the next hop is a unicast, and the NextHop's MAC is not known, it will perform address resolution. If an error occurred, the CallBack won't be called. So, the caller must test the return value, and take action when there is an error.

Parameters
[in]InterfaceThe interface to send the frame from
[in]IpInstanceThe IP child that request the transmission. NULL if it is the IP6 driver itself.
[in]PacketThe packet to transmit.
[in]NextHopThe immediate destination to transmit the packet to.
[in]CallBackFunction to call back when transmit finished.
[in]ContextOpaque parameter to the callback.
Return values
EFI_OUT_OF_RESOURCESFailed to allocate resource to send the frame.
EFI_NO_MAPPINGCan't resolve the MAC for the nexthop.
EFI_SUCCESSThe packet successfully transmitted.

Definition at line 654 of file Ip6If.c.

◆ Ip6TimerTicking()

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

The heartbeat timer of IP6 service instance. It times out all of its IP6 children's received-but-not-delivered and transmitted-but-not-recycle packets.

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

The heartbeat timer of IP6 service instance. It times out all of its IP6 children's received-but-not-delivered and transmitted-but-not-recycle packets.

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

Definition at line 785 of file Ip6If.c.