Roadshow — bsdsocket TCP/IP Stack

Roadshow is Olaf Barthel's TCP/IP stack for AmigaOS, included in AmigaOS 3.2 (NDK 3.2 SANA+RoadshowTCP-IP/). It exposes the bsdsocket.library API — the de-facto Amiga networking standard originated by AmiTCP — plus Roadshow-specific extensions for interface and routing management. The NDK ships the full source tree, not just headers.

This complements (does not replace) the SANA-II Networking Standard article: SANA-II is the driver standard; bsdsocket.library is the socket API and TCP/IP implementation that sits above SANA-II drivers.

The bsdsocket.library API

The standard Berkeley sockets are all present, under bsdsocket.library: socket(), accept(), bind(), listen(), connect(), send()/sendto()/sendmsg(), recv()/recvfrom()/recvmsg(), shutdown(), getpeername()/getsockname(), getsockopt()/setsockopt(), IoctlSocket(), WaitSelect() (the Amiga-friendly select() that yields the CPU), Dup2Socket(). Protocols are documented per-family: ICMP, IP, TCP, UDP, plus -networking- (intro), -inet-, and -route-.

Name resolution: classic gethostbyname() (and the reentrant gethostbyname_r()), the modern getaddrinfo()/freeaddrinfo()/getnameinfo()/gai_strerror() pair, getprotobyname(), getservbyname(), inet_addr()/inet_ntoa()/inet_pton()/inet_ntop(), and the res_* resolver routines.

Roadshow-specific management functions

Beyond sockets, Roadshow provides a programmatic interface to stack configuration (things AmiTCP did via config files):

  • InterfacesAddInterfaceTagList(), ConfigureInterfaceTagList(), QueryInterfaceTagList(), RemoveInterface(), BringUpInterface() / BringDownInterface(), BeginInterfaceConfig() / AbortInterfaceConfig().
  • RoutingAddRouteTagList(), DeleteRouteTagList(), FreeRouteInfo().
  • DNSAddDomainNameServer(), SetDNSServers().
  • MonitoringAddNetMonitorHookTagList() / RemoveNetMonitorHook() (observe traffic without a separate sniffer).
  • BSD Packet Filter (BPF)bpf_open() / bpf_close() / bpf_read() / bpf_write() / bpf_ioctl() / bpf_data_waiting() / bpf_set_notify_mask() / bpf_set_interrupt_mask(). This is how tcpdump/libpcap capture packets on Amiga.
  • Address allocationCreateAddrAllocMessageA() / DeleteAddrAllocMessage() (DHCP-style allocation).

The networking intro's canonical includes are:

#include <sys/socket.h>
#include <net/route.h>
#include <net/if.h>

Keep netinclude/ separate — do not merge it

This is the #1 porting gotcha. The Roadshow SDK deliberately mirrors the SAS/C runtime header layout (a legacy of AmiTCP). If you copy netinclude/ on top of your system includes, you damage your C compiler installation and it stops working with AmiTCP too. The netinclude.readme is emphatic: keep the directory separate and point the compiler at it instead:

  • GCC: add -Inetinclude
  • SAS/C: add idir=netinclude

Do not flatten netinclude into the standard include path.

Full source is included

SANA+RoadshowTCP-IP/source_code/ ships complete source, useful as reference and for porting/rebuilding:

  • Roadshow/ — the stack itself.
  • 4.4BSD-Lite2/ — the BSD networking code Roadshow derives from.
  • libpcap-0.8.1/ + tcpdump-3.8.1/ — packet capture.
  • PPP/ — PPP dial-up support.
  • wget-1.10.1/ — a real-world client built against the stack.

SANA-II evolved: R4 then R5

The SANA-II driver standard (see SANA-II Networking Standard) grew two revisions documented here:

  • SANA-IIR4 — extended statistics and online/offline management. Adds S2_GETEXTENDEDGLOBALSTATS (per-interface accumulated runtime statistics), runtime-statistics query structures, and explicit online/offline + link-layer connect control.
  • SANA-IIR5 — hook-based callback extensions. Introduces the S2_SANA2HOOK command, invoked right after OpenDevice(), which lets a driver install hook-based callbacks in place of the traditional copy-callbacks installed at OpenDevice() time (valid until CloseDevice()). The doc is explicit that R5 is a list of proposed changes, aimed at drivers beyond traditional Ethernet. R5 drivers and clients negotiate which model they use.

When writing a SANA-II driver, target R4 for broad compatibility; use R5 hooks only when you need the flexibility and can tolerate the "proposed" status.

See Also


Sources: Olaf Barthel, Roadshow bsdsocket.doc, SANA-IIR4/R5 specs (sana2r4.html, sana2r5.html), netinclude.readme; NDK 3.2 SANA+RoadshowTCP-IP/, 2016-2021. Raw: raw/networking/roadshow-bsdsocket.md Updated: 2026-08-04