/** @file\r
Implementation for iSCSI Boot Firmware Table publication.\r
\r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Map the various v4 addresses into v6 addresses.\r
//\r
- IScsiMapV4ToV6Addr (&NvData->LocalIp, &Nic->Ip);\r
- IScsiMapV4ToV6Addr (&NvData->Gateway, &Nic->Gateway);\r
+ IScsiMapV4ToV6Addr (&NvData->LocalIp.v4, &Nic->Ip);\r
+ IScsiMapV4ToV6Addr (&NvData->Gateway.v4, &Nic->Gateway);\r
IScsiMapV4ToV6Addr (&Attempt->PrimaryDns.v4, &Nic->PrimaryDns);\r
IScsiMapV4ToV6Addr (&Attempt->SecondaryDns.v4, &Nic->SecondaryDns);\r
IScsiMapV4ToV6Addr (&Attempt->DhcpServer.v4, &Nic->DhcpServer);\r
\r
} else if (NvData->IpMode == IP_MODE_IP6 || NvData->IpMode == IP_MODE_AUTOCONFIG) {\r
- //\r
- // TODO: The subnet mask/local ip/gateway/dhcpserver for iBFT-IPv6 needs to be \r
- // confirmed with spec owner.\r
- //\r
\r
+ Nic->SubnetMaskPrefixLength = NvData->PrefixLength;\r
+ CopyMem (&Nic->Ip, &NvData->LocalIp, sizeof (EFI_IPv6_ADDRESS));\r
+ CopyMem (&Nic->Gateway, &NvData->Gateway, sizeof (EFI_IPv6_ADDRESS));\r
CopyMem (&Nic->PrimaryDns, &Attempt->PrimaryDns, sizeof (EFI_IPv6_ADDRESS));\r
CopyMem (&Nic->SecondaryDns, &Attempt->SecondaryDns, sizeof (EFI_IPv6_ADDRESS));\r
- //\r
- // TODO: DHCP server address cannot be retrieved by DHCPv6 process since \r
- // DHCP server option is removed.\r
- //CopyMem (&Nic->DhcpServer, &Attempt->DhcpServer, sizeof (EFI_IPv6_ADDRESS));\r
- //\r
+ CopyMem (&Nic->DhcpServer, &Attempt->DhcpServer, sizeof (EFI_IPv6_ADDRESS));\r
+\r
} else {\r
ASSERT (FALSE);\r
}\r
Target->Port = NvData->TargetPort;\r
\r
if (Attempt->AuthenticationType == ISCSI_AUTH_TYPE_CHAP) {\r
- Target->CHAPType = AuthConfig->CHAPType;\r
+ if (AuthConfig->CHAPType == ISCSI_CHAP_UNI) {\r
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP;\r
+ } else if (AuthConfig->CHAPType == ISCSI_CHAP_MUTUAL) {\r
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP;\r
+ }\r
} else if (Attempt->AuthenticationType == ISCSI_AUTH_TYPE_NONE) {\r
- Target->CHAPType = ISCSI_AUTH_TYPE_NONE;\r
+ Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP;\r
}\r
\r
Target->NicIndex = (UINT8) Index;\r
Target->CHAPSecretLength = Length;\r
Target->CHAPSecretOffset = (UINT16) ((UINTN) *Heap - (UINTN) Table);\r
\r
- if (Target->CHAPType == ISCSI_CHAP_MUTUAL) {\r
+ if (Target->CHAPType == EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP) {\r
//\r
// Reverse CHAP Name.\r
//\r