Home | History | Annotate | Download | only in IpSecDxe

Lines Matching refs:Data

98   to the internal data structure.

793 @param[in, out] Data Pointer of SPD Data.
799 IN OUT EFI_IPSEC_SPD_DATA *Data
803 // It assumes that all ref buffers in SPD selector and data are
809 if (Data->ProcessingPolicy != NULL) {
810 if (Data->ProcessingPolicy->TunnelOption != NULL) {
811 FIX_REF_BUF_ADDR (Data->ProcessingPolicy->TunnelOption, Data);
814 FIX_REF_BUF_ADDR (Data->ProcessingPolicy, Data);
828 @param[in, out] Data Pointer of SA Data.
834 IN OUT EFI_IPSEC_SA_DATA2 *Data
838 // It assumes that all ref buffers in SAD selector and data are
841 if (Data->AlgoInfo.EspAlgoInfo.AuthKey != NULL) {
842 FIX_REF_BUF_ADDR (Data->AlgoInfo.EspAlgoInfo.AuthKey, Data);
845 if (SaId->Proto == EfiIPsecESP && Data->AlgoInfo.EspAlgoInfo.EncKey != NULL) {
846 FIX_REF_BUF_ADDR (Data->AlgoInfo.EspAlgoInfo.EncKey, Data);
849 if (Data->SpdSelector != NULL) {
850 if (Data->SpdSelector->LocalAddress != NULL) {
851 FIX_REF_BUF_ADDR (Data->SpdSelector->LocalAddress, Data);
854 FIX_REF_BUF_ADDR (Data->SpdSelector->RemoteAddress, Data);
855 FIX_REF_BUF_ADDR (Data->SpdSelector, Data);
869 @param[in, out] Data Pointer of PAD Data.
875 IN OUT EFI_IPSEC_PAD_DATA *Data
879 // It assumes that all ref buffers in pad selector and data are
882 if (Data->AuthData != NULL) {
883 FIX_REF_BUF_ADDR (Data->AuthData, Data);
886 if (Data->RevocationData != NULL) {
887 FIX_REF_BUF_ADDR (Data->RevocationData, Data);
899 @param[in, out] Data Pointer of SPD Data.
905 IN OUT EFI_IPSEC_SPD_DATA *Data
909 // It assumes that all ref buffers in SPD selector and data are
915 if (Data->ProcessingPolicy != NULL) {
916 UNFIX_REF_BUF_ADDR (Data->ProcessingPolicy, Data);
917 if (Data->ProcessingPolicy->TunnelOption != NULL) {
918 UNFIX_REF_BUF_ADDR (Data->ProcessingPolicy->TunnelOption, Data);
931 @param[in, out] Data Pointer of SAD Data.
937 IN OUT EFI_IPSEC_SA_DATA2 *Data
941 // It assumes that all ref buffers in SAD selector and data are
944 if (Data->AlgoInfo.EspAlgoInfo.AuthKey != NULL) {
945 UNFIX_REF_BUF_ADDR (Data->AlgoInfo.EspAlgoInfo.AuthKey, Data);
948 if (SaId->Proto == EfiIPsecESP && Data->AlgoInfo.EspAlgoInfo.EncKey != NULL) {
949 UNFIX_REF_BUF_ADDR (Data->AlgoInfo.EspAlgoInfo.EncKey, Data);
952 if (Data->SpdSelector != NULL) {
953 UNFIX_REF_BUF_ADDR (Data->SpdSelector, Data);
954 if (Data->SpdSelector->LocalAddress != NULL) {
955 UNFIX_REF_BUF_ADDR (Data->SpdSelector->LocalAddress, Data);
958 UNFIX_REF_BUF_ADDR (Data->SpdSelector->RemoteAddress, Data);
970 @param[in, out] Data Pointer of PAD Data.
976 IN OUT EFI_IPSEC_PAD_DATA *Data
980 // It assumes that all ref buffers in pad selector and data are
983 if (Data->AuthData != NULL) {
984 UNFIX_REF_BUF_ADDR (Data->AuthData, Data);
987 if (Data->RevocationData != NULL) {
988 UNFIX_REF_BUF_ADDR (Data->RevocationData, Data);
996 The IPsec configuration data has a unique selector/identifier separately to
997 identify a data entry.
1000 configuration data specified by DataType.
1003 @param[in] Data The data buffer to be set. The structure
1004 of the data buffer should be EFI_IPSEC_SPD_DATA.
1006 the expected position the new data entry will
1013 - Data is not NULL and its Action is Protected
1015 - Data is not NULL, its Action is not protected,
1017 - The Action of Data is Protected, its policy
1019 - The Action of Data is protected and its policy
1022 @retval EFI_SUCCESS The specified configuration data was obtained successfully.
1028 IN VOID *Data,
1048 SpdData = (Data == NULL) ? NULL : (EFI_IPSEC_SPD_DATA *) Data;
1097 SpdSas = &SpdEntry->Data->Sas;
1104 SadEntry->Data->SpdEntry = NULL;
1150 // Fix the address of Selector and Data buffer and copy them, which is
1154 SpdEntry->Data = (IPSEC_SPD_DATA *) ALIGN_POINTER (
1166 SpdEntry->Data->Name,
1170 SpdEntry->Data->PackageFlag = SpdData->PackageFlag;
1171 SpdEntry->Data->TrafficDirection = SpdData->TrafficDirection;
1172 SpdEntry->Data->Action = SpdData->Action;
1176 // memory and close to the base structure of SAD data.
1179 SpdEntry->Data->ProcessingPolicy = NULL;
1181 SpdEntry->Data->ProcessingPolicy = (EFI_IPSEC_PROCESS_POLICY *) ALIGN_POINTER (
1182 SpdEntry->Data + 1,
1185 IpSecDuplicateProcessPolicy (SpdEntry->Data->ProcessingPolicy, SpdData->ProcessingPolicy);
1190 InitializeListHead (&SpdEntry->Data->Sas);
1203 if (SadEntry->Data->SpdEntry != NULL) {
1206 InsertTailList (&SpdEntry->Data->Sas, &SadEntry->BySpd);
1207 SadEntry->Data->SpdEntry = SpdEntry;
1222 The IPsec configuration data has a unique selector/identifier separately to
1223 identify a data entry.
1226 configuration data specified by DataType.
1229 @param[in] Data The data buffer to be set. The structure
1230 of the data buffer should be EFI_IPSEC_SA_DATA.
1232 the expected position the new data entry will
1237 @retval EFI_SUCCESS The specified configuration data was obtained successfully.
1243 IN VOID *Data,
1260 SaData = (Data == NULL) ? NULL : (EFI_IPSEC_SA_DATA2 *) Data;
1289 if (SadEntry->Data->SpdEntry != NULL) {
1344 // Fix the address of Id and Data buffer and copy them, which is
1348 SadEntry->Data = (IPSEC_SAD_DATA *) ALIGN_POINTER ((SadEntry->Id + 1), sizeof (UINTN));
1352 SadEntry->Data->Mode = SaData->Mode;
1353 SadEntry->Data->SequenceNumber = SaData->SNCount;
1354 SadEntry->Data->AntiReplayWindowSize = SaData->AntiReplayWindows;
1357 &SadEntry->Data->AntiReplayBitmap,
1358 sizeof (SadEntry->Data->AntiReplayBitmap)
1362 &SadEntry->Data->AlgoInfo,
1366 SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthAlgoId = SaData->AlgoInfo.EspAlgoInfo.AuthAlgoId;
1367 SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKeyLength = SaData->AlgoInfo.EspAlgoInfo.AuthKeyLength;
1369 if (SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKeyLength != 0) {
1370 SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKey = (VOID *) ALIGN_POINTER ((SadEntry->Data + 1), sizeof (UINTN));
1372 SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKey,
1374 SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKeyLength
1379 SadEntry->Data->AlgoInfo.EspAlgoInfo.EncAlgoId = SaData->AlgoInfo.EspAlgoInfo.EncAlgoId;
1380 SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKeyLength = SaData->AlgoInfo.EspAlgoInfo.EncKeyLength;
1382 if (SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKeyLength != 0) {
1383 SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKey = (VOID *) ALIGN_POINTER (
1384 ((UINT8 *) (SadEntry->Data + 1) +
1385 SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKeyLength),
1389 SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKey,
1391 SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKeyLength
1397 &SadEntry->Data->SaLifetime,
1402 SadEntry->Data->PathMTU = SaData->PathMTU;
1403 SadEntry->Data->SpdSelector = NULL;
1404 SadEntry->Data->ESNEnabled = FALSE;
1405 SadEntry->Data->ManualSet = SaData->ManualSet;
1412 &SadEntry->Data->TunnelDestAddress,
1417 &SadEntry->Data->TunnelSourceAddress,
1433 ) && SpdEntry->Data->Action == EfiIPsecActionProtect) {
1434 SadEntry->Data->SpdEntry = SpdEntry;
1435 SadEntry->Data->SpdSelector = (EFI_IPSEC_SPD_SELECTOR *)((UINT8 *)SadEntry +
1440 (EFI_IPSEC_CONFIG_SELECTOR *) SadEntry->Data->SpdSelector,
1444 InsertTailList (&SpdEntry->Data->Sas, &SadEntry->BySpd);
1458 The IPsec configuration data has a unique selector/identifier separately to
1459 identify a data entry.
1462 configuration data specified by DataType.
1465 @param[in] Data The data buffer to be set. The structure
1466 of the data buffer should be EFI_IPSEC_PAD_DATA.
1468 the expected position the new data entry will
1473 @retval EFI_SUCCESS The specified configuration data was obtained successfully.
1479 IN VOID *Data,
1494 PadData = (Data == NULL) ? NULL : (EFI_IPSEC_PAD_DATA *) Data;
1561 // Fix the address of Id and Data buffer and copy them, which is
1565 PadEntry->Data = (EFI_IPSEC_PAD_DATA *) ALIGN_POINTER ((PadEntry->Id + 1), sizeof (UINTN));
1569 PadEntry->Data->AuthProtocol = PadData->AuthProtocol;
1570 PadEntry->Data->AuthMethod = PadData->AuthMethod;
1571 PadEntry->Data->IkeIdFlag = PadData->IkeIdFlag;
1574 PadEntry->Data->AuthDataSize = PadData->AuthDataSize;
1575 PadEntry->Data->AuthData = (VOID *) ALIGN_POINTER (PadEntry->Data + 1, sizeof (UINTN));
1577 PadEntry->Data->AuthData,
1582 PadEntry->Data->AuthDataSize = 0;
1583 PadEntry->Data->AuthData = NULL;
1587 PadEntry->Data->RevocationDataSize = PadData->RevocationDataSize;
1588 PadEntry->Data->RevocationData = (VOID *) ALIGN_POINTER (
1589 ((UINT8 *) (PadEntry->Data + 1) + PadData->AuthDataSize),
1593 PadEntry->Data->RevocationData,
1598 PadEntry->Data->RevocationDataSize = 0;
1599 PadEntry->Data->RevocationData = NULL;
1610 This function lookup the data entry from IPsec SPD. Return the configuration
1615 @param[in, out] DataSize On output the size of data returned in Data.
1616 @param[out] Data The buffer to return the contents of the IPsec
1617 configuration data. The type of the data buffer
1620 @retval EFI_SUCCESS The specified configuration data was obtained successfully.
1621 @retval EFI_INVALID_PARAMETER Data is NULL and *DataSize is not zero.
1622 @retval EFI_NOT_FOUND The configuration data specified by Selector is not found.
1631 OUT VOID *Data
1644 SpdData = (EFI_IPSEC_SPD_DATA *) Data;
1658 RequiredSize = IpSecGetSizeOfSpdData (SpdEntry->Data);
1673 SpdSas = &SpdEntry->Data->Sas;
1685 // Fill the other fields in SPD data.
1687 CopyMem (SpdData->Name, SpdEntry->Data->Name, sizeof (SpdData->Name));
1689 SpdData->PackageFlag = SpdEntry->Data->PackageFlag;
1690 SpdData->TrafficDirection = SpdEntry->Data->TrafficDirection;
1691 SpdData->Action = SpdEntry->Data->Action;
1700 SpdEntry->Data->ProcessingPolicy
1712 This function lookup the data entry from IPsec SAD. Return the configuration
1717 @param[in, out] DataSize On output, the size of data returned in Data.
1718 @param[out] Data The buffer to return the contents of the IPsec
1719 configuration data. The type of the data buffer
1722 @retval EFI_SUCCESS The specified configuration data was obtained successfully.
1723 @retval EFI_NOT_FOUND The configuration data specified by Selector is not found.
1732 OUT VOID *Data
1743 SaData = (EFI_IPSEC_SA_DATA2 *) Data;
1758 // Data Layout is follows:
1767 RequiredSize = ALIGN_VARIABLE (RequiredSize + SadEntry->Data->AlgoInfo.AhAlgoInfo.AuthKeyLength);
1769 RequiredSize = ALIGN_VARIABLE (RequiredSize + SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKeyLength);
1770 RequiredSize = ALIGN_VARIABLE (RequiredSize + SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKeyLength);
1773 if (SadEntry->Data->SpdSelector != NULL) {
1774 RequiredSize += SIZE_OF_SPD_SELECTOR (SadEntry->Data->SpdSelector);
1783 // Fill the data fields of SAD entry.
1786 SaData->Mode = SadEntry->Data->Mode;
1787 SaData->SNCount = SadEntry->Data->SequenceNumber;
1788 SaData->AntiReplayWindows = SadEntry->Data->AntiReplayWindowSize;
1792 &SadEntry->Data->SaLifetime,
1805 SaData->AlgoInfo.AhAlgoInfo.AuthAlgoId = SadEntry->Data->AlgoInfo.AhAlgoInfo.AuthAlgoId;
1806 SaData->AlgoInfo.AhAlgoInfo.AuthKeyLength = SadEntry->Data->AlgoInfo.AhAlgoInfo.AuthKeyLength;
1811 SadEntry->Data->AlgoInfo.AhAlgoInfo.AuthKey,
1819 SaData->AlgoInfo.EspAlgoInfo.AuthAlgoId = SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthAlgoId;
1820 SaData->AlgoInfo.EspAlgoInfo.AuthKeyLength = SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKeyLength;
1825 SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKey,
1830 SaData->AlgoInfo.EspAlgoInfo.EncAlgoId = SadEntry->Data->AlgoInfo.EspAlgoInfo.EncAlgoId;
1831 SaData->AlgoInfo.EspAlgoInfo.EncKeyLength = SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKeyLength;
1841 SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKey,
1847 SaData->PathMTU = SadEntry->Data->PathMTU;
1852 if (SadEntry->Data->Mode == EfiIPsecTunnel) {
1855 &SadEntry->Data->TunnelDestAddress,
1860 &SadEntry->Data->TunnelSourceAddress,
1865 // Fill the spd selector field of SAD data
1867 if (SadEntry->Data->SpdSelector != NULL) {
1872 SIZE_OF_SPD_SELECTOR (SadEntry->Data->SpdSelector)
1877 (EFI_IPSEC_CONFIG_SELECTOR *) SadEntry->Data->SpdSelector,
1886 SaData->ManualSet = SadEntry->Data->ManualSet;
1896 This function lookup the data entry from IPsec PAD. Return the configuration
1901 @param[in, out] DataSize On output the size of data returned in Data.
1902 @param[out] Data The buffer to return the contents of the IPsec
1903 configuration data. The type of the data buffer
1906 @retval EFI_SUCCESS The specified configuration data was obtained successfully.
1907 @retval EFI_NOT_FOUND The configuration data specified by Selector is not found.
1916 OUT VOID *Data
1927 PadData = (EFI_IPSEC_PAD_DATA *) Data;
1944 RequiredSize = ALIGN_VARIABLE (RequiredSize + PadEntry->Data->AuthDataSize);
1945 RequiredSize += PadEntry->Data->RevocationDataSize;
1952 // Fill the data fields of pad entry
1955 PadData->AuthProtocol = PadEntry->Data->AuthProtocol;
1956 PadData->AuthMethod = PadEntry->Data->AuthMethod;
1957 PadData->IkeIdFlag = PadEntry->Data->IkeIdFlag;
1960 // Copy Authentication data.
1962 if (PadEntry->Data->AuthData != NULL) {
1964 PadData->AuthDataSize = PadEntry->Data->AuthDataSize;
1968 PadEntry->Data->AuthData,
1977 // Copy Revocation Data.
1979 if (PadEntry->Data->RevocationData != NULL) {
1981 Data->RevocationDataSize;
1988 PadEntry->Data->RevocationData,
2114 Data-Buffer. As output, point to the actual
2115 size of the returned Data-Buffer.
2116 @param[in] Data Point to return Data-Buffer.
2132 IN VOID *Data
2157 // Construct the varible name of ipsecconfig meta data.
2222 // Parse the variable count of the current ipsecconfig data.
2227 // Get the variable size of the current ipsecconfig data.
2255 // Get the variable data of the current ipsecconfig data and
2263 (UINT8 *) Data + (VariableIndex - 1) * IpSecVariableInfo.SingleVariableSize
2296 @param[in] DataSize The size in bytes of Data-Buffer.
2297 @param[in] Data Points to the content of the variable.
2299 @retval EFI_SUCCESS The firmware successfully stored the variable and its data, as
2310 IN VOID *Data
2364 DEBUG ((DEBUG_ERROR, "Error set ipsecconfig meta data with %r\n", Status));
2370 // Construct and set the variable of ipsecconfig data one by one.
2382 (UINT8 *) Data + VariableIndex * (UINTN) MaximumVariableSize
2386 DEBUG ((DEBUG_ERROR, "Error set ipsecconfig variable data with %r\n", Status));
2402 This function lookup the data entry from IPsec database or IKEv2 configuration
2403 information. The expected data type and unique identification are described in
2407 @param[in] DataType The type of data to retrieve.
2409 configuration data entry.
2410 @param[in, out] DataSize On output the size of data returned in Data.
2411 @param[out] Data The buffer to return the contents of the IPsec configuration data.
2412 The type of the data buffer associated with the DataType.
2414 @retval EFI_SUCCESS The specified configuration data was obtained successfully.
2419 - Data is NULL and *DataSize is not zero
2420 @retval EFI_NOT_FOUND The configuration data specified by Selector is not found.
2433 OUT VOID *Data
2440 if (*DataSize != 0 && Data == NULL) {
2448 return mGetPolicyEntry[DataType](Selector, DataSize, Data);
2457 The IPsec configuration data has a unique selector/identifier separately to identify
2458 a data entry. The selector structure depends on DataType's definition.
2459 Using SetData() with a Data of NULL causes the IPsec configuration data entry identified
2463 @param[in] DataType The type of data to be set.
2464 @param[in] Selector Pointer to an entry selector on operated configuration data
2467 @param[in] Data The data buffer to be set. The structure of the data buffer is
2470 position the new data entry will be added. If InsertBefore is NULL,
2473 @retval EFI_SUCCESS The specified configuration entry data was set successfully.
2486 IN VOID *Data,
2500 Status = mSetPolicyEntry[DataType](Selector, Data, InsertBefore);
2504 // Save the updated config data into variable.
2513 Enumerates the current selector for IPsec configuration data entry.
2530 @param[in] DataType The type of IPsec configuration data to retrieve.
2537 @retval EFI_SUCCESS The specified configuration data was obtained successfully.
2542 @retval EFI_NOT_FOUND The next configuration data entry was not found.
2599 @param[in] DataType The type of data to be registered the event for.
2622 configuration data.
2627 @param[in] DataType The configuration data type to remove the registered event for.
2650 Copy whole data in specified EFI_SIPEC_CONFIG_SELECTOR and the Data to a buffer.
2660 @param[in] Data Points to data to be copied to the buffer. The
2661 Data type is related to the Type.
2663 @param[in] DataSize The size of the Data.
2664 @param[in, out] Buffer The buffer to store the Selector and Data.
2666 @retval EFI_SUCCESS Copy the Selector and Data to a buffer successfully.
2674 IN VOID *Data,
2689 if (((EFI_IPSEC_SA_DATA2 *) Data)->ManualSet == FALSE) {
2721 mFixPolicyEntry[Type](Selector, Data);
2747 // Fill the data header and copy it into buffer.
2759 // Copy the data into buffer.
2763 Data,
2768 mUnfixPolicyEntry[Type](Selector, Data);
2777 @param[in] DataType The specified IPsec Config Data Type.
2779 @param[in] Context The data passed to the Routine.
2796 VOID *Data;
2805 Data = NULL;
2866 Data
2869 if (Data != NULL) {
2870 FreePool (Data);
2874 Data = AllocateZeroPool (DataBufferSize);
2876 if (Data == NULL) {
2887 Data
2901 Data,
2911 if (Data != NULL) {
2912 FreePool (Data);
2976 to the internal data structure.
3000 VOID *Data;
3064 Data = ALIGN_POINTER (Header + 1, sizeof (UINTN));
3066 mUnfixPolicyEntry[Type](Selector, Data);
3076 Data,
3086 Ptr = ALIGN_POINTER ((UINT8 *) Data + Header->Size, sizeof (UINTN));