/** @file\r
The implementation for Shell application IfConfig6.\r
\r
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2014, 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
UINT8 Prefix;\r
UINT8 AddrCnt;\r
\r
+ Prefix = 0;\r
AddrCnt = 0;\r
*BufSize = 0;\r
*Buf = NULL;\r
//\r
// Set the Duid-type, hardware-type, time and copy the hardware address.\r
//\r
- WriteUnaligned16 ((UINT16 *) (Duid->Duid), HTONS (Dhcp6DuidTypeLlt));\r
- WriteUnaligned16 ((UINT16 *) (Duid->Duid + 2), HTONS (NET_IFTYPE_ETHERNET));\r
- WriteUnaligned32 ((UINT32 *) (Duid->Duid + 4), HTONL (Stamp));\r
- \r
+ WriteUnaligned16 ((UINT16 *) ((UINT8 *)&Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid)), HTONS (Dhcp6DuidTypeLlt));\r
+ WriteUnaligned16 ((UINT16 *) ((UINT8 *)&Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid) + 2), HTONS (NET_IFTYPE_ETHERNET));\r
+ WriteUnaligned32 ((UINT32 *) ((UINT8 *)&Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid) + 4), HTONL (Stamp));\r
+\r
CopyMem (Duid->Duid + 8, &Mode->CurrentAddress, Mode->HwAddressSize);\r
}\r
\r
/** @file\r
Helper functions for configuring or obtaining the parameters relating to IP6.\r
\r
- Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2010 - 2014, 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
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ ZeroMem (&AddressInfo, sizeof (EFI_IP6_ADDRESS_INFO));\r
LocalString = (CHAR16 *) AllocateCopyPool (StrSize (String), String);\r
if (LocalString == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
/** @file\r
The Common operations used by IKE Exchange Process.\r
\r
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2010 - 2014, 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
FreePool (Selector);\r
\r
Selector = AllocateZeroPool (SelectorSize);\r
+ ASSERT (Selector != NULL);\r
Status = EfiIpSecConfigGetNextSelector (\r
&Private->IpSecConfig,\r
IPsecConfigDataTypeSad,\r
if (EFI_ERROR (Status)) {\r
goto ON_EXIT;\r
}\r
+ ASSERT (NewCreatedInfo != NULL);\r
Info = NewCreatedInfo;\r
} else {\r
//\r