plan9fox/sys/man
cinap_lenrek d2a7d88662 devip: implement network address translation routes
This adds a new route "t"-flag that enables network address translation,
replacing the source address (and local port) of a forwarded packet to
one of the outgoing interface.

The state for a translation is kept in a new Translation structure,
which contains two Iphash entries, so it can be inserted into the
per protocol 4-tuple hash table, requiering no extra lookups.

Translations have a low overhead (~200 bytes on amd64),
so we can have many of them. They get reused after 5 minutes
of inactivity or when the per protocol limit of 1000 entries
is reached (then the one with longest inactivity is reused).

The protocol needs to export a "forward" function that is responsible
for modifying the forwarded packet, and then handle translations in
its input function for iphash hits with Iphash.trans != 0.

This patch also fixes a few minor things found during development:

- Include the Iphash in the Conv structure, avoiding estra malloc
- Fix ttl exceeded check (ttl < 1 -> ttl <= 1)
- Router should not reply with ttl exceeded for multicast flows
- Extra checks for icmp advice to avoid protocol confusions.
2022-03-12 20:53:17 +00:00
..
1 gba: fix flash chip id for 128k and add setting 2022-02-10 00:35:13 +00:00
2 nusb: Fix handling of interface altsetting. 2022-02-21 19:50:16 +00:00
3 devip: implement network address translation routes 2022-03-12 20:53:17 +00:00
4 0intro(1), acme(1), con(1), rcpu(1), rio(1), namespace(4), authsrv(6), aan(8): cpu -> rcpu 2021-12-31 15:53:00 +00:00
5
6 0intro(1), acme(1), con(1), rcpu(1), rio(1), namespace(4), authsrv(6), aan(8): cpu -> rcpu 2021-12-31 15:53:00 +00:00
7 remove juke (use play or zuke instead) 2021-04-13 13:25:24 +02:00
8 ip/tftpd: add -m argument for name substitution using regular expressions 2022-02-05 01:34:22 +00:00
9 fix manpage references for dup(2), kproc(9) and panic(9). 2021-09-08 18:22:35 +00:00
fonts
index.html
mkfile manual: don't match nonexistent file while preprocessing 2021-06-27 00:13:58 +00:00
preface.html
preface3.html
preface4.html