On Jan 14, 2013, at 7:19 PM, Krishna Joshi <[email protected]> wrote:
> Hi, > > I am writing a driver in which i need to assign IP address to my > machine using DHCP . Is there any API in edk2 which could do this for me? > Note that I caanot be using ifconfig command to do this for me. > Well you could always look at the ifconfig command source https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c. But given that is a big and complicated you could also look in the EmbeddedPkg at the EDK Boot Loader (EBL) as it is a very simplistic shell. https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EmbeddedPkg/Ebl/Network.c https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EmbeddedPkg/Library/EblNetworkLib/EblNetworkLib.c If I understand your question you can use the PXE Base Code protocol to get an IP address assigned via a DHCP request. While PXE is all about network boot, it also needs to provide network services to the boot loader to get work done after it is loaded, so you can use PXE services to establish a connection without booting. Thanks, Andrew Fish > Thanks > Krishna > ------------------------------------------------------------------------------ > Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS > and more. Get SQL Server skills now (including 2012) with LearnDevNow - > 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. > SALE $99.99 this month only - learn more at: > http://p.sf.net/sfu/learnmore_122512_______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only - learn more at: http://p.sf.net/sfu/learnmore_122512 _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
