public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "M.T." <xzavierpower@gmail.com>
To: devel@edk2.groups.io
Subject: TCP/IP Connection
Date: Thu, 28 Apr 2022 09:59:50 -0400	[thread overview]
Message-ID: <CAEsd5RuahampWrCY=zEY6ORkU89QsDGXDYitSBYJkS5=e60NjA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2050 bytes --]

                 reply	other threads:[~2022-04-28 14:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAEsd5RuahampWrCY=zEY6ORkU89QsDGXDYitSBYJkS5=e60NjA@mail.gmail.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