]>
Commit | Line | Data |
---|---|---|
a3bcde70 HT |
1 | /** @file\r |
2 | The internal structure and function declaration 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 | #ifndef _IPSEC_CONFIG_H_\r | |
17 | #define _IPSEC_CONFIG_H_\r | |
18 | \r | |
19 | #include <Library/BaseMemoryLib.h>\r | |
20 | #include <Library/UefiLib.h>\r | |
21 | #include <Library/ShellLib.h>\r | |
22 | #include <Library/DebugLib.h>\r | |
23 | #include <Library/MemoryAllocationLib.h>\r | |
24 | #include <Library/UefiBootServicesTableLib.h>\r | |
25 | #include <Library/NetLib.h>\r | |
26 | \r | |
27 | #include <Protocol/IpSecConfig.h>\r | |
28 | \r | |
29 | #define EFI_IPSEC_CONFIG_GUID \\r | |
30 | { \\r | |
31 | 0x9db0c3ac, 0xd9d2, 0x4f96, {0x9e, 0xd7, 0x6d, 0xa6, 0x12, 0xa4, 0xf3, 0x27} \\r | |
32 | }\r | |
33 | \r | |
34 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))\r | |
35 | \r | |
36 | #define IPSECCONFIG_STATUS_NAME L"IpSecStatus"\r | |
37 | \r | |
38 | #define BIT(x) (UINT32) (1 << (x))\r | |
39 | \r | |
40 | #define IPSEC_STATUS_DISABLED 0x0\r | |
41 | #define IPSEC_STATUS_ENABLED 0x1\r | |
42 | \r | |
43 | #define EFI_IP4_PROTO_ICMP 0x1\r | |
44 | #define EFI_IP4_PROTO_TCP 0x6\r | |
45 | #define EFI_IP4_PROTO_UDP 0x11\r | |
46 | \r | |
47 | #define EFI_IPSEC_ANY_PROTOCOL 0xFFFF\r | |
48 | #define EFI_IPSEC_ANY_PORT 0\r | |
49 | \r | |
50 | typedef struct _VAR_CHECK_ITEM {\r | |
51 | CHAR16 *VarName;\r | |
52 | UINT32 Attribute1;\r | |
53 | UINT32 Attribute2;\r | |
54 | UINT32 Attribute3;\r | |
55 | UINT32 Attribute4;\r | |
56 | } VAR_CHECK_ITEM;\r | |
57 | \r | |
58 | typedef struct _SHELL_PARAM_PACKAGE{\r | |
59 | LIST_ENTRY Link;\r | |
60 | CHAR16 *Name;\r | |
61 | ParamType Type;\r | |
62 | CHAR16 *Value;\r | |
63 | UINTN OriginalPosition;\r | |
64 | } SHELL_PARAM_PACKAGE;\r | |
65 | \r | |
66 | typedef struct _STR2INT {\r | |
67 | CHAR16 *String;\r | |
68 | UINT32 Integer;\r | |
69 | } STR2INT;\r | |
70 | \r | |
71 | extern EFI_IPSEC_CONFIG_PROTOCOL *mIpSecConfig;\r | |
72 | extern EFI_HII_HANDLE mHiiHandle;\r | |
73 | extern CHAR16 mAppName[];\r | |
74 | \r | |
75 | //\r | |
76 | // -P\r | |
77 | //\r | |
78 | extern STR2INT mMapPolicy[];\r | |
79 | \r | |
80 | //\r | |
81 | // --proto\r | |
82 | //\r | |
83 | extern STR2INT mMapIpProtocol[];\r | |
84 | \r | |
85 | //\r | |
86 | // --action\r | |
87 | //\r | |
88 | extern STR2INT mMapIpSecAction[];\r | |
89 | \r | |
90 | //\r | |
91 | // --mode\r | |
92 | //\r | |
93 | extern STR2INT mMapIpSecMode[];\r | |
94 | \r | |
95 | //\r | |
96 | // --dont-fragment\r | |
97 | //\r | |
98 | extern STR2INT mMapDfOption[];\r | |
99 | \r | |
100 | //\r | |
101 | // --ipsec-proto\r | |
102 | //\r | |
103 | extern STR2INT mMapIpSecProtocol[];\r | |
104 | //\r | |
105 | // --auth-algo\r | |
106 | //\r | |
107 | extern STR2INT mMapAuthAlgo[];\r | |
108 | \r | |
109 | //\r | |
110 | // --encrypt-algo\r | |
111 | //\r | |
112 | extern STR2INT mMapEncAlgo[];\r | |
113 | //\r | |
114 | // --auth-proto\r | |
115 | //\r | |
116 | extern STR2INT mMapAuthProto[];\r | |
117 | \r | |
118 | //\r | |
119 | // --auth-method\r | |
120 | //\r | |
121 | extern STR2INT mMapAuthMethod[];\r | |
122 | \r | |
123 | #endif\r |