]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IScsiDxe/IScsiMisc.h
Fix a bug about the iSCSI DHCP dependency issue.
[mirror_edk2.git] / NetworkPkg / IScsiDxe / IScsiMisc.h
index 8646f666a47aa4ec94678451379c4caec39aec02..e2a27806ac8eccefcd362a696a98ba2d53f5c28f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Miscellaneous definitions for iSCSI driver.\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
@@ -23,14 +23,15 @@ typedef struct _ISCSI_SESSION_CONFIG_NVDATA {
   UINT8             Enabled;\r
   UINT8             IpMode;\r
 \r
-  EFI_IPv4_ADDRESS  LocalIp;\r
+  EFI_IP_ADDRESS    LocalIp;\r
   EFI_IPv4_ADDRESS  SubnetMask;\r
-  EFI_IPv4_ADDRESS  Gateway;\r
+  EFI_IP_ADDRESS    Gateway;\r
 \r
   BOOLEAN           InitiatorInfoFromDhcp;\r
   BOOLEAN           TargetInfoFromDhcp;\r
   CHAR8             TargetName[ISCSI_NAME_MAX_SIZE];\r
   EFI_IP_ADDRESS    TargetIp;\r
+  UINT8             PrefixLength;\r
   UINT8             BootLun[8];\r
 \r
   UINT16            ConnectTimeout; ///< timout value in milliseconds\r
@@ -297,6 +298,22 @@ IScsiCleanDriverData (
   IN ISCSI_DRIVER_DATA  *Private\r
   );\r
 \r
+/**\r
+  Check wheather the Controller handle is configured to use DHCP protocol.\r
+\r
+  @param[in]  Controller           The handle of the controller.\r
+  @param[in]  IpVersion            IP_VERSION_4 or IP_VERSION_6.\r
+  \r
+  @retval TRUE                     The handle of the controller need the Dhcp protocol.\r
+  @retval FALSE                    The handle of the controller does not need the Dhcp protocol.\r
+  \r
+**/\r
+BOOLEAN\r
+IScsiDhcpIsConfigured (\r
+  IN EFI_HANDLE  Controller,\r
+  IN UINT8       IpVersion\r
+  );\r
+\r
 /**\r
   Get the various configuration data of this iSCSI instance.\r
 \r