1 /** @file
2   The internal structure and function declaration to construct ENTRY_INDEXER in
3   IpSecConfig application.
4 
5   Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
6 
7   This program and the accompanying materials
8   are licensed and made available under the terms and conditions of the BSD License
9   which accompanies this distribution.  The full text of the license may be found at
10   http://opensource.org/licenses/bsd-license.php.
11 
12   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 
15 **/
16 
17 #ifndef _INDEXER_H_
18 #define _INDEXER_H_
19 
20 typedef struct {
21   UINT8    *Name;
22   UINTN    Index;    // Used only if Name is NULL.
23 } SPD_ENTRY_INDEXER;
24 
25 typedef struct {
26   EFI_IPSEC_SA_ID    SaId;
27   UINTN              Index;
28 } SAD_ENTRY_INDEXER;
29 
30 typedef struct {
31   EFI_IPSEC_PAD_ID    PadId;
32   UINTN               Index;
33 } PAD_ENTRY_INDEXER;
34 
35 typedef union {
36   SPD_ENTRY_INDEXER    Spd;
37   SAD_ENTRY_INDEXER    Sad;
38   PAD_ENTRY_INDEXER    Pad;
39 } POLICY_ENTRY_INDEXER;
40 
41 /**
42   The prototype for the ConstructSpdIndexer()/ConstructSadIndexer()/ConstructPadIndexer().
43   Fill in SPD_ENTRY_INDEXER/SAD_ENTRY_INDEXER/PAD_ENTRY_INDEXER through ParamPackage list.
44 
45   @param[in, out] Indexer         The pointer to the POLICY_ENTRY_INDEXER union.
46   @param[in]      ParamPackage    The pointer to the ParamPackage list.
47 
48   @retval EFI_SUCCESS    Filled in POLICY_ENTRY_INDEXER successfully.
49 **/
50 typedef
51 EFI_STATUS
52 (* CONSTRUCT_POLICY_ENTRY_INDEXER) (
53   IN POLICY_ENTRY_INDEXER    *Indexer,
54   IN LIST_ENTRY              *ParamPackage
55 );
56 
57 extern CONSTRUCT_POLICY_ENTRY_INDEXER mConstructPolicyEntryIndexer[];
58 #endif
59