Skip to content

AROSTCP

Nick Andrews edited this page Feb 22, 2026 · 12 revisions

AROSTCP bsdsocket.library — Implementation To-Do Summary (from Conformance Notes)

This is a raw Markdown checklist of items that are not implemented / stubbed / missing / broken per the provided documentation.


Roadshow “extended” API — present in function table, but ENOSYS stubs

BPF (Berkeley Packet Filter) — NOT IMPLEMENTED

All are ENOSYS stubs; no kernel BPF engine or hook points exist.

  • bpf_open()
  • bpf_close()
  • bpf_read()
  • bpf_write()
  • bpf_set_notify_mask()
  • bpf_set_interrupt_mask()
  • bpf_ioctl()
  • bpf_data_waiting()

Work required (kernel/user boundary):

  • Add BPF VM/interpreter in kernel
  • Add attach/detach hooks in network RX/TX paths
  • Maintain per-interface filter lists and dispatch captured frames to readers
  • Implement notify/interrupt semantics required by API

Route Management — NOT IMPLEMENTED

All are ENOSYS stubs; routing table exists internally but is not exposed.

  • AddRouteTagList()
  • DeleteRouteTagList()
  • ChangeRouteTagList() (undocumented in spec but present)
  • FreeRouteInfo()
  • GetRouteInfo() (currently returns NULL)

Work required:

  • TagItem-based wrapper over internal routing table
  • Optional: implement RTM-style messaging support (BSD 4.4-like)

Interface Management — NOT IMPLEMENTED

All are ENOSYS stubs; AROSTCP currently relies on IoctlSocket() (IPv4) and db/interfaces at startup.

  • AddInterfaceTagList()
  • ConfigureInterfaceTagList()
  • QueryInterfaceTagList()
  • ObtainInterfaceList() (currently returns NULL)
  • ReleaseInterfaceList()
  • BeginInterfaceConfig()
  • AbortInterfaceConfig()
  • CreateAddrAllocMessageA()
  • DeleteAddrAllocMessage()
  • RemoveInterface()

Work required:

  • Dynamic SANA-II device open/close and interface lifecycle mgmt
  • TagItem parsing and validation
  • Runtime address allocation / configuration hooks

Network Monitoring — NOT IMPLEMENTED

All are ENOSYS stubs.

  • AddNetMonitorHookTagList()
  • RemoveNetMonitorHook()
  • GetNetworkStatistics()

Work required:

  • Stats wrapper over existing if_data counters (low effort)
  • Monitor hook callback injection points into RX/TX paths (medium effort)

DNS Server Management — NOT IMPLEMENTED

All are ENOSYS stubs; resolver reads db/nameservers file today.

  • AddDomainNameServer()
  • RemoveDomainNameServer()
  • ObtainDomainNameServerList() (currently returns NULL)
  • ReleaseDomainNameServerList()
  • GetDefaultDomainName()
  • SetDefaultDomainName()

Work required:

  • Maintain in-memory resolver configuration alongside file-based list
  • Provide list obtain/release semantics expected by API

IPv6 control plane — socket creation/bind/I/O exist, but key options/state are missing

IPPROTO_IPV6 socket options — SILENT NO-OP

ip6_ctloutput() silently accepts all options but does nothing.

  • IPV6_JOIN_GROUP — join IPv6 multicast group
  • IPV6_LEAVE_GROUP — leave IPv6 multicast group
  • IPV6_MULTICAST_IF — select multicast output interface
  • IPV6_MULTICAST_HOPS — set multicast hop limit
  • IPV6_MULTICAST_LOOP — multicast loopback enable/disable
  • IPV6_V6ONLY — restrict socket to IPv6-only
  • IPV6_RECVPKTINFO — receive destination address info
  • IPV6_TCLASS — traffic class
  • IPV6_UNICAST_HOPS — set unicast hop limit
  • IPV6_HOPLIMIT — get/set hop limit

Work required:

  • Implement real ip6_ctloutput() behavior and backing kernel state

IPv6 Multicast — NO KERNEL MEMBERSHIP/MLD/DELIVERY STATE

Multicast joins are discarded; packets are not delivered to sockets.

  • Per-socket IPv6 group membership list
  • Per-interface multicast group table
  • MLD (Multicast Listener Discovery) implementation
  • Input demux/delivery to sockets for multicast destinations

IoctlSocket() — IPv6 ioctls missing

IPv4 ioctls are implemented; IPv6 equivalents are not.

  • SIOCGIFADDR_IN6
  • SIOCAIFADDR_IN6
  • SIOCDIFADDR_IN6
  • SIOCGLIFADDR

Work required:

  • Implement IPv6 address enumeration and configuration via ioctl

Compatibility / spec gaps that break builds or runtime behavior

Miami compatibility extensions — missing/stubbed/partial

Not implemented or incomplete:

  • MiamiSysCtl() — stub/error
  • MiamiGetHardwareLen() — returns 0
  • MiamiSetSocksConn() — error
  • MiamiOpenSSL() / MiamiCloseSSL() — error
  • sockatmark()ENOSYS
  • MiamiPFAddHook() / MiamiPFRemoveHook() — partial interception (coverage incomplete)

Spec-documented functions missing entirely from source

These exist in bsdsocket.doc.txt but have no implementation in AROSTCP.

  • ProcessIsServer()
  • ObtainServerSocket()
  • ChangeRoadshowData()
  • ObtainRoadshowData()
  • ReleaseRoadshowData()

Work required:

  • Add entry points to avoid link-time failures/null vectors
  • Implement minimal viable semantics (RoadshowData likely needs compatibility shim)

inet_pton() / inet_ntop() via Miami jump table — IPv6 BROKEN

Including <proto/miami.h> routes calls to Miami offsets that are IPv4-only; AF_INET6 fails.

  • Update Miami jump-table implementations to call full IPv6-capable code:
    • inet_ntop (Miami offset 38)
    • inet_pton (Miami offset 40)
  • Ensure they dispatch to __inet_ntop() / __inet_pton() in api/inet_pton.c

PF_ROUTE routing socket — NOT IMPLEMENTED

Spec documents socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC); AROSTCP has no PF_ROUTE domain registered.

  • Register PF_ROUTE domain
  • Implement RTM_* routing messages (RTM_ADD/DELETE/CHANGE/GET/etc.)
  • Plumb routing table change notifications to listeners

SO_REUSEPORT vs SO_REUSEADDR semantics — behavioral divergence (not a missing symbol)

Not an “unimplemented function”, but notable difference vs common Linux UDP semantics:

  • UDP port sharing requires SO_REUSEPORT on both sockets; SO_REUSEADDR alone does not enable shared binds.

  • Decide whether to:

    • Keep behavior and document it, or
    • Adjust PCB/bind logic for Linux-like UDP reuse semantics

Condensed implementation backlog (ordered)

  1. Implement IPv6 socket options (ip6_ctloutput, backing state)
  2. Fix Miami inet_pton/inet_ntop jump table to support AF_INET6
  3. Implement DNS server management API (Add/Remove/List/Default)
  4. Implement IPv6 multicast (membership tables + MLD + delivery)
  5. Implement route management API (TagList wrapper; optional RTM plumbing)
  6. Implement PF_ROUTE socket domain + RTM messaging
  7. Implement interface management API (TagList; dynamic SANA-II lifecycle)
  8. Implement network monitoring hooks + statistics wrapper
  9. Implement BPF (kernel VM + hooks + per-interface filters)
  10. Add missing spec functions (ProcessIsServer, ObtainServerSocket, RoadshowData*)
  11. Implement IPv6 ioctls (SIOCGIFADDR_IN6, SIOCAIFADDR_IN6, etc.)

Clone this wiki locally