]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - NetworkPkg/Application/IpsecConfig/Dump.c
in Recovery path, doesn't warm reset even if MemoryTypeInfo data is changed.
[mirror_edk2.git] / NetworkPkg / Application / IpsecConfig / Dump.c
... / ...
CommitLineData
1/** @file\r
2 The implementation of dump policy entry function in IpSecConfig application.\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#include "IpSecConfig.h"\r
17#include "Dump.h"\r
18#include "ForEach.h"\r
19#include "Helper.h"\r
20\r
21/**\r
22 Private function called to get the version infomation from an EFI_IP_ADDRESS_INFO structure.\r
23\r
24 @param[in] AddressInfo The pointer to the EFI_IP_ADDRESS_INFO structure.\r
25\r
26 @return the value of version.\r
27**/\r
28UINTN\r
29GetVerFromAddrInfo (\r
30 IN EFI_IP_ADDRESS_INFO *AddressInfo\r
31)\r
32{\r
33 if((AddressInfo->PrefixLength <= 32) && (AddressInfo->Address.Addr[1] == 0) &&\r
34 (AddressInfo->Address.Addr[2] == 0) && (AddressInfo->Address.Addr[3] == 0)) {\r
35 return IP_VERSION_4;\r
36 } else {\r
37 return IP_VERSION_6;\r
38 }\r
39}\r
40\r
41/**\r
42 Private function called to get the version information from a EFI_IP_ADDRESS structure.\r
43\r
44 @param[in] Address The pointer to the EFI_IP_ADDRESS structure.\r
45\r
46 @return The value of the version.\r
47**/\r
48UINTN\r
49GetVerFromIpAddr (\r
50 IN EFI_IP_ADDRESS *Address\r
51)\r
52{\r
53 if ((Address->Addr[1] == 0) && (Address->Addr[2] == 0) && (Address->Addr[3] == 0)) {\r
54 return IP_VERSION_4;\r
55 } else {\r
56 return IP_VERSION_6;\r
57 }\r
58}\r
59\r
60/**\r
61 Private function called to print an ASCII string in unicode char format.\r
62\r
63 @param[in] Str The pointer to the ASCII string.\r
64 @param[in] Length The value of the ASCII string length.\r
65**/\r
66VOID\r
67DumpAsciiString (\r
68 IN CHAR8 *Str,\r
69 IN UINTN Length\r
70 )\r
71{\r
72 UINTN Index;\r
73 for (Index = 0; Index < Length; Index++) {\r
74 Print (L"%c", (CHAR16) Str[Index]);\r
75 }\r
76}\r
77\r
78/**\r
79 Private function called to print EFI_IP_ADDRESS_INFO content.\r
80\r
81 @param[in] AddressInfo The pointer to the EFI_IP_ADDRESS_INFO structure.\r
82**/\r
83VOID\r
84DumpAddressInfo (\r
85 IN EFI_IP_ADDRESS_INFO *AddressInfo\r
86 )\r
87{\r
88 if (IP_VERSION_4 == GetVerFromAddrInfo (AddressInfo)) {\r
89 Print (\r
90 L"%d.%d.%d.%d",\r
91 (UINTN) AddressInfo->Address.v4.Addr[0],\r
92 (UINTN) AddressInfo->Address.v4.Addr[1],\r
93 (UINTN) AddressInfo->Address.v4.Addr[2],\r
94 (UINTN) AddressInfo->Address.v4.Addr[3]\r
95 );\r
96 if (AddressInfo->PrefixLength != 32) {\r
97 Print (L"/%d", (UINTN) AddressInfo->PrefixLength);\r
98 }\r
99 }\r
100\r
101 if (IP_VERSION_6 == GetVerFromAddrInfo (AddressInfo)) {\r
102 Print (\r
103 L"%x:%x:%x:%x:%x:%x:%x:%x",\r
104 (((UINT16) AddressInfo->Address.v6.Addr[0]) << 8) | ((UINT16) AddressInfo->Address.v6.Addr[1]),\r
105 (((UINT16) AddressInfo->Address.v6.Addr[2]) << 8) | ((UINT16) AddressInfo->Address.v6.Addr[3]),\r
106 (((UINT16) AddressInfo->Address.v6.Addr[4]) << 8) | ((UINT16) AddressInfo->Address.v6.Addr[5]),\r
107 (((UINT16) AddressInfo->Address.v6.Addr[6]) << 8) | ((UINT16) AddressInfo->Address.v6.Addr[7]),\r
108 (((UINT16) AddressInfo->Address.v6.Addr[8]) << 8) | ((UINT16) AddressInfo->Address.v6.Addr[9]),\r
109 (((UINT16) AddressInfo->Address.v6.Addr[10]) << 8) | ((UINT16) AddressInfo->Address.v6.Addr[11]),\r
110 (((UINT16) AddressInfo->Address.v6.Addr[12]) << 8) | ((UINT16) AddressInfo->Address.v6.Addr[13]),\r
111 (((UINT16) AddressInfo->Address.v6.Addr[14]) << 8) | ((UINT16) AddressInfo->Address.v6.Addr[15])\r
112 );\r
113 if (AddressInfo->PrefixLength != 128) {\r
114 Print (L"/%d", AddressInfo->PrefixLength);\r
115 }\r
116 }\r
117}\r
118\r
119/**\r
120 Private function called to print EFI_IP_ADDRESS content.\r
121\r
122 @param[in] IpAddress The pointer to the EFI_IP_ADDRESS structure.\r
123**/\r
124VOID\r
125DumpIpAddress (\r
126 IN EFI_IP_ADDRESS *IpAddress\r
127 )\r
128{\r
129 if (IP_VERSION_4 == GetVerFromIpAddr (IpAddress)) {\r
130 Print (\r
131 L"%d.%d.%d.%d",\r
132 (UINTN) IpAddress->v4.Addr[0],\r
133 (UINTN) IpAddress->v4.Addr[1],\r
134 (UINTN) IpAddress->v4.Addr[2],\r
135 (UINTN) IpAddress->v4.Addr[3]\r
136 );\r
137 }\r
138\r
139 if (IP_VERSION_6 == GetVerFromIpAddr (IpAddress)) {\r
140 Print (\r
141 L"%x:%x:%x:%x:%x:%x:%x:%x",\r
142 (((UINT16) IpAddress->v6.Addr[0]) << 8) | ((UINT16) IpAddress->v6.Addr[1]),\r
143 (((UINT16) IpAddress->v6.Addr[2]) << 8) | ((UINT16) IpAddress->v6.Addr[3]),\r
144 (((UINT16) IpAddress->v6.Addr[4]) << 8) | ((UINT16) IpAddress->v6.Addr[5]),\r
145 (((UINT16) IpAddress->v6.Addr[6]) << 8) | ((UINT16) IpAddress->v6.Addr[7]),\r
146 (((UINT16) IpAddress->v6.Addr[8]) << 8) | ((UINT16) IpAddress->v6.Addr[9]),\r
147 (((UINT16) IpAddress->v6.Addr[10]) << 8) | ((UINT16) IpAddress->v6.Addr[11]),\r
148 (((UINT16) IpAddress->v6.Addr[12]) << 8) | ((UINT16) IpAddress->v6.Addr[13]),\r
149 (((UINT16) IpAddress->v6.Addr[14]) << 8) | ((UINT16) IpAddress->v6.Addr[15])\r
150 );\r
151 }\r
152\r
153}\r
154\r
155/**\r
156 Private function called to print EFI_IPSEC_SPD_SELECTOR content.\r
157\r
158 @param[in] Selector The pointer to the EFI_IPSEC_SPD_SELECTOR structure.\r
159**/\r
160VOID\r
161DumpSpdSelector (\r
162 IN EFI_IPSEC_SPD_SELECTOR *Selector\r
163 )\r
164{\r
165 UINT32 Index;\r
166 CHAR16 *Str;\r
167\r
168 for (Index = 0; Index < Selector->LocalAddressCount; Index++) {\r
169 if (Index > 0) {\r
170 Print (L",");\r
171 }\r
172\r
173 DumpAddressInfo (&Selector->LocalAddress[Index]);\r
174 }\r
175\r
176 if (Index == 0) {\r
177 Print (L"localhost");\r
178 }\r
179\r
180 Print (L" -> ");\r
181\r
182 for (Index = 0; Index < Selector->RemoteAddressCount; Index++) {\r
183 if (Index > 0) {\r
184 Print (L",");\r
185 }\r
186\r
187 DumpAddressInfo (&Selector->RemoteAddress[Index]);\r
188 }\r
189\r
190 Str = MapIntegerToString (Selector->NextLayerProtocol, mMapIpProtocol);\r
191 if (Str != NULL) {\r
192 Print (L" %s", Str);\r
193 } else {\r
194 Print (L" proto:%d", (UINTN) Selector->NextLayerProtocol);\r
195 }\r
196\r
197 if ((Selector->NextLayerProtocol == EFI_IP4_PROTO_TCP) || (Selector->NextLayerProtocol == EFI_IP4_PROTO_UDP)) {\r
198 Print (L" port:");\r
199 if (Selector->LocalPort != EFI_IPSEC_ANY_PORT) {\r
200 Print (L"%d", Selector->LocalPort);\r
201 if (Selector->LocalPortRange != 0) {\r
202 Print (L"~%d", (UINTN) Selector->LocalPort + Selector->LocalPortRange);\r
203 }\r
204 } else {\r
205 Print (L"any");\r
206 }\r
207\r
208 Print (L" -> ");\r
209 if (Selector->RemotePort != EFI_IPSEC_ANY_PORT) {\r
210 Print (L"%d", Selector->RemotePort);\r
211 if (Selector->RemotePortRange != 0) {\r
212 Print (L"~%d", (UINTN) Selector->RemotePort + Selector->RemotePortRange);\r
213 }\r
214 } else {\r
215 Print (L"any");\r
216 }\r
217 } else if (Selector->NextLayerProtocol == EFI_IP4_PROTO_ICMP) {\r
218 Print (L" class/code:");\r
219 if (Selector->LocalPort != 0) {\r
220 Print (L"%d", (UINTN) (UINT8) Selector->LocalPort);\r
221 } else {\r
222 Print (L"any");\r
223 }\r
224\r
225 Print (L"/");\r
226 if (Selector->RemotePort != 0) {\r
227 Print (L"%d", (UINTN) (UINT8) Selector->RemotePort);\r
228 } else {\r
229 Print (L"any");\r
230 }\r
231 }\r
232}\r
233\r
234/**\r
235 Print EFI_IPSEC_SPD_SELECTOR and EFI_IPSEC_SPD_DATA content.\r
236\r
237 @param[in] Selector The pointer to the EFI_IPSEC_SPD_SELECTOR structure.\r
238 @param[in] Data The pointer to the EFI_IPSEC_SPD_DATA structure.\r
239 @param[in] EntryIndex The pointer to the Index in SPD Database.\r
240\r
241 @retval EFI_SUCCESS Dump SPD information successfully.\r
242**/\r
243EFI_STATUS\r
244DumpSpdEntry (\r
245 IN EFI_IPSEC_SPD_SELECTOR *Selector,\r
246 IN EFI_IPSEC_SPD_DATA *Data,\r
247 IN UINTN *EntryIndex\r
248 )\r
249{\r
250 BOOLEAN HasPre;\r
251 CHAR16 DataName[128];\r
252 CHAR16 *String1;\r
253 CHAR16 *String2;\r
254 CHAR16 *String3;\r
255 UINT8 Index;\r
256\r
257 Print (L"%d.", (*EntryIndex)++);\r
258\r
259 //\r
260 // xxx.xxx.xxx.xxx/yy -> xxx.xxx.xxx.xx/yy proto:23 port:100~300 -> 300~400\r
261 // Protect PF:0x34323423 Name:First Entry\r
262 // ext-sequence sequence-overflow fragcheck life:[B0,S1024,H3600]\r
263 // ESP algo1 algo2 Tunnel [xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx set]\r
264 //\r
265\r
266 DumpSpdSelector (Selector);\r
267 Print (L"\n ");\r
268\r
269 Print (L"%s ", MapIntegerToString (Data->Action, mMapIpSecAction));\r
270 Print (L"PF:%08x ", Data->PackageFlag);\r
271\r
272 Index = 0;\r
273 while (Data->Name[Index] != 0) {\r
274 DataName[Index] = (CHAR16) Data->Name[Index];\r
275 Index++;\r
276 ASSERT (Index < 128);\r
277 }\r
278 DataName[Index] = L'\0';\r
279\r
280 Print (L"Name:%s", DataName);\r
281\r
282 if (Data->Action == EfiIPsecActionProtect) {\r
283 Print (L"\n ");\r
284 if (Data->ProcessingPolicy->ExtSeqNum) {\r
285 Print (L"ext-sequence ");\r
286 }\r
287\r
288 if (Data->ProcessingPolicy->SeqOverflow) {\r
289 Print (L"sequence-overflow ");\r
290 }\r
291\r
292 if (Data->ProcessingPolicy->FragCheck) {\r
293 Print (L"fragment-check ");\r
294 }\r
295\r
296 HasPre = FALSE;\r
297 if (Data->ProcessingPolicy->SaLifetime.ByteCount != 0) {\r
298 Print (HasPre ? L"," : L"life:[");\r
299 Print (L"%lxB", Data->ProcessingPolicy->SaLifetime.ByteCount);\r
300 HasPre = TRUE;\r
301 }\r
302\r
303 if (Data->ProcessingPolicy->SaLifetime.SoftLifetime != 0) {\r
304 Print (HasPre ? L"," : L"life:[");\r
305 Print (L"%lxs", Data->ProcessingPolicy->SaLifetime.SoftLifetime);\r
306 HasPre = TRUE;\r
307 }\r
308\r
309 if (Data->ProcessingPolicy->SaLifetime.HardLifetime != 0) {\r
310 Print (HasPre ? L"," : L"life:[");\r
311 Print (L"%lxS", Data->ProcessingPolicy->SaLifetime.HardLifetime);\r
312 HasPre = TRUE;\r
313 }\r
314\r
315 if (HasPre) {\r
316 Print (L"]");\r
317 }\r
318\r
319 if (HasPre || Data->ProcessingPolicy->ExtSeqNum ||\r
320 Data->ProcessingPolicy->SeqOverflow || Data->ProcessingPolicy->FragCheck) {\r
321 Print (L"\n ");\r
322 }\r
323\r
324 String1 = MapIntegerToString (Data->ProcessingPolicy->Proto, mMapIpSecProtocol);\r
325 String2 = MapIntegerToString (Data->ProcessingPolicy->AuthAlgoId, mMapAuthAlgo);\r
326 String3 = MapIntegerToString (Data->ProcessingPolicy->EncAlgoId, mMapEncAlgo);\r
327 Print (\r
328 L"%s Auth:%s Encrypt:%s ",\r
329 String1,\r
330 String2,\r
331 String3\r
332 );\r
333\r
334 Print (L"%s ", MapIntegerToString (Data->ProcessingPolicy->Mode, mMapIpSecMode));\r
335 if (Data->ProcessingPolicy->Mode == EfiIPsecTunnel) {\r
336 Print (L"[");\r
337 DumpIpAddress (&Data->ProcessingPolicy->TunnelOption->LocalTunnelAddress);\r
338 Print (L" -> ");\r
339 DumpIpAddress (&Data->ProcessingPolicy->TunnelOption->RemoteTunnelAddress);\r
340 Print (L" %s]", MapIntegerToString (Data->ProcessingPolicy->TunnelOption->DF, mMapDfOption));\r
341 }\r
342 }\r
343\r
344 Print (L"\n");\r
345\r
346 return EFI_SUCCESS;\r
347}\r
348\r
349/**\r
350 Print EFI_IPSEC_SA_ID and EFI_IPSEC_SA_DATA2 content.\r
351\r
352 @param[in] SaId The pointer to the EFI_IPSEC_SA_ID structure.\r
353 @param[in] Data The pointer to the EFI_IPSEC_SA_DATA2 structure.\r
354 @param[in] EntryIndex The pointer to the Index in the SAD Database.\r
355\r
356 @retval EFI_SUCCESS Dump SAD information successfully.\r
357**/\r
358EFI_STATUS\r
359DumpSadEntry (\r
360 IN EFI_IPSEC_SA_ID *SaId,\r
361 IN EFI_IPSEC_SA_DATA2 *Data,\r
362 IN UINTN *EntryIndex\r
363 )\r
364{\r
365 BOOLEAN HasPre;\r
366 CHAR16 *AuthAlgoStr;\r
367 CHAR16 *EncAlgoStr;\r
368 CHAR8 *AuthKeyAsciiStr;\r
369 CHAR8 *EncKeyAsciiStr;\r
370\r
371 AuthAlgoStr = NULL;\r
372 EncAlgoStr = NULL;\r
373 AuthKeyAsciiStr = NULL;\r
374 EncKeyAsciiStr = NULL;\r
375\r
376 //\r
377 // SPI:1234 ESP Destination:xxx.xxx.xxx.xxx\r
378 // Mode:Transport SeqNum:134 AntiReplayWin:64 life:[0B,1023s,3400S] PathMTU:34\r
379 // Auth:xxxx/password Encrypt:yyyy/password\r
380 // xxx.xxx.xxx.xxx/yy -> xxx.xxx.xxx.xx/yy proto:23 port:100~300 -> 300~400\r
381 //\r
382\r
383 Print (L"%d.", (*EntryIndex)++);\r
384 Print (L"0x%x %s ", (UINTN) SaId->Spi, MapIntegerToString (SaId->Proto, mMapIpSecProtocol));\r
385 if (Data->Mode == EfiIPsecTunnel) {\r
386 Print (L"TunnelSourceAddress:");\r
387 DumpIpAddress (&Data->TunnelSourceAddress);\r
388 Print (L"\n");\r
389 Print (L"TunnelDestination:");\r
390 DumpIpAddress (&Data->TunnelDestinationAddress);\r
391 Print (L"\n");\r
392 }\r
393\r
394 Print (\r
395 L" Mode:%s SeqNum:%lx AntiReplayWin:%d ",\r
396 MapIntegerToString (Data->Mode, mMapIpSecMode),\r
397 Data->SNCount,\r
398 (UINTN) Data->AntiReplayWindows\r
399 );\r
400\r
401 HasPre = FALSE;\r
402 if (Data->SaLifetime.ByteCount != 0) {\r
403 Print (HasPre ? L"," : L"life:[");\r
404 Print (L"%lxB", Data->SaLifetime.ByteCount);\r
405 HasPre = TRUE;\r
406 }\r
407\r
408 if (Data->SaLifetime.SoftLifetime != 0) {\r
409 Print (HasPre ? L"," : L"life:[");\r
410 Print (L"%lxs", Data->SaLifetime.SoftLifetime);\r
411 HasPre = TRUE;\r
412 }\r
413\r
414 if (Data->SaLifetime.HardLifetime != 0) {\r
415 Print (HasPre ? L"," : L"life:[");\r
416 Print (L"%lxS", Data->SaLifetime.HardLifetime);\r
417 HasPre = TRUE;\r
418 }\r
419\r
420 if (HasPre) {\r
421 Print (L"] ");\r
422 }\r
423\r
424 Print (L"PathMTU:%d\n", (UINTN) Data->PathMTU);\r
425\r
426 if (SaId->Proto == EfiIPsecAH) {\r
427 Print (\r
428 L" Auth:%s/%s\n",\r
429 MapIntegerToString (Data->AlgoInfo.AhAlgoInfo.AuthAlgoId, mMapAuthAlgo),\r
430 Data->AlgoInfo.AhAlgoInfo.AuthKey\r
431 );\r
432 } else {\r
433 AuthAlgoStr = MapIntegerToString (Data->AlgoInfo.EspAlgoInfo.AuthAlgoId, mMapAuthAlgo);\r
434 EncAlgoStr = MapIntegerToString (Data->AlgoInfo.EspAlgoInfo.EncAlgoId, mMapEncAlgo);\r
435\r
436 AuthKeyAsciiStr = AllocateZeroPool (Data->AlgoInfo.EspAlgoInfo.AuthKeyLength + 1);\r
437 ASSERT (AuthKeyAsciiStr != NULL);\r
438 CopyMem (AuthKeyAsciiStr, Data->AlgoInfo.EspAlgoInfo.AuthKey, Data->AlgoInfo.EspAlgoInfo.AuthKeyLength);\r
439 AuthKeyAsciiStr[Data->AlgoInfo.EspAlgoInfo.AuthKeyLength] = '\0';\r
440\r
441 EncKeyAsciiStr = AllocateZeroPool (Data->AlgoInfo.EspAlgoInfo.EncKeyLength + 1);\r
442 ASSERT (EncKeyAsciiStr != NULL) ;\r
443 CopyMem (EncKeyAsciiStr, Data->AlgoInfo.EspAlgoInfo.EncKey, Data->AlgoInfo.EspAlgoInfo.EncKeyLength);\r
444 EncKeyAsciiStr[Data->AlgoInfo.EspAlgoInfo.EncKeyLength] = '\0';\r
445\r
446 Print (\r
447 L" Auth:%s/%a Encrypt:%s/%a\n",\r
448 AuthAlgoStr, \r
449 AuthKeyAsciiStr,\r
450 EncAlgoStr,\r
451 EncKeyAsciiStr\r
452 );\r
453 \r
454 FreePool (AuthKeyAsciiStr);\r
455 FreePool (EncKeyAsciiStr);\r
456 }\r
457\r
458 if (Data->SpdSelector != NULL) {\r
459 Print (L" ");\r
460 DumpSpdSelector (Data->SpdSelector);\r
461 Print (L"\n");\r
462 }\r
463\r
464 return EFI_SUCCESS;\r
465}\r
466\r
467/**\r
468 Print EFI_IPSEC_PAD_ID and EFI_IPSEC_PAD_DATA content.\r
469\r
470 @param[in] PadId The pointer to the EFI_IPSEC_PAD_ID structure.\r
471 @param[in] Data The pointer to the EFI_IPSEC_PAD_DATA structure.\r
472 @param[in] EntryIndex The pointer to the Index in the PAD Database.\r
473\r
474 @retval EFI_SUCCESS Dump PAD information successfully.\r
475**/\r
476EFI_STATUS\r
477DumpPadEntry (\r
478 IN EFI_IPSEC_PAD_ID *PadId,\r
479 IN EFI_IPSEC_PAD_DATA *Data,\r
480 IN UINTN *EntryIndex\r
481 )\r
482{\r
483 CHAR16 *String1;\r
484 CHAR16 *String2;\r
485\r
486 //\r
487 // ADDR:10.23.17.34/15\r
488 // IDEv1 PreSharedSecret IKE-ID\r
489 // password\r
490 //\r
491\r
492 Print (L"%d.", (*EntryIndex)++);\r
493\r
494 if (PadId->PeerIdValid) {\r
495 Print (L"ID:%s", PadId->Id.PeerId);\r
496 } else {\r
497 Print (L"ADDR:");\r
498 DumpAddressInfo (&PadId->Id.IpAddress);\r
499 }\r
500\r
501 Print (L"\n");\r
502\r
503 String1 = MapIntegerToString (Data->AuthProtocol, mMapAuthProto);\r
504 String2 = MapIntegerToString (Data->AuthMethod, mMapAuthMethod);\r
505 Print (\r
506 L" %s %s",\r
507 String1,\r
508 String2\r
509 );\r
510\r
511 if (Data->IkeIdFlag) {\r
512 Print (L"IKE-ID");\r
513 }\r
514\r
515 Print (L"\n");\r
516\r
517 if (Data->AuthData != NULL) {\r
518 DumpAsciiString (Data->AuthData, Data->AuthDataSize);\r
519 Print (L"\n");\r
520 }\r
521\r
522 if (Data->RevocationData != NULL) {\r
523 Print (L" %s\n", Data->RevocationData);\r
524 }\r
525\r
526 return EFI_SUCCESS;\r
527\r
528}\r
529\r
530VISIT_POLICY_ENTRY mDumpPolicyEntry[] = {\r
531 (VISIT_POLICY_ENTRY) DumpSpdEntry,\r
532 (VISIT_POLICY_ENTRY) DumpSadEntry,\r
533 (VISIT_POLICY_ENTRY) DumpPadEntry\r
534};\r
535\r
536/**\r
537 Print all entry information in the database according to datatype.\r
538\r
539 @param[in] DataType The value of EFI_IPSEC_CONFIG_DATA_TYPE.\r
540 @param[in] ParamPackage The pointer to the ParamPackage list.\r
541\r
542 @retval EFI_SUCCESS Dump all information successfully.\r
543 @retval Others Some mistaken case.\r
544**/\r
545EFI_STATUS\r
546ListPolicyEntry (\r
547 IN EFI_IPSEC_CONFIG_DATA_TYPE DataType,\r
548 IN LIST_ENTRY *ParamPackage\r
549 )\r
550{\r
551 UINTN EntryIndex;\r
552\r
553 EntryIndex = 0;\r
554 return ForeachPolicyEntry (DataType, mDumpPolicyEntry[DataType], &EntryIndex);\r
555}\r
556\r