FYI, I'm writing this as someone experienced with Linux IP routing, but only superficially familiar with AMPRNet.
All of the routing appears to happen through ordinary Linux facilities which can be inspected and modified with
ip. AMPRNet appears to broadcast route advertisements to a multicast address, and this RIP44 daemon receives them and then runs
ip to configure the kernel with the routes it discovers.
The lua script begins by configuring a rule to route traffic to
LOCAL_SUBNET to the
main routing table:
os.execute("ip rule add to " .. LOCAL_SUBNET .. " table main priority 20")
main table is the route table Linux uses ordinarily, but it does so by a default rule which has a low priority. The script just adds a higher priority rule which does the same thing only for your local subnet.
Then, it adds a slightly lower priority rule to send everything else to a routing table called
os.execute("ip rule add from " .. LOCAL_SUBNET .. " table " .. ROUTING_TABLE .. " priority 25")
The lua script adds routes to this other routing table (
ROUTING_TABLE) according to the RIP44 multicasts it receives in the
process_route() function. The most relevant line is 78:
os.execute("ip route replace " .. prefix .. " via " .. gateway .. " onlink dev tunl0 table " .. ROUTING_TABLE)
gateway are values the daemon received from a RIP44 multicast.
onlink dev tunl0 is the part that makes the AMPRNet traffic use the ipip tunnel. The option is described by ip-route(7) as:
onlink pretend that the nexthop is directly attached to this link, even if it does not match any interface prefix.
table option tells
ip route to add this rule to this table containing only AMPRNet routes rather than the default
Because these routes are not in the
main table you will not see them with
ip route show unless you ask to see the table specifically with
ip route show table ROUTING_TABLE (replacing
ROUTING_TABLE with the value configured in rip44.conf) or all the route tables with
ip route show table all.