From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mx.groups.io with SMTP id smtpd.web11.10678.1651154401778953025 for ; Thu, 28 Apr 2022 07:00:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UUvhh5i9; spf=pass (domain: gmail.com, ip: 209.85.214.181, mailfrom: xzavierpower@gmail.com) Received: by mail-pl1-f181.google.com with SMTP id u9so3814988plf.6 for ; Thu, 28 Apr 2022 07:00:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=qpwtEa3Ym0mXh1u6LM9AcwsSR0E41ZdSV9WnvQ6MaGA=; b=UUvhh5i9iQhJmXoSIr9VHM8hD1BNuGXBvttL/ojaa+G6/LpsUNBPKCnmYGI0KdPs/P iA/DE9WRZ+45sczNM0l2KQ3ep1ox8rbMqYOhUAF8ZkOtC7KGdhBzxFMTi3sEPRHz1+4E lQ22z2uxxa2AqdRjcxADCHzh1eZDIz+tEoemOk1ZB7qkFBVMwUAvt3YUw1ObKnKRpDad I72KH0iY/oyEJLuUKH2gx8dA7psjwWcoCypyWeuJRzQte8pLxAcq7xe89U9jR+UADjpJ uX9BCj13hl4xQ8hzt4aBWxVUrzsGGPpj3VxgGZm9/xgcje1x8guUzTzDH1/oQe1IBOKY XgpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=qpwtEa3Ym0mXh1u6LM9AcwsSR0E41ZdSV9WnvQ6MaGA=; b=u1an5Pwuhf1zHxvbQ0JOMRsiEaMY2+K0/c7X5ZrwA+0oNE72iRkLbEGZJUTdZv4G5/ 4USKODDhlIpXcukakL0HYiNrW56UHISbCkuy1igBA2mR11ymFCjqVt4s2zKgrc9lJhq8 Lg+q2INW0D8mUBgoYgsY0fKgwnGAn96PST3H6KXaw4Ijl2Yd3iOaQdn7S02Pkry7K/uJ Ca2wgKa+Y6Dhl9RpHZWI8ydhrANV9HgcoGIhOSCy41zTSn2MSH8R+oRmHYOLi8W8FYOn 0YQxvdeQA5nZOlguD/sFIoFZ/yoEI2e6eZ+8kToy5hj5QoyHQJ0tMAtPJ3MKSOEJl8Jq rBsQ== X-Gm-Message-State: AOAM531gP2eT/yEk3+yztA83IS8TmE73UK68QFD9xCRoRMMdZNpKJtuy 5+Z3E+6uNMtihiZlAW+uzufVNiR0+IKFIG3noDKpHXeR3NgPBA== X-Google-Smtp-Source: ABdhPJxy34ZDT76lAwcubj5RoHQBMt1D74tRDoHYSSKwdan+LzA1pTcBKTJMfF2xRFeG6+MmHWYMBA4tUinSCtwq5GI= X-Received: by 2002:a17:902:d54a:b0:15d:333b:ff58 with SMTP id z10-20020a170902d54a00b0015d333bff58mr14435169plf.45.1651154400957; Thu, 28 Apr 2022 07:00:00 -0700 (PDT) MIME-Version: 1.0 From: "M.T." Date: Thu, 28 Apr 2022 09:59:50 -0400 Message-ID: Subject: TCP/IP Connection To: devel@edk2.groups.io Content-Type: multipart/alternative; boundary="00000000000089d8a205ddb75747" --00000000000089d8a205ddb75747 Content-Type: text/plain; charset="UTF-8" Hello I'm very new to edk2 and I've been trying to figure out how to get a TCP/IP connection going from a UEFI Shell app. The intention is to have a simple client which will connect to a host that will send over some data for testing. I am using qemu and I also have a system which this is going to run on. Both are setup correctly, I can get an IP address from my dhcp server and ping hosts etc, so the drivers and protocols are there. While looking into this, I came across edk2-libc, this sounded great, it was fine in qemu, but failed to run on my platform returning with error 49 (EADDRNOTAVAIL) when trying to bind. I tried fiddling with the socket settings, but could not get past this issue. Currently I am falling back on plain edk2, but I am having a bit of a hard time figuring out how to work the protocols. I am not sure if I should be trying to configure TCP4 or IP4 or both. I found this: https://github.com/vinxue/TcpTransport, but it also does not work, it seems to start up fine, but it does not return the correct IP address of the interface, and it does not respond to anything, so I am guessing it needs updating. I also looked at the http sample in the UEFI specs, but it might be a bit over my head right now, I'll keep going over it to see if it starts making sense eventually. I am wondering if someone could point me in the right direction here, or anything really. Is there a current sample I could look at, or did I miss something important in the UEFI specs? If I want to configure eth0 to get an IP address via dhcp from within my app, is that something I can do instead of issuing commands in the shell before running my app? Appreciate any help, and thank you xp --00000000000089d8a205ddb75747 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello

I'm very new to edk2 and I= 9;ve been trying to figure out how to get a TCP/IP connection going from a = UEFI Shell app.
The intention is to have a simple client which wi= ll connect to a host that will send over some data for testing.
I am using qemu and I also have a system which this is going=C2=A0to run= on.
Both are setup correctly, I can get an IP address from my dh= cp server and ping hosts etc, so the drivers and protocols are there.
=

While looking into this, I came across edk2-libc, this = sounded great, it was fine in qemu, but failed to run on my platform return= ing with error 49 (EADDRNOTAVAIL) when trying to bind.=C2=A0 I tried fiddli= ng with the socket settings, but could not get past this issue.
<= br>
Currently I am falling back on plain edk2, but I am having=C2= =A0a bit of a hard time figuring out how to work the protocols.=C2=A0 I am = not sure if I should be trying to configure TCP4 or IP4 or both.
=
I found this:=C2=A0https://github.com/vinxue/TcpTransport, but it also does not = work, it seems to start up fine, but it does not return the correct IP addr= ess of the interface, and it does not respond to anything, so I am guessing= it needs updating.

I also looked at the http samp= le in the UEFI specs, but it might be a bit over my head right now, I'l= l keep going over it to see if it starts making sense eventually.

I am wondering if someone could point me in the right direc= tion here, or anything really.=C2=A0 Is there a current sample I could look= at, or did I miss something important in the UEFI specs?

If I want to configure eth0 to get an IP address via dhcp from with= in my app, is that something I can do instead of issuing commands in the sh= ell before running my app?

Appreciate any help, an= d thank you
xp

--00000000000089d8a205ddb75747--