Consulting djbware Publications

UCSPI for IPv6

What is ucspi-tcp6?

Dan Bernstein's UNIX Client-Server Program Interface, UCSPI is a cornerstone of reliable network communication under Unix.

IPv6 capabilities have been included by Felix von Leitner's IPv6 patch.
Based on some additional research at the University of Applied Sciences in Frankfurt/Main (Germany), now a full-featured version is available supporting in addition compactified IPv6 addresses and the well-known classless prefix-notation for IPv4 and IPv6 networks.

ucspi-tcp6 has been build to confirm with Dan Bernstein's slashpackage scheme and uses a binary-compatible CDB for communication control.


ucspi-tcp6 is a fork of Dan Bernsteins's ucspi-tcp 0.88 version, including:

ucspi-tcp6 is AMD64-enabled and running on a wide range of Unix systems including OmniOS and Raspian.



Version & Download Description Verification
ucspi-tcp6 1.10.6 This seventh 1.10 release supports already fehQlibs-12 while supporting the use of colons ':' for environment variables while generating the cdb's with tcprules and providing a dual-stack tcpserver operation. MD5: 43eff456760a893850e2acaa2e8cfd04
Build: 20190608114158
ucspi-tcp6 1.10 This first 1.10 release is based on fehQlibs MD5: 5faae60a0680f33e8468af9b08a071d2
Build: 20180827231707
ucspi-tcp6 1.05 This fifth 1.0 release providing in particular compatibility with Solaris/OmniOS MD5: 098375a7116c6c6c6ba2407746ff51ac
Build: 20180919220205.


Updated man pages:

Server apps Client apps Miscellaneous
rblsmtpd date@ addcr
recordio finger@ argv0
tcprules http@ delcr
tcprulescheck mconnect fixcrio
tcpserver tcpcat tcp-environ

Source Code:

ucspi-tcp6's source files are provided via Doxygen documentation.

How to install ucspi-tcp6

Prior of installing ucspi-tcp6-1.10 you need to install fehQlibs. Please follow instructions here.

ucspi-tcp6 uses D.J. Bernstein's /package conventions for installation. Typically, un-tar the archive under /package, change to net/ucspi-tcp6/ucspi-tcp6-<version> and call package/install.
ucspi-tcp6 is pre-packaged to suite the AMD64 environment and comes with additional man-pages.


CIDR Support

Main modification in ucspi-tcp6 is the enhanced format for tcpserver's rules.cdb. It supports now:

IPv6 for rblsmtpd RBL Lookups

rblsmtpd is able to do a RBL lookup even for IPv6 addresses constructing the TXT query in the following way:

e.f.e.f ......

However; I'm not aware of any exiting IPv6 RBL. Rather, within my package djbdnscurve6 you might find rbldns which can cope with those requirements.

DNS Stub Resolver

ucspi-tcp6 comes with a DNS stub resolver borrowed from fehQlibs. Thus IPv4 and IPv6 Name resolution is provided and allowing to specify dedicated Forwarder/Cache Servers and Name Qualification apart from /etc/resolv.conf.

In practice, you are allowed to use those services on your link-local IPv6 network, which actually protects your DNS queries and replies given a trusted network link.

*ix specific installation instructions


ucspi-tcp6 will compile with clang in case Xcode is installed.

You need (perhaps) to adjust conf-cc and conf-ld in ucspi-tcp6's main directory.

MacOS X relocated the standard now to be part of the xcode SDK. The following include solved the situation under MacOS X 'El Capitan' in my case for conf-cc:

clang -O2 -g -Wall -I /Developer/SDKs/MacOSX10.6.sdk/usr/include

You can add that statement into the conf-cc file prior of compilation.

Note: High Sierra seems to be broken beyond repair missing required symbols for fehQlibs in libc; while Mojave is working fine.

OmniOS (Illuminos)

ucspi-tcp6 starting with version 1.05 will compile under OmniOS. It has been tested with SunOS omni 5.11 and GCC 5.11 and 8.

Two tweaks are required:

  1. Link gcc to /usr/bin/cc
  2. Perhaps use conf-ld without the '-m64' argument.

RasPi/Raspian Linux

ucspi-tcp6 supports Raspian Linux and the ARM architecture out-of-the box.

Some samples are provided in the conf-cc and conf-ld file how to improve performance depending on the supporting HW architecture. See gcc ARM options for a comprehensive compilation of possibilities.

Within the src directory of ucspi-tcp6 use

sh ./

to display the recognized SW and HW architecture.