Lines Matching refs:Variable
308 Read the configuration data from variable storage according to the VarName and
309 gEfiIp6ConfigProtocolGuid. It checks the integrity of variable data. If the
310 data is corrupted, it clears the variable data to ZERO. Othewise, it outputs the
313 @param[in] VarName The pointer to the variable name
316 @retval EFI_NOT_FOUND The variable can not be found or already corrupted.
329 IP6_CONFIG_VARIABLE *Variable;
336 // Try to read the configuration variable.
349 // Allocate buffer and read the config variable.
351 Variable = AllocatePool (VarSize);
352 if (Variable == NULL) {
361 Variable
363 if (EFI_ERROR (Status) || (UINT16) (~NetblockChecksum ((UINT8 *) Variable, (UINT32) VarSize)) != 0) {
365 // GetVariable still error or the variable is corrupted.
368 FreePool (Variable);
371 // Remove the problematic variable and return EFI_NOT_FOUND, a new
372 // variable will be set again.
388 Instance->IaId = Variable->IaId;
390 for (Index = 0; Index < Variable->DataRecordCount; Index++) {
392 CopyMem (&DataRecord, &Variable->DataRecord[Index], sizeof (DataRecord));
406 // This data item has variable length data.
417 Data = (CHAR8 *) Variable + DataRecord.Offset;
424 FreePool (Variable);
432 Write the configuration data from IP6_CONFIG_INSTANCE to variable storage.
434 @param[in] VarName The pointer to the variable name.
450 IP6_CONFIG_VARIABLE *Variable;
466 Variable = AllocatePool (VarSize);
467 if (Variable == NULL) {
471 Variable->IaId = Instance->IaId;
472 Heap = (CHAR8 *) Variable + VarSize;
473 Variable->DataRecordCount = 0;
483 DataRecord = &Variable->DataRecord[Variable->DataRecordCount];
486 DataRecord->Offset = (UINT16) (Heap - (CHAR8 *) Variable);
488 Variable->DataRecordCount++;
492 Variable->Checksum = 0;
493 Variable->Checksum = (UINT16) ~NetblockChecksum ((UINT8 *) Variable, (UINT32) VarSize);
500 Variable
503 FreePool (Variable);
671 // Clean the ManualAddress, Gateway and DnsServers, shrink the variable
2249 // Try to read the config data from NV variable.
2254 // The NV variable is not set, so generate a random IAID, and write down the
2255 // fresh new configuration as the NV variable now.