bootp: add support for UEFI HTTP boot

Current bootp implementation is only one step away from supporting UEFI HTTP
boot in QEMU. The only missing bit is that the UEFI specification [1] requires
a vendor class identifier option (num 60) set to "HTTPClient" string present
in the DHCP response.

OVMF [2] indeed ignores the DHCP response and considers UEFI HTTP boot as
failed, if this option is not present.

With this change one would be able to configure QEMU user networking like
below:

$ qemu ... -nic user,tftp=tftp-root,bootfile=http://10.0.2.2/ipxe.efi

and boot the VM using UEFI HTTP boot instead of TFTP.

[1]: https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf
[2]: https://github.com/tianocore/edk2/tree/5302bd81d9ba0c9e7f2371a81c438ec919ec8e1e/OvmfPkg

Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
2 files changed
tree: 1adf68e530e53479ef3485ad987e9af764d6c2ac
  1. build-aux/
  2. src/
  3. test/
  4. .clang-format
  5. .gitignore
  6. .gitlab-ci.yml
  7. .gitpublish
  8. CHANGELOG.md
  9. COPYRIGHT
  10. meson.build
  11. meson_options.txt
  12. README.md
README.md

libslirp

libslirp is a user-mode networking library used by virtual machines, containers or various tools.

Getting Started

Prerequisites

A C compiler, meson and glib2 development libraries.

(see also .gitlab-ci.yml DEPS variable for the list of dependencies on Fedora)

Building

You may build and install the shared library with meson:

meson build
ninja -C build install

And configure QEMU with --enable-slirp=system to link against it.

(QEMU may build with the submodule static library using --enable-slirp=git)

Testing

Unfortunately, there are no automated tests available.

You may run QEMU -net user linked with your development version.

Contributing

Feel free to open issues on the project issues page.

You may clone the gitlab project and create a merge request.

Contributing with gitlab allows gitlab workflow, tracking issues, running CI etc.

Alternatively, you may send patches to slirp@lists.freedesktop.org mailing list.

Versioning

We intend to use libtool's versioning for the shared libraries and use SemVer for project versions.

For the versions available, see the tags on this repository.

License

See the COPYRIGHT file for details.