Hi Ritesh,
Lee know more about socket library. He mentioned that the socket libraries are
included with UDK 2014 under StdLib. This libraries are designed to link with
applications. AppPkg has several examples.
Best Regards,
Ye Ting
From: Ritesh Tiwari [mailto:ritesh.tiw...@seagate.com]
Sent: Monday, March 16, 2015 10:23 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Controller Handle in NetLibCreateServiceChild()
Thanks Ye.
We are developing our application using UDK2014 UEFI dev kit. We don't see
these socket library packages there.
I also got to know we can't/shouldn't use internet socket interfaces used by
TCPdxe.
May I know why UDK2014 does not provide socket library or package to create raw
TCP sockets? Our UEFI driver needs to do network communication over SSL. And
the SSL library methods in CryptoPkg take "socket fd" as an input.
Thanks,
Ritesh
On Mon, Mar 16, 2015 at 8:23 AM, Ye, Ting
<ting...@intel.com<mailto:ting...@intel.com>> wrote:
Hi Ritesh,
EFI_TCP4_PROTOCOL does not support returning underlying socket information. If
you want to use TCP socket you might refer to the socket library:
https://svn.code.sf.net/p/edk2/code/trunk/edk2/AppPkg
https://svn.code.sf.net/p/edk2/code/trunk/edk2/StdLib
Best Regards,
Ye Ting
From: Ritesh Tiwari
[mailto:ritesh.tiw...@seagate.com<mailto:ritesh.tiw...@seagate.com>]
Sent: Saturday, March 14, 2015 12:12 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] Controller Handle in NetLibCreateServiceChild()
Hi Ye,
I have yet another question on TCP_IP4_PROTOCOL handle I got from
NetLibCreateServiceChild(). I wanted to use this TCP4 handle for SSL
communication. To create SSL connection, ssl_set_fd() needs socket FD. My
question is how to get underlying socket fd from TCP4 handle? I don't see
socket fd details in TCP4 structure. If it is not possible from
TCP_IP4_PROTOCOL then do I need to create TCP socket separately to make a SSL
connection?
Thanks,
Ritesh
On Thu, Mar 12, 2015 at 3:14 PM, Ritesh Tiwari
<ritesh.tiw...@seagate.com<mailto:ritesh.tiw...@seagate.com>> wrote:
Thanks Ye for all the help. I think I did a typo earlier. For NT32, I did build
SnpNt32Io.dll and copied it at appropriate location. After doing that when I
tried to load SnapNt32Dxe.efi, I got "Already started". Earlier It was saying
"Not found". But still could not locate TCP4 binding protocols. Also made sure,
WinPcap service is running on the windows.
Thanks,
Ritesh
On Thu, Mar 12, 2015 at 6:49 AM, Ye, Ting
<ting...@intel.com<mailto:ting...@intel.com>> wrote:
Hi Ritesh,
Glad to hear you can run UEFI network stack in a real platform. If you have all
required network modules ready in NT32 platform, UEFI network stack should
work. One thing I want to emphasize is that you need build SnpNt32Io.dll (NOT
SnpNt32Dxe.dll you mentioned below) from network-IO and copy to directory where
SnpNt32Dxe.efi locates. Maybe you can try ‘drivers’ command in UEFI shell to
check whether your network modules are connected successfully.
Per your questions below:
- TCP4 protocol is not available until you use
NetLibCreateServiceChild() to create a child. When creating a child the
CreateChild() function will install a TCP4 protocol to the ChildHandle. After
that, you can use the installed TCP4 protocol.
- If you don’t configure VLAN, the system will install one
Tcp4ServiceBinding Protocol for one NIC; and the system will install SNP,
MnpServiceBinding, ArpServiceBinding, Ip4ServiceBinding, Tcp4ServiceBinding to
the same controller handle. To filter a particular NIC, for example, you are
able to get MAC address by using SNP or MnpServiceBinding. The library function
NetLibGetMacAddress provides such capability.
Best Regards,
Ye Ting
From: Ritesh Tiwari
[mailto:ritesh.tiw...@seagate.com<mailto:ritesh.tiw...@seagate.com>]
Sent: Thursday, March 12, 2015 1:50 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] Controller Handle in NetLibCreateServiceChild()
Hi Ye,
Thanks for all your help. Instead of trying for NT32, I tried to run the
application on actual IBM server. There I am seeing I am able to locate the
EFI_TCP4_Protocol. Now I have couple of questions - maybe you can answer -
1) What is the need of creating child of TCP service using
NetLibCreateServiceChild()? Although this is how TCP4 create socket is done in
In ScsiTCP4Io.c->Tcp4IoCreateSocket(). My question is can't I use
LocateProtcol() directly like following
EFI_TCP4_PROTOCOL *Tcp4;
SystemTable->BootServices->LocateProtocol(&gEfiTcp4ProtocolGuid1, NULL, &Tcp4);
And use this TCP4 handle to make a TCP connection? I am assuming it will return
a new instance/handle of Tcp4 protocol.
2) LocateHandleBuffer() returns 4 Handles for the protocol
gEfiTcp4ServiceBindingProtocolGuid in my server. Is it like I can pass any
handle out of these 4 in NetLibCreateServiceChild () to create child for a TCP
service? Or is there a way to filter out handles based on some criteria?
Thanks.
On Wed, Mar 11, 2015 at 3:01 PM, Ritesh Tiwari
<ritesh.tiw...@seagate.com<mailto:ritesh.tiw...@seagate.com>> wrote:
Hi Ye,
All the modules/libararies are listed in the Nt32Pkg,dsc file. And all are
loaded too.
Thanks,
Ritesh
On Wed, Mar 11, 2015 at 1:12 PM, Ye, Ting
<ting...@intel.com<mailto:ting...@intel.com>> wrote:
Hi Ritesh,
Please refer to chapter 5 Porting Guide of UEFI Network Stack Getting Started
Guide(pdf)<http://sourceforge.net/projects/network-io/files/Documents/EFINetworkStackGettingStarted.pdf/download>.
You need following modules to run ifconfig.
MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
Nt32Pkg/SnpNt32Dxe/SnpNt32Dxe.inf
MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
Best Regards,
Ye Ting
From: Ritesh Tiwari
[mailto:ritesh.tiw...@seagate.com<mailto:ritesh.tiw...@seagate.com>]
Sent: Wednesday, March 11, 2015 3:14 PM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] Controller Handle in NetLibCreateServiceChild()
Hi Ye,
I got the SnpNt32Dxe.dll built from given source code & WinPCAP library as
mentioned in the UEFI Network Stack Getting Started
Guide(pdf)<http://sourceforge.net/projects/network-io/files/Documents/EFINetworkStackGettingStarted.pdf/download>.
And copied the dll in appropriate location.
Now when I am loading SnapNt32Dxe.efi, I get "Already started". So looks like
something has worked. Earlier I was getting "Not found" error.
But even then ifconfig command failing.
ifconfig: Locate protocol error - 'Ip4Config protocol'
TCP4dxe, ARPdxe, Dhcp4Dxe, MnpDxe all are loaded.
SystemTable->BootServices->LocateHandleBuffer (
ByProtocol,
&gEfiTcp4ServiceBindingProtocolGuid,
NULL,
&HandleCount,
&Handles
);
call is still failing.
Thanks.
On Wed, Mar 11, 2015 at 10:18 AM, Ye, Ting
<ting...@intel.com<mailto:ting...@intel.com>> wrote:
From other mail:
If you don’t have, please get one from
https://github.com/tianocore/tianocore.github.io/wiki/Network-io.
The link also provides UEFI Network Stack Getting Started
Guide(pdf)<http://sourceforge.net/projects/network-io/files/Documents/EFINetworkStackGettingStarted.pdf/download>
for guidance on building and using the library to enable UEFI network stack
under NT32 Platform Emulator.
Best Regards,
Ye Ting
From: Ritesh Tiwari
[mailto:ritesh.tiw...@seagate.com<mailto:ritesh.tiw...@seagate.com>]
Sent: Wednesday, March 11, 2015 12:22 PM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] Controller Handle in NetLibCreateServiceChild()
Thank Ye. May I know from where I can get SnpNt32Dxe.dll? I don't see this dll
present in entire EDK workspace.
Thanks.
On Wed, Mar 11, 2015 at 8:52 AM, Ye, Ting
<ting...@intel.com<mailto:ting...@intel.com>> wrote:
Yes, load TCP4Dxe without any error does not mean TCP4 service binding protocol
is installed.
You need SnpNt32Io.dll, not SnpNt32Dxe.dll, locating at the same directory with
SnpNt32Dxe.efi (could be .....\Build\NT32IA32\DEBUG_VS2010x86\IA32)
Best Regards,
Ye Ting
From: Ritesh Tiwari
[mailto:ritesh.tiw...@seagate.com<mailto:ritesh.tiw...@seagate.com>]
Sent: Wednesday, March 11, 2015 11:13 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] Controller Handle in NetLibCreateServiceChild()
So that means even if TCP4Dxe is loaded without any error (at least I don't see
any on console) even then its possible TCP4 service is not running?
I tried to load SnpNt32Dxe. But its failing too:
fsnt0:> load SnpNt32Dxe.efi
load: Image fsnt0:\SnpNt32Dxe.efi error - Not Found.
SnpNt32Dxe.dll is also present at
C:\MyWorkSpace\Build\NT32IA32\DEBUG_VS2010x86\IA32\Nt32Pkg\SnpNt32Dxe\SnpNt32Dxe\DEBUG
Thanks,
Ritesh
On Wed, Mar 11, 2015 at 8:19 AM, Ye, Ting
<ting...@intel.com<mailto:ting...@intel.com>> wrote:
Hi Ritesh,
Load TCP4 driver will install TCP4 Driver Binding protocol and component name
protocol, while the Tcp4ServiceBindingProtocol is installed only when TCP4
driver is started successfully. To start TCP4 driver, the required modules like
IP/ARP/MNP/SNP,etc. need be connected and started first. As I mentioed in
another mail, if you are using NT32 platform, please check whether you have
your SnpNt32Dxe module working now.
Best Regards,
Ye Ting
From: Ritesh Tiwari
[mailto:ritesh.tiw...@seagate.com<mailto:ritesh.tiw...@seagate.com>]
Sent: Wednesday, March 11, 2015 10:40 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] Controller Handle in NetLibCreateServiceChild()
Thanks Ye Ting for help.
Yes I am doing the same.
Status = SystemTable->BootServices->LocateHandleBuffer (
ByProtocol,
&gEfiTcp4ServiceBindingProtocolGuid,
NULL,
&HandleCount,
&Handles
);
But Status returned is failure. If TCP4Dxe driver is loaded and I am able to
connect to it from the Shell, should not it be able to locate this handle for
protocol gEfiTcp4ServiceBindingProtocolGuid?
Thanks,
Ritesh
On Wed, Mar 11, 2015 at 6:59 AM, Ye, Ting
<ting...@intel.com<mailto:ting...@intel.com>> wrote:
Hi,
You could use gBS->LocateHandleBuffer() to locate the controller handle which
has the service installed. In your example, you could use
gEfiTcp4ServiceBindingProtocolGuid as protocol GUID.
Best Regards,
Ye Ting
From: Ritesh Tiwari
[mailto:ritesh.tiw...@seagate.com<mailto:ritesh.tiw...@seagate.com>]
Sent: Wednesday, March 11, 2015 3:14 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: [edk2] Controller Handle in NetLibCreateServiceChild()
Hi,
I am trying to create a TCP4 child using NetLibCreateServiceChild(). The first
input parameter of this API is a controller (The controller which has the
service installed). My very basic question is how to get this controller handle?
Here is the signature of this API -
@param[in] Controller The controller which has the service
installed.
@param[in] Image The image handle used to open service.
NetLibCreateServiceChild (
IN EFI_HANDLE Controller,
IN EFI_HANDLE Image,
IN EFI_GUID *ServiceBindingGuid,
IN OUT EFI_HANDLE *ChildHandle
)
The main goal is to create a TCP connection to a remote host.
Thanks.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel