2 The internal structure and function declaration in IpSecConfig application.
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _IPSEC_CONFIG_H_
17 #define _IPSEC_CONFIG_H_
19 #include <Library/BaseMemoryLib.h>
20 #include <Library/UefiLib.h>
21 #include <Library/ShellLib.h>
22 #include <Library/DebugLib.h>
23 #include <Library/MemoryAllocationLib.h>
24 #include <Library/UefiBootServicesTableLib.h>
25 #include <Library/NetLib.h>
27 #include <Protocol/IpSecConfig.h>
29 #define EFI_IPSEC_CONFIG_GUID \
31 0x9db0c3ac, 0xd9d2, 0x4f96, {0x9e, 0xd7, 0x6d, 0xa6, 0x12, 0xa4, 0xf3, 0x27} \
34 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
36 #define IPSECCONFIG_STATUS_NAME L"IpSecStatus"
38 #define BIT(x) (UINT32) (1 << (x))
40 #define IPSEC_STATUS_DISABLED 0x0
41 #define IPSEC_STATUS_ENABLED 0x1
43 #define EFI_IP4_PROTO_ICMP 0x1
44 #define EFI_IP4_PROTO_TCP 0x6
45 #define EFI_IP4_PROTO_UDP 0x11
47 #define EFI_IPSEC_ANY_PROTOCOL 0xFFFF
48 #define EFI_IPSEC_ANY_PORT 0
51 /// IPsec Authentication Algorithm Definition
52 /// The number value definition is aligned to IANA assignment
54 #define IPSEC_AALG_NONE 0x00
55 #define IPSEC_AALG_MD5HMAC 0x01
56 #define IPSEC_AALG_SHA1HMAC 0x02
57 #define IPSEC_AALG_SHA2_256HMAC 0x05
58 #define IPSEC_AALG_SHA2_384HMAC 0x06
59 #define IPSEC_AALG_SHA2_512HMAC 0x07
60 #define IPSEC_AALG_AES_XCBC_MAC 0x09
61 #define IPSEC_AALG_NULL 0xFB
64 /// IPsec Encryption Algorithm Definition
65 /// The number value definition is aligned to IANA assignment
67 #define IPSEC_EALG_NONE 0x00
68 #define IPSEC_EALG_DESCBC 0x02
69 #define IPSEC_EALG_3DESCBC 0x03
70 #define IPSEC_EALG_CASTCBC 0x06
71 #define IPSEC_EALG_BLOWFISHCBC 0x07
72 #define IPSEC_EALG_NULL 0x0B
73 #define IPSEC_EALG_AESCBC 0x0C
74 #define IPSEC_EALG_AESCTR 0x0D
75 #define IPSEC_EALG_AES_CCM_ICV8 0x0E
76 #define IPSEC_EALG_AES_CCM_ICV12 0x0F
77 #define IPSEC_EALG_AES_CCM_ICV16 0x10
78 #define IPSEC_EALG_AES_GCM_ICV8 0x12
79 #define IPSEC_EALG_AES_GCM_ICV12 0x13
80 #define IPSEC_EALG_AES_GCM_ICV16 0x14
93 SHELL_PARAM_TYPE Type
;
95 UINTN OriginalPosition
;
96 } SHELL_PARAM_PACKAGE
;
103 extern EFI_IPSEC_CONFIG_PROTOCOL
*mIpSecConfig
;
104 extern EFI_HII_HANDLE mHiiHandle
;
105 extern CHAR16 mAppName
[];
110 extern STR2INT mMapPolicy
[];
115 extern STR2INT mMapIpProtocol
[];
120 extern STR2INT mMapIpSecAction
[];
125 extern STR2INT mMapIpSecMode
[];
130 extern STR2INT mMapDfOption
[];
135 extern STR2INT mMapIpSecProtocol
[];
139 extern STR2INT mMapAuthAlgo
[];
144 extern STR2INT mMapEncAlgo
[];
148 extern STR2INT mMapAuthProto
[];
153 extern STR2INT mMapAuthMethod
[];