[if gte mso 9]>

Re: [edk2] Get Host by DNS

Subject: Re: [edk2] Get Host by DNS

From: "Leahy, Leroy P" <Leroy.P.Leahy@intel.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2012-01-31 02:17:43

Not at this time

 

From: Rafael Machado [mailto:rafaelrodrigues.machado@gmail.com]
Sent: Monday, January 30, 2012 8:00 AM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Get Host by DNS

 

Hi All / Lee

 

Still at this subject. Is there any way to get my DNS server ?

I mean, instead of having it's ip at a config file, getting it at runtime.

 

I've searched something like this but didn't find nothing.

 

Thanks and Regards

Rafael R. Machado

 

2012/1/25 Leahy, Leroy P <Leroy.P.Leahy@intel.com>

Rafael,

 

Please edit your resolv.conf file.  This file contains the addresses of your DNS servers.  Updating the file will give your system an IP address to send the DNS request and Wireshark should then be able to see the request.

 

Lee

 

From: Rafael Machado [mailto:rafaelrodrigues.machado@gmail.com]
Sent: Wednesday, January 25, 2012 10:56 AM


To: edk2-devel@lists.sourceforge.net"
Subject: Re: [edk2] Get Host by DNS

 

Daryl

 

I think probably my problem is related with some firewall.

But when I check the packages with wireshart, I see that the application return "host not found", but no package was sent to the network.

 

Isn't this strange ?

 

Thanks a lot for the help

Rafael R. Machado

 

 

2012/1/25 Mcdaniel, Daryl <daryl.mcdaniel@intel.com>

Rafael,

 

You need to edit the resolv.conf file to specify your DNS servers.

Also, if you are behind a corporate firewall/proxy server then you may not be able to access any outside sites.

 

Daryl

 

 

From: Rafael Machado [mailto:rafaelrodrigues.machado@gmail.com]
Sent: Wednesday, January 25, 2012 9:19 AM


To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Get Host by DNS

 

Hi Daryl

 

Now the error is hot happen.

Just one last question.

It's always returning Host not found qhen I run: GetHostByDns.efi www.intel.com

 

For example, to execute this command to get intel.com ip.

Do I need to change something at the host.conf or resolv.conf ?

 

Rafael R Machado

2012/1/25 Mcdaniel, Daryl <daryl.mcdaniel@intel.com>

Rafael,

 

If you are using the current AppPkg + StdLib from www.tianocore.org, there is a slight change needed to Leroy’s instructions.  On the target system, the etc directory is now located at \Efi\StdLib\etc.  You should also create a \Efi\StdLib\tmp directory.

 

Thus:

 

    \Efi

        Boot

        StdLib

            etc

            tmp

        Tools

 

Step 2 of Leroy’s instructions is very important.  You must set you current directory to be on the same mass-storage volume that contains the \Efi system directory.  This is similar to changing the current drive in a Windows command prompt window.  Enter a volume name, from the Shell’s map command, followed by a colon, ‘:’, and hit return.

 

Sincerely,

Daryl McDaniel

 

 

From: Rafael Machado [mailto:rafaelrodrigues.machado@gmail.com]
Sent: Wednesday, January 25, 2012 4:35 AM
To: edk2-devel@lists.sourceforge.net


Subject: Re: [edk2] Get Host by DNS

 

Hi All / Leroy

 

I'm having some problems here to execute this function ( _gethostbydnsname)

For example. If I whant to get the IP address related to www.google.com, should I change something at the resolv.conf file or other file at the /etc directory ?

 

Thanks

Rafael R. Machado 

 

 

2012/1/11 Leahy, Leroy P <Leroy.P.Leahy@intel.com>

Michael,

 

You need to do the following:

 

1.       Copy the template files from StdLib\Efi\etc to the Efi\etc directory on a storage device on the target system.

2.       Change the default on the UEFI system to the storage device by typing the device name followed by a colon (.e.g.  FS0:)

3.       Edit the Efi/etc/resolv.conf file to specify the DNS server addresses

4.       Obtain an IP address for the network adapter (e.g. ifconfig –s eth0 dhcp)

5.       Run the program that calls _gethostbydnsname

 

Lee

 

From: yang kidz [mailto:yangsuyu.cn@gmail.com]
Sent: Tuesday, January 10, 2012 6:00 PM
To: edk2-devel@lists.sourceforge.net
Cc: Michael.Lorer@hs-augsburg.de
Subject: Re: [edk2] Get Host by DNS

 

Hi, all

You said that eth0 got an ip-address and was configured properly.
I've got some questions according to your discribtion.
1. Did you get the dns server configed by DHCP server?
2. Can your connect to the dns server successful?
3. Maybe there are some other commands to be configed before you can use DNS function.
4. If all above is okay, please use wireshark or other tools to see whether is right dns request is send to your dns server?

Hope this can help you.

Best regard.

-Yang

2012/1/10 Michael Lorer <Michael.Lorer@hs-augsburg.de>

Hello all,

there came up some more concerns and problems while trying to do a DNS request.
Finally I got StdLib/BsdSocketLib/gethostbydns.c included in my project for testing purposes.

What I'm trying to do right now:
I do a configuration of the network devices using DHCP within my code.
That is working so far and the Shell-command ifconfig -l shows me that eth0 got an ip-address and was configured properly.
Afterwards I'm trying to do a DNS call:
pHost = _gethostbydnsname ( Servername, AF_INET);
But that call just gives me h_errno: -1 host not found message.

During my research I recognized that I don't get a DNS server-IP from the DHCP request I perform.
Compared to the ipconfig-command in Windows, that is using the same DHCP-Server, there are no variables at all in the DHCP4-configuration-data where a dns server could be stored.
Did I miss something or how can I perform a dns request without having a dns server ip? Or where is that ip address stored?

Has anyone done a successful dns request so far? What am I missing.

Regards,
Michael


Am Dienstag, 10. Januar 2012 09:14 CET, yang kidz <yangsuyu.cn@gmail.com> schrieb:


> Hi, all and Michael.
> what are these api's name ?
> could you list them?
>
> I think if we implement these api, these problems would be solved.
>
> Best regards.
>
> -Yang
>
> 2011/12/20 Michael Lorer <Michael.Lorer@hs-augsburg.de>
>
> > Hello,
> >
> > is there another way to get a host name by DNS than using
> > StdLib/BsdSocketLib/gethostbydns.c ?
> > Because the mentioned file uses many LibC functions which I don't want and
> > can't include in my project.
> >
> > Regards,
> > Michael
> >
> >
> > ------------------------------------------------------------------------------
> > Write once. Port to many.
> > Get the SDK and tools to simplify cross-platform app development. Create
> > new or port existing apps to sell to consumers worldwide. Explore the
> > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> > http://p.sf.net/sfu/intel-appdev
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/edk2-devel
> >




------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

 


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

 

 

 


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel