# Changes from the original Bernstein softwares

The djbwares toolset has been changed over the years from the original Bernstein softwares in the following ways.

- It comprises only the tools and their doco.

  - The various "install", "setup", "check" helpers that create and test directory hierarchies under `/usr/local`, longhand, in C code, are omitted. The source package is capable of building Debian, FreeBSD/TrueOS, NetBSD, and OpenBSD binary packages. Package management deals with installing files into hierarchies with ownerships and permissions; this is package management's bread and butter.

  - `svscanboot` is a thing of the past. Plumbing this in as one's service management mechanism, or under one's own system and service management mechanisms, is well beyond the scope here.

  - The helpers for creating djbdns and publicfile service bundles are omitted. The nosh toolset (for starters) comes with service bundles for these; and the same goes for some other toolsets, all of which have different needs (not satisfied by the Bernstein helper programs) anyway.

- Most of the manual pages are now in Docbook XML, from which the build system compiles roff and HTML manual pages.

- The build system is redo; like the original Bernstein-published ptyget package had, but finished and extended to everything.

- The duplicated libraries have been consolidated. In some cases, in particular in some of the very oldest code, this has meant switching from (say) the "substdio" library to the "buffer" library. Some code, such as the old "sig" APIs for catching/ignoring signals, has been retained alongside its newer replacements from later iterations of the library, for the benefit of not updating older code that uses that API.

- Some well-known patches are pre-applied.

  - My original djbdns patches are included, which mainly add minor functionality (like additional querying tools) or fix outright errors (like just blithely continuing on regardless even when input is malformed).

  - My original ucspi-tcp patches are included, which just fix outright errors (no error checking in argument parsing).

- Some new tools have been added

  - `gopherd` and `geminid` have been added, which use the same back-end data as the other publicfile tools.

    `geminid` requires UCSPI-SSL tooling that Bernstein's UCSPI-TCP does not cover, and the toolset is not capable of a full GEMINI server without third-party help. However, it can also be used, since the protocol is largely compatible, as a UCSPI-TCP server for FINGER and NICNAME/WHOIS services. This allows one to serve up FINGER and NICNAME without revealing any information from the system account database, as all served content is entirely in the publicfile subdirectory tree.

  - A simple standalone `host` tool has been added, eliminating the need for the ISC implementation of that tool, and all of the ISC-specific additional packages that it pulls in.

- Taking a leaf out of the GEMINI book, `httpd` no longer accepts URLs that contain fragment identifiers or query parameter strings.

- Some IPv6 support has been added.

  - Easy-syntax `AAAA` resource record support has been added.

  - `dnsip` and `dnsipq` will now look up and display IPv6 addresses.

  - IPv6 addresses can be supplied as the server name to `dnsq`.

  - `dnscache`, `axfrdns`, `tinydns`, `walldns`, and `rbldns` can all listen on IPv6 addresses.

  - There is some preliminary support for `dnscache` to talk to other DNS servers that are on IPv6 addresses.

  - The original TAICLOCK server that only worked over IPv4 is now named `taiclock4d`, and `taiclockd` is now an IPv6 tool that can operate IPv6 only or use a combined IPv6 and IPv4 stack.

- General DNS support has been modernized.

  - All DNS servers now synthesize `HINFO` responses to `ANY` queries, in line with RFC 8482. Likewise, the `ANY` query class (rather than type) is no longer supported.

  - The easy-syntax `SRV` resource record support has been added to `tinydns-data` (as well as concomitant changes to `tinydns-get` and `dnsq`).

  - `walldns` has been extensively augmented, as have `dnscache` and the `djbdns-client` library that the utilities use, to deal with many "special-use domain names" that had not been standardized, and often not even invented, when the final version of Bernstein djbdns was released.

  - The `djbdns-client` library contains mechanism for accommodating different DNS servers for use with `onion.`, multicast DNS, and DNS Service Discovery. With the `DNSCACHEIP_ONION` environment variable set, for example `dnsip` will automatically route `*.onion.` lookups to the correct DNS server.

- Several tools are now more easily used with UCSPI-TCP managing their sockets for them. The content DNS and TAICLOCK servers have been changed to enable them to inherit already-open sockets, using the systemd `LISTEN_FDS` mechanism. So has `dnscache`, which requires two already-open sockets, of the right kinds.

- Several obsolete things have been removed or otherwise dealt with.

  - `pickdns`, obsolete for 24 years, has been removed from the toolset.

  - `rblsmtpd` no longer defaults to a blacklist that has been defunct for over a decade.

  - `/etc/dnsroots.global` is no longer packaged nor used by any tool, in favour of just querying the DNS for a current list if one is using them.

- `ftpd` now copes with various poor and standards-violating practices in modern WWW browsers whose support for FTP is no longer as good as it was when publicfile was originally written.

- The basic bugs are fixed.

  - `errno` is declared by including the right standard C library header.

  - Various missing function declarations that C1999 requires are added.

  - Const correctness bugs are fixed in various places.

  - Incorrect declarations of `main()` are fixed.

  - Reliance upon implicit function declarations, non-conformant to C1999, is fixed by including quite a lot of missing headers.

  - The obsolete `TIOCREMOTE` mechanism is disabled outwith OpenBSD.

  - K&R function declarations have been turned into standard C1989 function declarations, as C2023 is finally dispensing with K&R.