-
-
Notifications
You must be signed in to change notification settings - Fork 89
AROSTCP
This document tracks what is implemented, partially implemented, and not yet implemented in the AROSTCP network stack.
Last updated against codebase: March 2026.
| Protocol | Status | Key Files |
|---|---|---|
| IPv4 | ✅ Complete |
netinet/ip_input.c, ip_output.c, in.c, in_pcb.c
|
| IPv6 | ✅ Complete |
netinet6/ip6_input.c, ip6_output.c, in6.c, in6_pcb.c
|
| TCP (v4+v6) | ✅ Complete |
netinet/tcp_input.c, tcp_output.c, tcp_usrreq.c, netinet6/
|
| UDP (v4+v6) | ✅ Complete |
netinet/udp_usrreq.c, netinet6/udp6_usrreq.c
|
| ICMP | ✅ Complete | netinet/ip_icmp.c |
| ICMPv6 | ✅ Complete | netinet6/icmp6.c |
| Raw IP (v4+v6) | ✅ Complete | netinet/raw_ip.c |
| ARP | ✅ Complete | net/sana2arp.c |
| Feature | Status | Key Files |
|---|---|---|
| NDP (Neighbor Discovery) | ✅ Complete |
netinet6/nd6.c, nd6_nbr.c, nd6_rtr.c
|
| DAD (Duplicate Address Detection) | ✅ Complete |
netinet6/nd6.c (nd6_dad_start/timer) |
| SLAAC (Stateless Auto-config) | ✅ Complete |
netinet6/nd6_rtr.c (RA processing, prefix handling) |
| Router Discovery | ✅ Complete |
netinet6/nd6_rtr.c (RS/RA) |
| MLD (Multicast Listener Discovery) | ✅ Complete |
netinet6/mld6.c, mld6.h (MLDv1, RFC 2710) |
| IPv6 Multicast membership | ✅ Complete |
netinet6/in6.c (in6_addmulti/delmulti), in6_proto.c
|
| IPv6 socket options | ✅ Complete |
netinet6/in6_proto.c (ip6_ctloutput) |
| IPv6 ioctls | ✅ Complete |
netinet6/in6.c (in6_control) |
| Feature | Status | Key Files |
|---|---|---|
| SANA-II device integration | ✅ Complete |
net/if_sana.c, sana2config.c
|
| Loopback interface | ✅ Complete | net/if_loop.c |
| Interface management | ✅ Complete | net/if.c |
| Routing table (radix tree) | ✅ Complete |
net/route.c, net/radix.c
|
| PF_ROUTE routing socket | ✅ Complete |
net/rtsock.c (RTM_ADD/DELETE/CHANGE/GET + notifications) |
| BPF (packet capture/filter) | ✅ Complete |
net/bpf.c, net/bpf_filter.c
|
| Packet filter framework | ✅ Complete |
net/pfil.c (conditional on ENABLE_PACKET_FILTER) |
| IP Filter / firewall | ✅ Complete |
net/ipfilter.c (rule engine, NAT support) |
| Feature | Status | Key Files |
|---|---|---|
| Core socket ops | ✅ Complete |
kern/uipc_socket.c, uipc_socket2.c
|
| DNS resolver | ✅ Complete |
api/res_init.c, res_query.c, res_send.c, res_mkquery.c
|
| Name resolution | ✅ Complete |
api/gethostnamadr.c, getxbyy.c
|
inet_ntop / inet_pton
|
✅ Complete | api/inet_ntop.c |
if_nameindex / getifaddrs
|
✅ Complete |
api/if_nameindex.c, getifaddrs.c
|
| Feature | Status | Key Files |
|---|---|---|
| DHCPv4 client | ✅ Complete |
kern/amiga_dhcp.c (external dhclient launcher) |
| DHCPv6 client | ✅ Complete |
kern/amiga_dhcp.c (conditional on INET6 && DHCP6) |
| Network database | ✅ Complete | kern/amiga_netdb.c |
| ARexx interface | ✅ Complete | kern/amiga_rexx.c |
| GUI configuration | ✅ Complete | kern/amiga_gui.c |
| Logging / debug | ✅ Complete |
kern/amiga_log.c, kern/subr_prf.c
|
| RC file configuration | ✅ Complete |
kern/amiga_rc.c, amiga_config.c
|
| Utility | Location |
|---|---|
arp |
common/C/arp.c |
ifconfig |
common/C/ifconfig.c |
ping |
common/C/ping.c |
route |
common/C/route.c |
netstat |
common/C/netstat/ (inet, inet6, route, if, mbuf stats) |
traceroute |
common/C/traceroute/ |
nslookup |
common/C/nslookup/ (interactive mode) |
hostname |
common/C/hostname.c |
resolve |
common/C/resolve.c |
logger |
common/C/logger.c |
whoami |
common/C/whoami.c |
ipf |
common/C/ipf/ (IP Filter rule management) |
ipnat |
common/C/ipnat/ (NAT rule management) |
Full kernel BPF engine with RX/TX hook points and Roadshow API layer.
-
bpf_open()— allocates & initializes BPF descriptor -
bpf_close()— closes descriptor and frees resources -
bpf_read()— reads captured packets from hold buffer -
bpf_write()— transmits raw packets via interface -
bpf_set_notify_mask()— sets EXEC signal notification -
bpf_set_interrupt_mask()— sets interrupt mask -
bpf_ioctl()— handles 16+ ioctl commands (BIOCGBLEN, BIOCSBLEN, BIOCSETF, BIOCFLUSH, BIOCPROMISC, BIOCGDLT, BIOCSETIF, BIOCGSTATS, BIOCVERSION, etc.) -
bpf_data_waiting()— returns bytes available for reading
Kernel infrastructure:
- BPF VM/interpreter (
net/bpf_filter.c— full instruction set) - Attach/detach hooks in SANA-II RX/TX paths (
net/if_sana.c) - Per-interface filter lists and frame dispatch (
net/bpf.c) - Notify/interrupt signal semantics
Full TagItem-based route API with BSD 4.4 routing socket support.
-
AddRouteTagList()— parses tags, callsrtrequest(RTM_ADD, ...) -
DeleteRouteTagList()— parses tags, callsrtrequest(RTM_DELETE, ...) -
ChangeRouteTagList()— atomic delete+re-add under splnet -
FreeRouteInfo()— frees allocated route info buffer -
GetRouteInfo()— two-pass radix walk, returnsrt_msghdrarray with filtering
Kernel infrastructure:
- PF_ROUTE domain registered (
net/rtsock.c) - RTM_ADD / RTM_DELETE / RTM_GET / RTM_CHANGE / RTM_LOCK messages
- RTM_MISS / RTM_RESOLVE / RTM_REDIRECT / RTM_IFINFO / RTM_NEWADDR / RTM_DELADDR notifications
Most are ENOSYS stubs; QueryInterfaceTagList is functional.
-
AddInterfaceTagList()— STUB (returns -1, ENOSYS) -
ConfigureInterfaceTagList()— STUB (returns -1, ENOSYS) -
QueryInterfaceTagList()— IMPLEMENTED (full implementation inamiga_netstat.c) -
ObtainInterfaceList()— STUB (returns NULL) -
ReleaseInterfaceList()— STUB -
BeginInterfaceConfig()— STUB -
AbortInterfaceConfig()— STUB -
CreateAddrAllocMessageA()— STUB (returns 0) -
DeleteAddrAllocMessage()— STUB -
RemoveInterface()— NOT PRESENT (no entry point)
Work remaining:
- Dynamic SANA-II device open/close and interface lifecycle management
- TagItem parsing for Add/Configure
- Runtime address allocation / configuration hooks
- ObtainInterfaceList / ReleaseInterfaceList list management
All are ENOSYS stubs.
-
AddNetMonitorHookTagList()— STUB (returns -1, ENOSYS) -
RemoveNetMonitorHook()— STUB -
GetNetworkStatistics()— STUB (returns -1, ENOSYS)
Work required:
- Stats wrapper over existing
if_datacounters (low effort) - Monitor hook callback injection points into RX/TX paths (medium effort)
Runtime add/remove/list is implemented; default domain name API is missing.
-
AddDomainNameServer()— IMPLEMENTED (parses address, adds to DynDB.dyn_NameServers) -
RemoveDomainNameServer()— IMPLEMENTED (finds and removes from list) -
ObtainDomainNameServerList()— IMPLEMENTED (returns populated list from static + dynamic entries) -
ReleaseDomainNameServerList()— IMPLEMENTED (walks list, frees all nodes) -
GetDefaultDomainName()— NOT PRESENT (no entry point) -
SetDefaultDomainName()— NOT PRESENT (no entry point)
Work remaining:
- Implement
GetDefaultDomainName()/SetDefaultDomainName()(read/write default domain from resolver state)
ip6_ctloutput() in netinet6/in6_proto.c implements real option handling with backing kernel state.
-
IPV6_JOIN_GROUP— callsin6_joingroup_inp()→in6_addmulti()→ MLD report -
IPV6_LEAVE_GROUP— callsin6_leavegroup_inp()→in6_delmulti()→ MLD done -
IPV6_MULTICAST_IF— setsim6o->im6o_multicast_ifp -
IPV6_MULTICAST_HOPS— setsim6o->im6o_multicast_hlim(validated 0-255 or -1) -
IPV6_MULTICAST_LOOP— setsim6o->im6o_multicast_loop -
IPV6_V6ONLY— setsinp->in6p_v6only -
IPV6_RECVPKTINFO— sets/clearsIN6P_PKTINFOflag -
IPV6_TCLASS— setsinp->in6p_tclass -
IPV6_UNICAST_HOPS— setsinp->in6p_hops -
IPV6_HOPLIMIT— NOT HANDLED (get/set hop limit ancillary data)
Full multicast stack with MLD protocol support.
- Per-socket IPv6 group membership list (
struct ip6_moptions, max 20 groups) - Per-interface multicast group table (
struct in6_multilinked list,in6_multihead) - MLD (Multicast Listener Discovery) — MLDv1 per RFC 2710 (
netinet6/mld6.c)- Query/Report/Done message handling
- Per-group state machine (IDLE/LAZY/SLEEPING/AWAKENING)
- Report timer with random delay
- Report suppression on hearing other reports
- Unsolicited reports on join, Done on leave
- ff02::1 (all-nodes) exemption per RFC 2710 §6
- SANA-II multicast MAC registration (
sana_add_mcast6/sana_del_mcast6)
IPv6 address management ioctls are handled in in6_control():
-
SIOCGIFADDR_IN6— get IPv6 interface address -
SIOCAIFADDR_IN6— add/configure IPv6 interface address -
SIOCDIFADDR_IN6— delete IPv6 interface address -
SIOCGLIFADDR— enumerate addresses (used bygetifaddrs)
-
MiamiSysCtl()— STUB (returns ENOSYS) -
MiamiGetHardwareLen()— STUB (returns 0) -
MiamiSetSocksConn()— STUB (returns FALSE) -
MiamiOpenSSL()— returns NULL (no SSL support; intentional, not an error) -
MiamiCloseSSL()— no-op (intentional) -
sockatmark()— STUB (returns 0) -
MiamiPFAddHook()— IMPLEMENTED (allocates hook, adds to pfil_list) -
MiamiPFRemoveHook()— IMPLEMENTED (removes from pfil_list, frees)
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)
BSD-standard behavior is implemented in netinet/in_pcb.c:
-
Multicast addresses:
SO_REUSEADDRis treated asSO_REUSEPORT(allows full duplication) -
Unicast addresses:
SO_REUSEPORTrequired on both sockets for shared binds -
This matches FreeBSD/macOS semantics; differs from Linux where
SO_REUSEADDRalone enables UDP port sharing -
Decide whether to:
- Keep behavior (BSD-standard) and document it, or
- Adjust PCB/bind logic for Linux-like UDP reuse semantics
- Implement
IPV6_HOPLIMITsocket option (ancillary data for received hop limit) - Implement
GetDefaultDomainName()/SetDefaultDomainName() - Implement interface management API (
AddInterfaceTagList,ConfigureInterfaceTagList,ObtainInterfaceList, etc.) - Implement network monitoring hooks + statistics wrapper (
GetNetworkStatistics,AddNetMonitorHookTagList) - Add missing spec functions (
ProcessIsServer,ObtainServerSocket, RoadshowData*) - Implement remaining Miami stubs (
MiamiSysCtl,MiamiGetHardwareLen,sockatmark) - Implement
RemoveInterface()entry point
The following items from the original to-do list have been completed:
| Item | Status Change |
|---|---|
| BPF (all 8 API functions + kernel engine) | � NOT IMPLEMENTED → ✅ IMPLEMENTED |
| Route management (all 5 API functions) | � NOT IMPLEMENTED → ✅ IMPLEMENTED |
| PF_ROUTE routing socket + RTM messages | � NOT IMPLEMENTED → ✅ IMPLEMENTED |
IPv6 socket options (ip6_ctloutput) |
� SILENT NO-OP → ✅ IMPLEMENTED (9 of 10 options) |
| IPv6 multicast (membership + MLD + delivery) | � NOT IMPLEMENTED → ✅ IMPLEMENTED (MLDv1 RFC 2710) |
| IPv6 ioctls (SIOCGIFADDR_IN6, etc.) | � NOT IMPLEMENTED → ✅ IMPLEMENTED |
| DNS Add/Remove/Obtain/Release | � NOT IMPLEMENTED → ✅ IMPLEMENTED (4 of 6 functions) |
QueryInterfaceTagList() |
� NOT IMPLEMENTED → ✅ IMPLEMENTED |
MiamiPFAddHook() / MiamiPFRemoveHook()
|
⚠� PARTIAL → ✅ IMPLEMENTED |
| Packet filter framework (pfil + ipfilter) | (not listed) → ✅ IMPLEMENTED |
| IP Filter / firewall engine + NAT | (not listed) → ✅ IMPLEMENTED |
| MLD (Multicast Listener Discovery) | � NOT IMPLEMENTED → ✅ IMPLEMENTED |
| DHCPv4 + DHCPv6 client | (not listed) → ✅ IMPLEMENTED |
| NDP / DAD / SLAAC / Router Discovery | (not listed) → ✅ IMPLEMENTED |
Original backlog of 10 items: 7 fully completed, 2 partially completed, 1 remaining (interface management).