]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Application/IpsecConfig/ForEach.c
NetworkPkg: Remove IpSec driver and application
[mirror_edk2.git] / NetworkPkg / Application / IpsecConfig / ForEach.c
diff --git a/NetworkPkg/Application/IpsecConfig/ForEach.c b/NetworkPkg/Application/IpsecConfig/ForEach.c
deleted file mode 100644 (file)
index 6d82ee2..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/** @file\r
-  The implementation to go through each entry in IpSecConfig application.\r
-\r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
-\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include "IpSecConfig.h"\r
-#include "ForEach.h"\r
-\r
-\r
-/**\r
-  Enumerate all entries in the database to execute specified operations according to datatype.\r
-\r
-  @param[in] DataType    The value of EFI_IPSEC_CONFIG_DATA_TYPE.\r
-  @param[in] Routine     The pointer to the function of a specified operation.\r
-  @param[in] Context     The pointer to the context of a function.\r
-\r
-  @retval EFI_SUCCESS    Execute specified operation successfully.\r
-**/\r
-EFI_STATUS\r
-ForeachPolicyEntry (\r
-  IN EFI_IPSEC_CONFIG_DATA_TYPE    DataType,\r
-  IN VISIT_POLICY_ENTRY            Routine,\r
-  IN VOID                          *Context\r
-  )\r
-{\r
-  EFI_STATUS                   GetNextStatus;\r
-  EFI_STATUS                   GetDataStatus;\r
-  EFI_IPSEC_CONFIG_SELECTOR    *Selector;\r
-  VOID                         *Data;\r
-  UINTN                        SelectorSize;\r
-  UINTN                        DataSize;\r
-  BOOLEAN                      FirstGetNext;\r
-\r
-  FirstGetNext = TRUE;\r
-  SelectorSize = sizeof (EFI_IPSEC_CONFIG_SELECTOR);\r
-  Selector     = AllocateZeroPool (SelectorSize);\r
-\r
-  DataSize     = 0;\r
-  Data         = NULL;\r
-\r
-  while (TRUE) {\r
-    GetNextStatus = mIpSecConfig->GetNextSelector (\r
-                                    mIpSecConfig,\r
-                                    DataType,\r
-                                    &SelectorSize,\r
-                                    Selector\r
-                                    );\r
-    if (GetNextStatus == EFI_BUFFER_TOO_SMALL) {\r
-      gBS->FreePool (Selector);\r
-      Selector = FirstGetNext ? AllocateZeroPool (SelectorSize) : AllocatePool (SelectorSize);\r
-\r
-      GetNextStatus = mIpSecConfig->GetNextSelector (\r
-                                      mIpSecConfig,\r
-                                      DataType,\r
-                                      &SelectorSize,\r
-                                      Selector\r
-                                      );\r
-    }\r
-\r
-    if (EFI_ERROR (GetNextStatus)) {\r
-      break;\r
-    }\r
-\r
-    FirstGetNext = FALSE;\r
-\r
-    GetDataStatus = mIpSecConfig->GetData (\r
-                                    mIpSecConfig,\r
-                                    DataType,\r
-                                    Selector,\r
-                                    &DataSize,\r
-                                    Data\r
-                                    );\r
-    if (GetDataStatus == EFI_BUFFER_TOO_SMALL) {\r
-      if (Data != NULL) {\r
-        gBS->FreePool (Data);\r
-      }\r
-\r
-      Data = AllocateZeroPool (DataSize);\r
-      GetDataStatus = mIpSecConfig->GetData (\r
-                                      mIpSecConfig,\r
-                                      DataType,\r
-                                      Selector,\r
-                                      &DataSize,\r
-                                      Data\r
-                                      );\r
-    }\r
-\r
-    ASSERT_EFI_ERROR (GetDataStatus);\r
-\r
-    if (EFI_ERROR (Routine (Selector, Data, Context))) {\r
-      break;\r
-    }\r
-  }\r
-\r
-  if (Data != NULL) {\r
-    gBS->FreePool (Data);\r
-  }\r
-\r
-  if (Selector != NULL) {\r
-    gBS->FreePool (Selector);\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r