]>
Commit | Line | Data |
---|---|---|
a3bcde70 HT |
1 | /** @file\r |
2 | The interface function declaration of shell application Ping6 (Ping for v6 series).\r | |
3 | \r | |
4 | Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
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 | |
19 | #define EFI_PING6_GUID \\r | |
20 | { \\r | |
21 | 0x3f0b2478, 0x3619, 0x46c5, {0x81, 0x50, 0xa5, 0xab, 0xdd, 0xb6, 0x6b, 0xd9} \\r | |
22 | }\r | |
23 | \r | |
24 | #define PING6_DEFAULT_TIMEOUT 5000\r | |
25 | #define PING6_MAX_SEND_NUMBER 10000\r | |
26 | #define PING6_MAX_BUFFER_SIZE 32768\r | |
27 | #define PING6_ONE_SECOND 10000000\r | |
28 | \r | |
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 | |
37 | typedef 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 | |
49 | typedef 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 | |
56 | typedef 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 | |
87 | UINT64\r | |
88 | ReadTime (\r | |
89 | VOID\r | |
90 | );\r | |
91 | \r | |
92 | #endif\r |