]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/Application/Ping6/Ping6.h
NetworkPkg: Support print help information using -? command.
[mirror_edk2.git] / NetworkPkg / Application / Ping6 / Ping6.h
CommitLineData
a3bcde70
HT
1/** @file\r
2 The interface function declaration of shell application Ping6 (Ping for v6 series).\r
3\r
be6cd654 4 Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
a3bcde70
HT
5\r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php.\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef _PING6_H_\r
17#define _PING6_H_\r
18\r
a3bcde70
HT
19#define PING6_DEFAULT_TIMEOUT 5000\r
20#define PING6_MAX_SEND_NUMBER 10000\r
21#define PING6_MAX_BUFFER_SIZE 32768\r
22#define PING6_ONE_SECOND 10000000\r
23\r
be6cd654
ZL
24//\r
25// String token ID of Ping6 command help message text.\r
26//\r
27GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID mStringPing6HelpToken = STRING_TOKEN (STR_PING6_HELP);\r
28\r
a3bcde70
HT
29//\r
30// A similar amount of time that passes in femtoseconds\r
31// for each increment of TimerValue. It is for NT32 only.\r
32//\r
33#define NTTIMERPERIOD 358049\r
34\r
35#pragma pack(1)\r
36\r
37typedef struct _ICMP6_ECHO_REQUEST_REPLY {\r
38 UINT8 Type;\r
39 UINT8 Code;\r
40 UINT16 Checksum;\r
41 UINT16 Identifier;\r
42 UINT16 SequenceNum;\r
43 UINT64 TimeStamp;\r
44 UINT8 Data[1];\r
45} ICMP6_ECHO_REQUEST_REPLY;\r
46\r
47#pragma pack()\r
48\r
49typedef struct _PING6_ICMP6_TX_INFO {\r
50 LIST_ENTRY Link;\r
51 UINT16 SequenceNum;\r
52 UINT64 TimeStamp;\r
53 EFI_IP6_COMPLETION_TOKEN *Token;\r
54} PING6_ICMP6_TX_INFO;\r
55\r
56typedef struct _PING6_PRIVATE_DATA {\r
57 EFI_HANDLE ImageHandle;\r
58 EFI_HANDLE NicHandle;\r
59 EFI_HANDLE Ip6ChildHandle;\r
60 EFI_IP6_PROTOCOL *Ip6;\r
61 EFI_EVENT Timer;\r
62\r
63 EFI_STATUS Status;\r
64 LIST_ENTRY TxList;\r
65 EFI_IP6_COMPLETION_TOKEN RxToken;\r
66 UINT16 RxCount;\r
67 UINT16 TxCount;\r
cda10fe4 68 UINT64 RttSum;\r
69 UINT64 RttMin;\r
70 UINT64 RttMax;\r
a3bcde70
HT
71 UINT32 SequenceNum;\r
72\r
73 EFI_IPv6_ADDRESS SrcAddress;\r
74 EFI_IPv6_ADDRESS DstAddress;\r
75 UINT32 SendNum;\r
76 UINT32 BufferSize;\r
77} PING6_PRIVATE_DATA;\r
78\r
79/**\r
80 Reads and returns the current value of register.\r
81 In IA64, the register is the Interval Timer Vector (ITV).\r
82 In X86(IA32/X64), the register is the Time Stamp Counter (TSC)\r
83\r
84 @return The current value of the register.\r
85\r
86**/\r
87UINT64\r
88ReadTime (\r
89 VOID\r
90 );\r
91\r
92#endif\r