]>
Commit | Line | Data |
---|---|---|
a3bcde70 HT |
1 | /** @file\r |
2 | The interface function declaration of shell application Ping6 (Ping for v6 series).\r | |
3 | \r | |
9bdc6592 | 4 | Copyright (c) 2009 - 2011, 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 | |
24 | //\r | |
25 | // A similar amount of time that passes in femtoseconds\r | |
26 | // for each increment of TimerValue. It is for NT32 only.\r | |
27 | //\r | |
28 | #define NTTIMERPERIOD 358049\r | |
29 | \r | |
30 | #pragma pack(1)\r | |
31 | \r | |
32 | typedef struct _ICMP6_ECHO_REQUEST_REPLY {\r | |
33 | UINT8 Type;\r | |
34 | UINT8 Code;\r | |
35 | UINT16 Checksum;\r | |
36 | UINT16 Identifier;\r | |
37 | UINT16 SequenceNum;\r | |
38 | UINT64 TimeStamp;\r | |
39 | UINT8 Data[1];\r | |
40 | } ICMP6_ECHO_REQUEST_REPLY;\r | |
41 | \r | |
42 | #pragma pack()\r | |
43 | \r | |
44 | typedef struct _PING6_ICMP6_TX_INFO {\r | |
45 | LIST_ENTRY Link;\r | |
46 | UINT16 SequenceNum;\r | |
47 | UINT64 TimeStamp;\r | |
48 | EFI_IP6_COMPLETION_TOKEN *Token;\r | |
49 | } PING6_ICMP6_TX_INFO;\r | |
50 | \r | |
51 | typedef struct _PING6_PRIVATE_DATA {\r | |
52 | EFI_HANDLE ImageHandle;\r | |
53 | EFI_HANDLE NicHandle;\r | |
54 | EFI_HANDLE Ip6ChildHandle;\r | |
55 | EFI_IP6_PROTOCOL *Ip6;\r | |
56 | EFI_EVENT Timer;\r | |
57 | \r | |
58 | EFI_STATUS Status;\r | |
59 | LIST_ENTRY TxList;\r | |
60 | EFI_IP6_COMPLETION_TOKEN RxToken;\r | |
61 | UINT16 RxCount;\r | |
62 | UINT16 TxCount;\r | |
cda10fe4 | 63 | UINT64 RttSum;\r |
64 | UINT64 RttMin;\r | |
65 | UINT64 RttMax;\r | |
a3bcde70 HT |
66 | UINT32 SequenceNum;\r |
67 | \r | |
68 | EFI_IPv6_ADDRESS SrcAddress;\r | |
69 | EFI_IPv6_ADDRESS DstAddress;\r | |
70 | UINT32 SendNum;\r | |
71 | UINT32 BufferSize;\r | |
72 | } PING6_PRIVATE_DATA;\r | |
73 | \r | |
74 | /**\r | |
75 | Reads and returns the current value of register.\r | |
76 | In IA64, the register is the Interval Timer Vector (ITV).\r | |
77 | In X86(IA32/X64), the register is the Time Stamp Counter (TSC)\r | |
78 | \r | |
79 | @return The current value of the register.\r | |
80 | \r | |
81 | **/\r | |
82 | UINT64\r | |
83 | ReadTime (\r | |
84 | VOID\r | |
85 | );\r | |
86 | \r | |
87 | #endif\r |