/** @file\r
Definitions related to IPSEC_CONFIG_PROTOCOL implementations.\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
#define IPSECCONFIG_VARIABLE_NAME L"IpSecConfig"\r
#define IPSECCONFIG_STATUS_NAME L"IpSecStatus"\r
\r
-#define SIZE_OF_SPD_SELECTOR(x) (UINTN) (sizeof (EFI_IPSEC_SPD_SELECTOR) \\r
+#define SIZE_OF_SPD_SELECTOR(x) (sizeof (EFI_IPSEC_SPD_SELECTOR) \\r
+ sizeof (EFI_IP_ADDRESS_INFO) * ((x)->LocalAddressCount + (x)->RemoteAddressCount))\r
\r
#define FIX_REF_BUF_ADDR(addr, base) addr = (VOID *) ((UINTN) (addr) - (UINTN) (base))\r
/**\r
The prototype of Copy Source Selector to the Destination Selector.\r
\r
- @param[in out] DstSel Pointer of Destination Selector. It would be\r
+ @param[in, out] DstSel Pointer of Destination Selector. It would be\r
SPD Selector, or SAD Selector or PAD Selector.\r
@param[in] SrcSel Pointer of Source Selector. It would be\r
SPD Selector, or SAD Selector or PAD Selector.\r
- @param[in out] Size The size of the Destination Selector. If it\r
+ @param[in, out] Size The size of the Destination Selector. If it\r
is not NULL and its value is less than the size of\r
Source Selector, the value of Source Selector's\r
size will be passed to the caller by this parameter.\r
Data type is related to the Type.\r
@param[in] SelectorSize The size of the Selector.\r
@param[in] DataSize The size of the Data.\r
- @param[in out] Buffer The buffer to store the Selector and Data.\r
+ @param[in, out] Buffer The buffer to store the Selector and Data.\r
\r
@retval EFI_SUCCESS Copied the Selector and Data to a buffer successfully.\r
@retval EFI_OUT_OF_RESOURCES The required system resource could not be allocated.\r
);\r
\r
/**\r
- Compare two SPD Selectors.\r
+ Find if the two SPD Selectors has subordinative.\r
\r
Compare two SPD Selector by the fields of LocalAddressCount/RemoteAddressCount/\r
- NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the\r
+ NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the \r
Local Addresses and remote Addresses.\r
\r
- @param[in] Selector1 Pointer of the first SPD Selector.\r
- @param[in] Selector2 Pointer of the second SPD Selector.\r
-\r
- @retval TRUE This two Selector have the same value in above fields.\r
- @retval FALSE Not all of the above fields have the same value in these two Selectors.\r
+ @param[in] Selector1 Pointer of first SPD Selector.\r
+ @param[in] Selector2 Pointer of second SPD Selector.\r
\r
+ @retval TRUE The first SPD Selector is subordinate Selector of second SPD Selector.\r
+ @retval FALSE The first SPD Selector is not subordinate Selector of second \r
+ SPD Selector.\r
+ \r
**/\r
BOOLEAN\r
-CompareSpdSelector (\r
+IsSubSpdSelector (\r
IN EFI_IPSEC_CONFIG_SELECTOR *Selector1,\r
IN EFI_IPSEC_CONFIG_SELECTOR *Selector2\r
);\r
VOID\r
FixSadEntry (\r
IN EFI_IPSEC_SA_ID *SaId,\r
- IN OUT EFI_IPSEC_SA_DATA *Data\r
+ IN OUT EFI_IPSEC_SA_DATA2 *Data\r
);\r
\r
/**\r
VOID\r
UnfixSadEntry (\r
IN OUT EFI_IPSEC_SA_ID *SaId,\r
- IN OUT EFI_IPSEC_SA_DATA *Data\r
+ IN OUT EFI_IPSEC_SA_DATA2 *Data\r
);\r
\r
/**\r
IN EFI_EVENT Event\r
);\r
\r
+extern LIST_ENTRY mConfigData[IPsecConfigDataTypeMaximum];\r
+\r
#endif\r