TianoCore EDK2 master
|
#include "UefiShellNetwork2CommandsLib.h"
Go to the source code of this file.
Data Structures | |
struct | _ICMP6_ECHO_REQUEST_REPLY |
struct | _PING6_ICMP6_TX_INFO |
struct | _PING6_PRIVATE_DATA |
Macros | |
#define | PING6_DEFAULT_TIMEOUT 5000 |
#define | PING6_MAX_SEND_NUMBER 10000 |
#define | PING6_MAX_BUFFER_SIZE 32768 |
#define | PING6_ONE_SECOND 10000000 |
#define | STALL_1_MILLI_SECOND 1000 |
Typedefs | |
typedef struct _ICMP6_ECHO_REQUEST_REPLY | ICMP6_ECHO_REQUEST_REPLY |
typedef struct _PING6_ICMP6_TX_INFO | PING6_ICMP6_TX_INFO |
typedef struct _PING6_PRIVATE_DATA | PING6_PRIVATE_DATA |
Variables | |
SHELL_PARAM_ITEM | Ping6ParamList [] |
CONST CHAR16 * | mIp6DstString |
CONST CHAR16 * | mIp6SrcString |
EFI_CPU_ARCH_PROTOCOL * | Cpu = NULL |
The implementation for Ping6 application.
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ping6.c.
UINT32 Ping6CalculateTick | ( | IN PING6_PRIVATE_DATA * | Private, |
IN UINT32 | Begin, | ||
IN UINT32 | End | ||
) |
EFI_STATUS Ping6CreateIpInstance | ( | IN PING6_PRIVATE_DATA * | Private | ) |
Create a valid IP6 instance.
[in] | Private | The pointer of PING6_PRIVATE_DATA. |
EFI_SUCCESS | Create a valid IP6 instance successfully. |
EFI_ABORTED | Locate handle with ip6 service binding protocol unsuccessfully. |
EFI_INVALID_PARAMETER | The source address is unspecified when the destination address is a link -ocal address. |
EFI_OUT_OF_RESOURCES | No memory is available on the platform. |
EFI_NOT_FOUND | The source address is not found. |
VOID Ping6DestroyIpInstance | ( | IN PING6_PRIVATE_DATA * | Private | ) |
VOID Ping6DestroyTxInfo | ( | IN PING6_ICMP6_TX_INFO * | TxInfo | ) |
VOID Ping6FreeRttTimer | ( | IN PING6_PRIVATE_DATA * | Private | ) |
EFI_IP6_COMPLETION_TOKEN * Ping6GenerateToken | ( | IN PING6_PRIVATE_DATA * | Private, |
IN UINT32 | TimeStamp, | ||
IN UINT16 | SequenceNum | ||
) |
Initial EFI_IP6_COMPLETION_TOKEN.
[in] | Private | The pointer of PING6_PRIVATE_DATA. |
[in] | TimeStamp | The TimeStamp of request. |
[in] | SequenceNum | The SequenceNum of request. |
UINT32 Ping6GetTimerPeriod | ( | VOID | ) |
EFI_STATUS Ping6InitRttTimer | ( | IN PING6_PRIVATE_DATA * | Private | ) |
The original intention is to send a request. Currently, the application retransmits an icmp6 echo request packet per second in sendnumber times that is specified by the user. Because nothing can be done here, all things move to the timer routine.
[in] | Event | A EFI_EVENT type event. |
[in] | Context | The pointer to Context. |
EFI_STATUS Ping6OnMatchEchoReply | ( | IN PING6_PRIVATE_DATA * | Private, |
IN ICMP6_ECHO_REQUEST_REPLY * | Packet | ||
) |
Match the request, and reply with SequenceNum/TimeStamp.
[in] | Private | The pointer to PING6_PRIVATE_DATA. |
[in] | Packet | The pointer to ICMP6_ECHO_REQUEST_REPLY. |
EFI_SUCCESS | The match is successful. |
EFI_NOT_FOUND | The reply can't be matched with any request. |
EFI_STATUS Ping6OnReceiveEchoReply | ( | IN PING6_PRIVATE_DATA * | Private | ) |
Place a completion token into the receive packet queue to receive the echo reply.
[in] | Private | The pointer of PING6_PRIVATE_DATA. |
EFI_SUCCESS | Put the token into the receive packet queue successfully. |
others | Put the token into the receive packet queue unsuccessfully. |
UINT32 Ping6ReadTime | ( | IN PING6_PRIVATE_DATA * | Private | ) |
EFI_STATUS Ping6SendEchoRequest | ( | IN PING6_PRIVATE_DATA * | Private | ) |
Transmit the EFI_IP6_COMPLETION_TOKEN.
[in] | Private | The pointer of PING6_PRIVATE_DATA. |
EFI_SUCCESS | Transmitted successfully. |
EFI_OUT_OF_RESOURCES | No memory is available on the platform. |
others | Transmitted unsuccessfully. |
SHELL_STATUS EFIAPI ShellCommandRunPing6 | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Function for 'ping6' command.
[in] | ImageHandle | Handle to the Image (NULL if Internal). |
[in] | SystemTable | Pointer to the System Table (NULL if Internal). |
SHELL_SUCCESS | The ping6 processed successfullly. |
others | The ping6 processed unsuccessfully. |
SHELL_STATUS ShellPing6 | ( | IN EFI_HANDLE | ImageHandle, |
IN UINT32 | SendNumber, | ||
IN UINT32 | BufferSize, | ||
IN EFI_IPv6_ADDRESS * | SrcAddress, | ||
IN EFI_IPv6_ADDRESS * | DstAddress | ||
) |
The Ping6 Process.
[in] | ImageHandle | The firmware allocated handle for the UEFI image. |
[in] | SendNumber | The send request count. |
[in] | BufferSize | The send buffer size. |
[in] | SrcAddress | The source IPv6 address. |
[in] | DstAddress | The destination IPv6 address. |
SHELL_SUCCESS | The ping6 processed successfullly. |
others | The ping6 processed unsuccessfully. |
EFI_CPU_ARCH_PROTOCOL* Cpu = NULL |
SHELL_PARAM_ITEM Ping6ParamList[] |