ForEach.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /** @file
  2. The internal structure and function declaration of the implementation
  3. to go through each entry in IpSecConfig application.
  4. Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef _FOREACH_H_
  8. #define _FOREACH_H_
  9. /**
  10. The prototype for the DumpSpdEntry()/DumpSadEntry()/DumpPadEntry().
  11. Print EFI_IPSEC_CONFIG_SELECTOR and corresponding content.
  12. @param[in] Selector The pointer to the EFI_IPSEC_CONFIG_SELECTOR union.
  13. @param[in] Data The pointer to the corresponding data.
  14. @param[in] Context The pointer to the Index in SPD/SAD/PAD Database.
  15. @retval EFI_SUCCESS Dump SPD/SAD/PAD information successfully.
  16. **/
  17. typedef
  18. EFI_STATUS
  19. (*VISIT_POLICY_ENTRY) (
  20. IN EFI_IPSEC_CONFIG_SELECTOR *Selector,
  21. IN VOID *Data,
  22. IN VOID *Context
  23. );
  24. /**
  25. Enumerate all entry in the database to execute a specified operation according to datatype.
  26. @param[in] DataType The value of EFI_IPSEC_CONFIG_DATA_TYPE.
  27. @param[in] Routine The pointer to function of a specified operation.
  28. @param[in] Context The pointer to the context of a function.
  29. @retval EFI_SUCCESS Execute specified operation successfully.
  30. **/
  31. EFI_STATUS
  32. ForeachPolicyEntry (
  33. IN EFI_IPSEC_CONFIG_DATA_TYPE DataType,
  34. IN VISIT_POLICY_ENTRY Routine,
  35. IN VOID *Context
  36. );
  37. #endif