Showing that IPv4 and IPv6 addresses and connections work in Pyromaniac

by gerph
macOS ◆ xterm-256color ◆ fish 786 views

Pyromaniac has support for both IPv4 and IPv6 (AF_INET and AF_INET6) TCP and UDP socket connections. This is one of the first intentional IPv6 tests with a RISC OS program. The supplied EasySocket module already supported IPv6, because it bypassed the Internet module, which unintentionally gave it support for resolving names to IPv4 or IPv6 addresses and connecting without bothering the user.

IPv6 addresses can be listed with an updated ifconfig tool, although at the present time only a single IPv6 address is listed. The hardware addresses are actually handled by an AF_LINK socket SIOCGIFADDR call, rather than by accessing the exported structures from Socket_InternalLookup, as the kvm access given by the latter is very ugly and difficult to maintain when upgrading (plus harder to implement, if you’re not actually using a BSD stack).

HTTP requests are made with a test binary. The addresses are currently hardcoded into the test binary - Resolver has yet to be updated to provide resolution of the IPv6 addresses - for both the IPv4 and IPv6 addresses of gerph.org. The output here has debug enabled, as that means that we include the Internet module’s printing of the IP address, port, flowinfo and scopeid as it decoded them from the sockaddr_in6 block.