2019-09-25 04:57:05 +03:00
|
|
|
:: This needs a better SDN solution. Every ship should have an IP
|
|
|
|
:: address, and we should eventually test changing those IP
|
|
|
|
:: addresses.
|
|
|
|
::
|
|
|
|
:: For now, we broadcast every packet to every ship and rely on them
|
|
|
|
:: to drop them.
|
|
|
|
::
|
2019-11-10 10:27:07 +03:00
|
|
|
/- aquarium, spider
|
2019-11-16 14:25:30 +03:00
|
|
|
/+ aqua-vane-thread
|
2019-09-25 04:57:05 +03:00
|
|
|
=, aquarium
|
|
|
|
|%
|
|
|
|
++ emit-aqua-events
|
|
|
|
|= [our=ship aes=(list aqua-event)]
|
2019-11-19 07:36:21 +03:00
|
|
|
^- (list card:agent:gall)
|
2019-09-25 04:57:05 +03:00
|
|
|
[%pass /aqua-events %agent [our %aqua] %poke %aqua-events !>(aes)]~
|
|
|
|
::
|
|
|
|
++ handle-restore
|
|
|
|
|= [our=ship who=@p]
|
2019-11-20 00:40:05 +03:00
|
|
|
^- (list card:agent:gall)
|
2019-09-25 04:57:05 +03:00
|
|
|
%+ emit-aqua-events our
|
2021-06-17 09:53:49 +03:00
|
|
|
[%event who [/a/newt/0v1n.2m9vh %born ~]]~
|
2019-09-25 04:57:05 +03:00
|
|
|
::
|
|
|
|
++ handle-send
|
2022-04-20 01:12:32 +03:00
|
|
|
=, ames
|
|
|
|
|= [our=ship now=@da sndr=@p way=wire %send lan=lane pac=@]
|
2019-11-20 00:40:05 +03:00
|
|
|
^- (list card:agent:gall)
|
2019-11-20 00:03:07 +03:00
|
|
|
=/ rcvr=ship (lane-to-ship lan)
|
|
|
|
=/ hear-lane (ship-to-lane sndr)
|
2023-05-04 15:25:29 +03:00
|
|
|
=/ =shot (sift-shot pac)
|
2023-04-28 14:58:14 +03:00
|
|
|
?: &(!sam.shot req.shot) :: is fine request
|
2023-05-04 15:25:29 +03:00
|
|
|
=/ [%0 =peep] (sift-wail `@ux`content.shot)
|
2022-04-20 01:12:32 +03:00
|
|
|
%+ emit-aqua-events our
|
2023-05-04 15:25:29 +03:00
|
|
|
:_ ~
|
|
|
|
:- %read
|
|
|
|
[[[rcvr rcvr-tick.shot] path.peep] [hear-lane sndr-tick.shot] num.peep]
|
2019-09-25 04:57:05 +03:00
|
|
|
%+ emit-aqua-events our
|
2021-06-17 09:53:49 +03:00
|
|
|
[%event rcvr /a/newt/0v1n.2m9vh %hear hear-lane pac]~
|
2019-11-20 00:03:07 +03:00
|
|
|
:: +lane-to-ship: decode a ship from an aqua lane
|
|
|
|
::
|
2020-12-01 17:59:07 +03:00
|
|
|
:: Special-case one comet, since its address doesn't fit into a lane.
|
|
|
|
::
|
2019-11-20 00:03:07 +03:00
|
|
|
++ lane-to-ship
|
|
|
|
|= =lane:ames
|
|
|
|
^- ship
|
|
|
|
::
|
|
|
|
?- -.lane
|
|
|
|
%& p.lane
|
2020-12-01 17:59:07 +03:00
|
|
|
%| =/ s `ship``@`p.lane
|
|
|
|
?. =(s 0xdead.beef.cafe)
|
|
|
|
s
|
|
|
|
~bosrym-podwyl-magnes-dacrys--pander-hablep-masrym-marbud
|
2019-11-20 00:03:07 +03:00
|
|
|
==
|
|
|
|
:: +ship-to-lane: encode a lane to look like it came from .ship
|
|
|
|
::
|
|
|
|
:: Never shows up as a galaxy, because Vere wouldn't know that either.
|
2020-12-01 17:59:07 +03:00
|
|
|
:: Special-case one comet, since its address doesn't fit into a lane.
|
2019-11-20 00:03:07 +03:00
|
|
|
::
|
|
|
|
++ ship-to-lane
|
|
|
|
|= =ship
|
|
|
|
^- lane:ames
|
2020-12-01 17:59:07 +03:00
|
|
|
:- %|
|
|
|
|
^- address:ames ^- @
|
|
|
|
?. =(ship ~bosrym-podwyl-magnes-dacrys--pander-hablep-masrym-marbud)
|
|
|
|
ship
|
|
|
|
0xdead.beef.cafe
|
2019-09-25 04:57:05 +03:00
|
|
|
--
|
|
|
|
::
|
2019-12-04 10:53:42 +03:00
|
|
|
%+ aqua-vane-thread ~[%restore %send]
|
2019-11-10 10:27:07 +03:00
|
|
|
|_ =bowl:spider
|
2019-09-25 04:57:05 +03:00
|
|
|
+* this .
|
|
|
|
++ handle-unix-effect
|
|
|
|
|= [who=@p ue=unix-effect]
|
2019-11-19 07:36:21 +03:00
|
|
|
^- (quip card:agent:gall _this)
|
2019-11-20 00:40:05 +03:00
|
|
|
=/ cards
|
|
|
|
?+ -.q.ue ~
|
2019-09-25 04:57:05 +03:00
|
|
|
%restore (handle-restore our.bowl who)
|
2019-11-20 00:03:07 +03:00
|
|
|
%send (handle-send our.bowl now.bowl who ue)
|
2019-09-25 04:57:05 +03:00
|
|
|
==
|
|
|
|
[cards this]
|
|
|
|
::
|
2022-05-15 08:49:10 +03:00
|
|
|
++ handle-arvo-response |=(* !!)
|
2019-09-25 04:57:05 +03:00
|
|
|
--
|