Two sigil-os commits close the browser→OS network path for plain HTTP. os_dns.sg provides a minimal RFC 1035 DNS A-record resolver; os_net_handler.sg provides the IPC ring that bridges renderer NET_REQUEST messages to http_fetch and writes NET_RESPONSE back. Together, these two modules complete the end-to-end pipeline: browser tab → cap-isolated renderer → OS IPC → http_fetch → DNS → socket → response → renderer → page. Both PASS 5/5 on QEMU raspi3b.
a4e34eb — os_dns.sg (RFC 1035 DNS A-record resolver)
dns_encode_label()
Encodes a domain name into RFC 1035 wire format — splits on
., writes each label as {length, bytes}, terminates with \x00.dns_build_query()
Builds a complete DNS UDP query packet: transaction ID + flags + QDCOUNT=1 + QNAME + QTYPE=A + QCLASS=IN.
dns_parse_response()
Parses a DNS UDP response — scans for the Answer section; handles compression pointers (
0xC0 prefix) by following the offset; extracts the first A-record IPv4 address into a_record_out.dns_resolve()
Full resolver — builds query, sends via UDP to
DNS_NS:53 (default 8.8.8.8, read from DNS_NS constant), reads response, calls dns_parse_response. DNS_BASE 0xB40000. 5/5 tests PASS (label encode, query build, response parse w/ compression, pointer follow, full resolve).81920af — os_net_handler.sg (browser IPC → http_fetch bridge)
NET_REQUEST dispatch
IPC ring at NH_BASE
0xB30000. Reads NET_REQUEST from the IPC ring — fields: method (GET/POST), url (absolute URL string), headers (raw header block). Calls http_fetch(method, url, headers) — the existing Cap<NetConn> HTTP/1.1 client.NET_RESPONSE write-back
Writes
NET_RESPONSE back to the IPC ring — fields: status (HTTP status code), body_bytes (response body byte count). The renderer (running at EL0, cap-isolated) sends NET_REQUEST to the OS kernel (EL1) via this ring; the OS performs the actual network I/O and returns the response. 5/5 tests PASS (GET request dispatch, POST dispatch, response status write, response bytes write, IPC ring round-trip) on QEMU raspi3b.Browser→OS network path closed for plain HTTP. The cap-isolated renderer can now fetch URLs — tab → EL0 renderer → OS IPC → http_fetch → DNS → socket → response → renderer.