Commit graph

8 commits

Author SHA1 Message Date
bunnie
e096384f66 foramt services/dns 2024-01-14 22:08:14 +08:00
bunnie
430d3550b7 move time services into the DNS crate
Time services are moved into the DNS crate so that the EC
update thread can remain running and consuming resources.

The problem is that we are out of connections in the connection table
(it's limited to 32 total), and in order to allow a "force update"
function for the EC we need to hold on to more connections than
are possible.

The "time" service is fairly self contained and could be moved
elsewhere. It sort of logically fit in the status crate initially
because the status crate manages preferences and displays the
current time on the screen, but it's modular enough that we could
put the service in any process space, at a minor trade-off of
the time UX function being public. This was avoided for a long
time because it could be a security risk but in the end the records
that store time zone and offsets are in the PDDB, which are accessible
to anyone who knows the names of these records, which is in the end
equivalent to knowing the name of the time UX server.

Thus the time UX server was made a dynamically registered "public"
server with just one connection (so only a minor downgrade in security,
the only vector exists in between boot and when the time servers
connect up), and the time server itself was slotted into the DNS
server's process space.

The DNS server was chosen because the DNS service itself is
very lightweight and will be unlikely to grow any heavier, so there
is little risk in merging the time service into the DNS crate's
process connection allocation.
2023-04-08 00:30:07 +08:00
bunnie
b4c98528e8 add notes around names that are baked into libstd 2022-03-22 22:30:43 +08:00
Sean Cross
331a0a120d services: dns: add RawLookup opcode
This lookup will be used by libstd in order to perform DNS queries.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-17 11:29:35 +08:00
Sean Cross
d87a946bd9 services: dns: run rustfmt on project
Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-17 11:25:23 +08:00
bunnie
0dbf1661cb add TCP to hosted mode emulation
Total bodge -- we lop off the TCP stack at the Xous API level, and
substitute it with a native host TCP stack.

Caveat hacker: this means that a lot of OS-specific net properties
will carry through to the hosted mode emulation. This is adequate
for "smoke testing" a build but do not be shocked, *shocked* if
there are more bugs to be found because of some weird host integration
issue.
2022-02-20 21:31:32 +08:00
bunnie
cee4e83746 add a DNS parser. that was fun. :-|
yes, i know there is some fancy way to code this with iterators.
i don't like that way. this ways is easier for me to understand
and verify. It works now.

Sometimes, Rust sucks a bit. It's ok, you can cry.
2021-10-20 20:06:08 +08:00
bunnie
643e9a7d62 dns. needs more work, but it is at least minimally functional. 2021-10-20 05:18:54 +08:00