public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jiaxin Wu <jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Ye Ting <ting.ye@intel.com>, Fu Siyuan <siyuan.fu@intel.com>,
	Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch 3/4] MdeModulePkg/UefiBootManagerLib: Support DNS device path description
Date: Tue, 25 Jul 2017 20:12:44 +0800	[thread overview]
Message-ID: <1500984765-8040-4-git-send-email-jiaxin.wu@intel.com> (raw)
In-Reply-To: <1500984765-8040-1-git-send-email-jiaxin.wu@intel.com>

This patch is to update UEFI Boot manager to support DNS device path
for HTTP(S) network boot.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c
index 6e69a15..7647bac 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c
@@ -385,12 +385,12 @@ BmGetNetworkDescription (
   //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]
   //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)
   //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)
   //
   // The HTTP device path is like:
-  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)/Uri(...)
-  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)/Uri(...)
+  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)[/Dns(...)]/Uri(...)
+  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)[/Dns(...)]/Uri(...)
   //
   while (!IsDevicePathEnd (DevicePath) &&
          ((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||
           (DevicePathSubType (DevicePath) != MSG_MAC_ADDR_DP))
          ) {
@@ -435,10 +435,19 @@ BmGetNetworkDescription (
     Ip = DevicePath;
     DevicePath = NextDevicePathNode (DevicePath);
   } else {
     Ip = NULL;
   }
+  
+  //
+  // Skip the optional DNS node
+  //
+  if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
+      (DevicePathSubType (DevicePath) == MSG_DNS_DP)
+      ) {
+    DevicePath = NextDevicePathNode (DevicePath);
+  }
 
   //
   // Locate the URI node
   //
   if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
-- 
1.9.5.msysgit.1



  parent reply	other threads:[~2017-07-25 12:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 12:12 [Patch 0/4] Add DNS device path node Jiaxin Wu
2017-07-25 12:12 ` [Patch 1/4] MdePkg/DevicePath.h: Add DNS Device Path definition Jiaxin Wu
2017-07-25 12:12 ` [Patch 2/4] MdePkg/UefiDevicePathLib: Add DevPathFromTextDns and DevPathToTextDns libraries Jiaxin Wu
2017-07-26  0:42   ` Fu, Siyuan
2017-07-26  2:08     ` Wu, Jiaxin
2017-07-26  2:12       ` Fu, Siyuan
2017-07-26  2:29         ` Wu, Jiaxin
2017-07-26  3:00         ` Wu, Jiaxin
2017-07-25 12:12 ` Jiaxin Wu [this message]
2017-07-25 12:12 ` [Patch 4/4] NetworkPkg/HttpBootDxe: Update device path node to include DNS information Jiaxin Wu
2017-08-14  3:28 ` [Patch 0/4] Add DNS device path node Ye, Ting

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500984765-8040-4-git-send-email-jiaxin.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox