UDE

Timeline
Login

Timeline

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

50 most recent check-ins

2026-12-03
04:18
The old uderouter becomes udeslirp, representing a more accurate name for its purpose. A new uderouter program is introduced that acts as a true router between switches. leaf check-in: 9cb8c7cbbd user: chungy tags: trunk
2026-12-02
22:09
Tests for uderouter and udeslirp --route.

run_tests.sh section 19, on three switches: pings across the router (TTL 63) and to its far address, udeping -t 1 getting time exceeded and -t 2 getting through, network unreachable, host unreachable for a silent host and a silent gateway, the statistics on SIGINT, --no-icmp-errors, -q, refused interfaces and routes (exit 2), and a configuration file (both arrays, a MAC, a default route, no --swi... closed check-in: da55305886 user: grok tags: uderouter

22:09
Documentation for uderouter, and a how-to for several networks.
  • New docs/uderouter.8 and www/tools/uderouter.md.
  • New www/howto/multiple-networks.md, with pikchr diagrams: two switches joined by uderouter with udedhcpd on each; a chain to udeslirp --route for the outside world; the Linux host as the router with a udetap interface on each switch and ip_forward; and the two mixed, with an <tt...
check-in: 1087b8d69f user: grok tags: uderouter
22:09
uderouter: a user-space IPv4 router between switches; udeping -t.

tools/uderouter.c joins two or more switches, each a subnet of its own, and forwards IPv4 between them, with no privileges:

  • -i SWITCH,ADDR/LEN[,MAC] (repeatable, up to 16): a host on that switch, answering ARP and ping. The MAC defaults to 02:55: and the address in hexadecimal, so it is the same across restarts. Overlapping subnets are refused.
  • -r NET/LEN:G...
check-in: e994f3f601 user: grok tags: uderouter
21:40
udeslirp: --route NET/LEN:GATEWAY for hosts behind another router.

So that udeslirp can be the "ISP" of a larger network: a router on its switch joins other subnets and uses it as the default gateway. With --route 192.168.1.0/24:10.0.2.15 (repeatable, up to 16, and the route array of the [udeslirp] table):

  • the hosts of that network are served like guests (NAT, DNS, pings);
  • replies, ICMP errors and port forwards go back to them thro...
check-in: 291919a32a user: grok tags: uderouter
21:36
libude-ipv4: static routes, forwarding whole packets, and ARP failure callbacks.

What a router or a NAT gateway serving several subnets needs from the library:

  • ude_ipv4_add_route(), ude_ipv4_clear_routes() and ude_ipv4_next_hop(): up to UDE_IPV4_MAX_ROUTES (16) static routes, chosen by longest prefix after the on-link check and before the default router. Everything that sends (UDP, TCP, ICMP replies) uses them, so udeslirp c...
check-in: b697a20b77 user: grok tags: uderouter
21:35
Rename uderouter to udeslirp.

The SLIRP-style NAT gateway gets a name that says what it is, so that uderouter can become a generic IPv4 router between switches. Everything moves with it: tools/udeslirp.c, the binary (and udeslirp.exe), docs/udeslirp.8, www/tools/udeslirp.md, the [udeslirp] table of the configuration file, the README, ude.7, ude.conf.5, the www pages, auto.def, Makefile... check-in: 4b641c7c50 user: grok tags: uderouter

20:54
Add new uderouter and udetftpd commands check-in: 516301fde3 user: chungy tags: trunk
20:43
Document the configuration of udetftpd, uderouter and the boot options of udedhcpd. docs/ude.conf.5 lists the programs and the keys of the udetftpd and uderouter tables, plus next_server and boot_file of udedhcpd, with an example that boots a machine and gives it the Internet. udetftpd(8) and uderouter(8) gain -C/--configuration, --instance, --check-config and --print-config, an ENVIRONMENT section for UDE_CONFIG an... closed check-in: faa2b61d5c user: grok tags: merge
20:43
Read the configuration file in udetftpd and uderouter, and add next_server and boot_file to udedhcpd. Both programs take -C/--configuration, --instance, --check-config and --print-config and read UDE_CONFIG, as the others do: defaults, then the global table, the program's table, an instance table, then the command line.
  • udetftpd table: connection (--switch, also set by the global connection</tt...
check-in: b6040fb36d user: grok tags: merge
20:34
Allow _rmdir in the Windows import list. test_config removes its temporary directory since trunk 72d0c6edb8, and _rmdir is in every msvcrt.dll (Windows 95 and NT 4.0 too), like _mkdir beside it; without the line make test of the i686-w64-mingw32 cross build failed in tests/check_imports.sh with "test_config.exe: msvcrt.dll _rmdir". check-in: 4de0cec0e8 user: grok tags: merge
20:34
Merge uderouter into the branch, after udetftpd. uderouter, the libude-tcp deferred accept (ude_tcp_listen_ex()), the libude-ipv4 route and proxy-ARP hooks, the socket helpers of lib/net_compat, uderouter(8) and the routing, internet and uderouter pages come in as they were.

Conflicts:

  • Makefile.in: both programs in PROGRAMS, MANPAGES, the wrapper list and the test targets; the uderouter link rule gets CONFIG_OBJS later, with its con...
check-in: 5eb1a630e7 user: grok tags: merge
20:28
Merge udetftpd into the branch started from trunk 72d0c6edb8 (which already has the configuration file and extsrc). udetftpd, the TFTP engine, udedhcpd's -B/--next-server and -b/--boot-file, udetftpd(8) and the netboot page come in as they were.

Conflicts:

  • tools/udedhcpd.c: the configuration loader builds the long-option table itself, so the separate table of the udetftpd branch is gone; next-server and boot-file are in the...
check-in: 3aafc462b5 user: grok tags: merge
17:03
tests: remove the temporary ude-cfg-test directory check-in: 72d0c6edb8 user: chungy tags: trunk
16:48
Remove unnecessary --help text in udeswitch to an old option name check-in: 7a81a333a3 user: chungy tags: trunk
16:47
extsrc: reduce the noise in README to just the facts check-in: 20f0dddf61 user: chungy tags: trunk
16:45
Introduce a configuration file to provide defaults for ude’s programs check-in: a2490e7458 user: chungy tags: trunk
15:48
Merge extsrc: drop the SHA-256 checks for the vendored tomlc17 sources.

SHA256SUMS, the sums in extsrc/README and extsrc/check-hashes.sh are gone. make check-extsrc still compiles tomlc17.c with the project's full warning flags, including -Werror. The pin remains tag R261116, commit bfc5b9cd953daa07d095dc7e893954b2115ee8e0. closed check-in: a99ae46101 user: grok tags: config

15:47
Drop the SHA-256 checks for the vendored tomlc17 sources.

Fossil already records the exact bytes, and a zip or tar.gz of the tree would show a change just as clearly, so SHA256SUMS, the sums in extsrc/README and extsrc/check-hashes.sh are gone. make check-extsrc still compiles tomlc17.c with the project's full warning flags, including -Werror, even if the tree was configured with --disable-werror; ordinary make does not, so the target is kept. The pin remains tag R261116, commit bfc5b9cd953daa0... closed check-in: f131433260 user: grok tags: extsrc

15:16
Change port forwards to listen on 0.0.0.0 by default, as in QEMU's SLIRP, and add -b/--bind so outgoing sockets and implicit forwards can use a chosen host address.

A forward that omits HOSTADDR now listens on 0.0.0.0, or on the -b address if one was given. A single warning, in the same style as udeswitch's "not bound to a loopback address" line, is printed when any forward is not on loopback, once per run rather than once per forward. -b/--bind ADDR binds outgoing host TCP and UDP sockets, the... closed check-in: fa9a8e1e93 user: grok tags: uderouter

14:59
Make efi64 match both client architectures 7 and 9, and drop the separate efi-bc class.
  • efi64=FILE (and UDE_DHCPD_BOOT_EFI64) matches option 93 values 7 and 9. RFC 4578 assigns 7 to EFI Byte Code and 9 to x64 UEFI, but firmware often sends 7 for a 64-bit UEFI client, so this follows common practice.
  • A numeric class still matches one architecture only, and an exact match is chosen before efi64, so 9=FILE beats efi64=FILE for a client that sends 9. ...
closed check-in: 13dd2daa7d user: grok tags: udetftpd
05:25
Add uderouter, a NAT router from a UDE network to the host's network in the manner of QEMU's user-mode networking (SLIRP), with the library hooks it needs. It joins a switch as the gateway (default 10.0.2.2/24) and carries guest traffic out through ordinary host sockets, with no privileges, TAP device or routing rules. One thread around select().

TCP: guest connections are terminated by a transparent libude-tcp listener and spliced to non-blocking host connect() sockets, with half-close both wa... check-in: 3616691f18 user: grok tags: uderouter

05:11
Document configuration for udectl, udedump, udetap, udeping and udenc.

docs/ude.conf(5) lists their keys and notes that udenc has no short -C for a file. The five manpages, the www concept page and the tool pages follow, and udectl and udedump examples use -A for the switch policy. check-in: 03ff47f47e user: grok tags: config

05:11
Wire udectl, udedump, udetap, udeping and udenc to the configuration loader.

Each program reads --configuration or UDE_CONFIG, expands the file into long options, and supports --instance, --check-config and --print-config. udectl, udedump, udetap and udeping also get the short form -C. udenc keeps -C as an unsupported OpenBSD nc option (TLS/CRLF) and accepts only the long option --configuration, implemented as a distinct option value so it cannot be confused with that flag.

udeping may take it... check-in: 109977985e user: grok tags: config

05:06
Add udetftpd, a read-only TFTP server, and network boot options for udedhcpd, with a tested example that boots the Debian installer in QEMU.
  • udetftpd (tools/udetftpd.c, engine in common/ude_tftpd.[ch]) joins a switch as an IPv4 host with a static address, like udedhcpd, on libude-udp. It implements RFC 1350 read requests in octet and netascii modes, with blksize, timeout and tsize (RFC 2347, 2348 and 2349) and windowsize (RFC 7440). Block numbers wrap from 65535 to 0. Each t...
check-in: cec7e01bdb user: grok tags: udetftpd
05:01
Fix the Windows import check for the configuration loader.

ude_config looks up UDE_CONFIG with getenv, which every msvcrt including 9x and NT 4 already has; tests/win_imports.txt now allows it. test_config.c was using _putenv_s, which those old C runtimes do not provide. It now uses _putenv, and the allowlist gains _putenv, _mkdir and _getpid, the three CRT calls that test uses on Windows. check-in: 7376e5a1c3 user: grok tags: config

04:57
Add ude.conf(5) and a www page for the configuration file.

docs/ude.conf.5 describes how a file is found (-C wins over UDE_CONFIG, no implicit path), the precedence of defaults, the global table, the program table, an instance and the command line, underscore key names, --check-config and --print-config, relative paths and durations. It lists the keys for udeswitch, udedhcpd and udelink, DHCP reservations, and impairment presets, and notes that the other program tables are recognized but those ... check-in: c2cb41d3d3 user: grok tags: config

04:57
Wire udedhcpd and udelink to the configuration loader.

udedhcpd reads -C, --configuration or UDE_CONFIG and expands the file into long options: --subnet, --range, --lease, --leases, --router, --dns, --reserve, --quiet / --no-quiet, and the existing network options. Reservations come from the udedhcpd.reservations table. A relative leases path is resolved against the configuration file's directory.

udelink does the same, with --name, --local-a, --local-b, --keepalive, --retry, --impair, --impai... check-in: 49ed9299c4 user: grok tags: config

04:48
Wire udeswitch to the configuration loader, and rename its policy option.
  • -C is now --configuration FILE (short -C), matching the other programs. The access policy is -A / --policy (none, local, any). The old -C POLICY form is no longer accepted.
  • udeswitch reads -C, --configuration or UDE_CONFIG, expands the file into long options, and lets the command line override them. Each setting has a long option (for example --max-ports, --hub-mode / --no-hub-mode, --mac-aging-time). --instance...
check-in: b1532e888a user: grok tags: config
04:44
Add an internal TOML configuration loader, not yet used by any program.
  • common/ude_config.c and ude_config_schema.c parse a TOML file with the vendored tomlc17 and expand it into --long-option=value arguments. Precedence is built-in default, then the global table, then the program table, then a named instance, then the command line.
  • Unknown keys are recorded and reported by --check-config; they are ignored at run time. Type, range and enum errors fail at load, with file, line and colu...
check-in: ed825e0c52 user: grok tags: config
04:30
Vendor tomlc17 R261116 in extsrc/, compiled with every make but not yet linked.
  • extsrc/ holds the unmodified upstream tomlc17.c, tomlc17.h and LICENSE.tomlc17 from tag R261116 (commit bfc5b9cd953daa07d095dc7e893954b2115ee8e0). extsrc/README records the pin, the SHA-256 of each file and the update procedure. SHA256SUMS is the machine-readable copy of the hashes.
  • make compiles obj/extsrc/tomlc17.o with -Wall -Wextra, but without -Werror and without the project's stricter warning flags, ...
check-in: 8619ee5046 user: grok tags: extsrc
04:22
Add a new skeleton documentation check-in: caa2afaf0c user: chungy tags: trunk
01:46
ignore the udelink binary check-in: f28acd0b7b user: chungy tags: trunk
01:32
Start the documentation: manual pages in docs/, a www/ tree of guide templates, and optional make html and make pdf targets.
  • docs/ holds 17 mdoc pages: udeswitch(8), udedhcpd(8), udectl(1), udedump(1), udelink(1), udenc(1), udeping(1), udetap(1), libude(3) and its four protocol libraries, udedhcpd-leases(5), ude(7), ude-protocol(7) and ude-impair(7). They are written from the sources and help output, and lint clean under mandoc -T lint -W all.
  • As in ufatfs, docs/mkversion reads VERSIO...
closed check-in: ea7d1a89b5 user: grok tags: documentation
00:49
Move udecat to be an internal testing program only, not an installed end-user program. check-in: e4ad216a8e user: chungy tags: trunk
00:29
Make udecat an internal test helper that is not installed, and remove the python3 dependency of the end-to-end tests.

udecat is no longer a user tool. tools/udecat.c moved to tests/udecat.c (fossil mv). It is out of PROGRAMS, so make install and uninstall skip it, and out of TARGETS, so plain make no longer builds it. It is in TEST_BINS: make test builds it, with its build-tree wrapper (.libs/ud... closed check-in: acff68bc73 user: grok tags: udecat-internal

2026-12-01
23:55
Remove udecat.

udecat was a low-level scripted Ethernet client (send, wait, listen, hello, quit) used mainly as a debug and test injector. Its name is easy to confuse with udenc, the netcat equivalent, while it does not provide equivalent functionality.

This removes tools/udecat.c, its Makefile.in and auto.def targets, and the install, uninstall and clean rules for it. The README tools table, quick start, program ... closed check-in: dcc5a253a9 user: grok tags: remove-udecat

21:54
Do not warn about non-127.0.0.1 loopback addresses in udeswitch check-in: 9063d4ceb2 user: chungy tags: trunk
21:13
Treat the whole of 127.0.0.0/8 as loopback when warning about a bind address.

udeswitch used to warn "not bound to 127.0.0.1; anyone who can reach this port..." whenever the bind address was not exactly INADDR_LOOPBACK (127.0.0.1). The entire 127.0.0.0/8 block is loopback, so binding 127.0.0.2 (or any other address in that prefix) was a false warning.

The check now lives in one helper, ude_inaddr_is_loopback() / ude_endpoint_is_loopback() in net_compat: a numeric test of the ... closed check-in: 65b25d52bb user: grok tags: loopback-warn

19:39
fix 32-bit builds of UDE check-in: 08714e6910 user: chungy tags: trunk
19:24
Fix 32-bit builds of ude_impair.c under -Werror.
  • Cause: ude_impair_parse() rejected a spec longer than its 256-byte buffer with snprintf(err, errlen, "impairment too long: %s", spec). On 32-bit, errlen is a size_t that GCC treats as up to 4294967295, and in that branch spec is already at least 256 bytes, so -Wformat-truncation reports that the %s output may exceed ...
closed check-in: 38d8113fd6 user: grok tags: 32bit-fix
18:58
Add a udelink program, bridging UDE and/or VDE switches, and optionally introduce packet loss, duplication, corruption, delay, jitter, and rate-limiting. check-in: 1b388f73b3 user: chungy tags: trunk
18:21
Fix a shell error in run_tests.sh section 15 (and any other wait_log caller): bash reports [: : integer expected.
  • Cause: wait_log used a numeric test on the output of grep -c PATTERN FILE. grep -c prints a count of 0 when the file exists and has no matches, but prints nothing (and exits 2) when the file does not exist yet. A background command's redirect of stderr is opened in the child, so the wait can s...
closed check-in: 1c8ac64745 user: grok tags: impair
18:05
Merge trunk (introspection and port management, plus version 0.2.0 and the udenc --version fix) into impair.
  • Trunk now has the introspection work (udectl ports, macs, kick, flush, lib/mgmt.c, ude_mgmt_*) merged; link is still a private branch, already an ancestor of impair.
  • Conflicts, all resolved so both sides' features remain:
    • README.md (6): the tools table ke...
check-in: 6b51a583a1 user: grok tags: impair
17:53
Add switch introspection and port management through udectl check-in: c78d7f1caa user: chungy tags: trunk
06:33
Merge link into impair: trunk's udenc --version fix (version 0.2.0) and the section 14 test fix for the classic vde-2 vde_plug, which takes a socket path, not a vde:// URL. Section 15 now also waits for udelink's "connected" lines instead of a fixed sleep. README: test counts (172 end-to-end checks, 181 with valgrind). check-in: 3bf85b31a7 user: grok tags: impair
06:30
Merge trunk (the udenc --version fix and version 0.2.0) into link, and fix the dpipe/vde_plug test of run_tests.sh section 14 on hosts with the classic vde-2 tools.
  • Cause: the test ran dpipe udelink 127.0.0.1:PORT - = vde_plug vde:///DIR/sw. Only vdeplug4's vde_plug takes a vde:// URL; the classic one from vde-2 (2.3.x built without vdeplug4) passes its argument to the classic libvdeplug as a socket path, fails with "vde_open vde:///D...
closed check-in: 003f81a6db user: grok tags: link
05:46
Fix a udenc --version crash check-in: 21ddf3f176 user: chungy tags: trunk
05:37
Fix a crash of udenc --version (and any long option of udenc) that depended on the compiler, flags and environment.
  • Cause: udenc copies the shared network long options (ude_netcli_longopts) into a local, uninitialized ude_longopt longopts[16] to mark their values, but the copy loop stopped before the { 0, 0, 0 } entry that ends the table. ude_getopt_long() searches the program's table before ...
closed check-in: 24ea327dfd user: grok tags: udenc-version-fix
05:25
Update version to 0.2.0 check-in: ceb4779897 user: chungy tags: trunk