AppleTalk (EtherTalk) proxy

README: add

+102
+13
LICENSE
··· 1 + Copyright (c) 2026 joshua stein <jcs@jcs.org> 2 + 3 + Permission to use, copy, modify, and distribute this software for any 4 + purpose with or without fee is hereby granted, provided that the above 5 + copyright notice and this permission notice appear in all copies. 6 + 7 + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+89
README.md
··· 1 + # atalk-proxy 2 + 3 + `atalk-proxy` listens for AppleTalk DDP (Datagram Delivery Protocol) and 4 + AARP (AppleTalk Address Resolution Protocol) traffic on two ethernet interfaces 5 + and proxies packets between them. 6 + 7 + There are other solutions for this such as 8 + [multitalk](https://github.com/sfiera/multitalk) 9 + but this one has a few features I needed: 10 + 11 + - It does not require kernel or libpcap support for AppleTalk, as is the 12 + situation on OpenBSD. Packets are found by looking for specific bytes in the 13 + header. 14 + 15 + - It drops privileges after opening listening sockets using 16 + [`pledge`](https://man.openbsd.org/pledge). 17 + 18 + - Bare AARP packets that appear on the wire without a Logical-Link Control 19 + header are given an LLC encapsulation before proxying. 20 + 21 + - AARP replies that are sent out from the local side (`-t`) are inspected and 22 + the MAC address of the sender is replaced with the MAC of the egress (`-e`) 23 + interface. 24 + This works as a 25 + "[proxy ARP](https://en.wikipedia.org/wiki/Proxy_ARP)" 26 + solution so other network devices know to send traffic to the device running 27 + the proxy to reach devices on the proxy's other interface, which is likely 28 + needed on Wi-Fi networks. 29 + 30 + ## Installation 31 + 32 + $ git clone https://github.com/jcs/atalk-proxy 33 + $ cd atalk-proxy 34 + $ make 35 + 36 + `atalk-proxy` was written on OpenBSD and has only been tested there. 37 + 38 + ## Usage 39 + 40 + When using an emulated Macintosh Plus in 41 + [pce](https://github.com/jcs/pce) 42 + on my laptop, configured with an emulated DaynaPort SCSI ethernet device, and 43 + configured to use EtherTalk for AppleTalk traffic, it sends packets out through 44 + a 45 + [`tap`](https://man.openbsd.org/tap) 46 + interface on my laptop. 47 + 48 + I then run `atalk-proxy` to proxy traffic between that `tap0` interface and my 49 + laptop's wireless `iwx0` interface. 50 + That usage for me looks like: 51 + 52 + $ doas ./atalk-proxy -e iwx0 -t tap0 53 + 54 + This enables the emulated device to communicate with other devices on my 55 + network using AppleTalk. 56 + 57 + The `-d` flag can be used to print debugging information where each forwarded 58 + packet is described. 59 + 60 + $ doas ./atalk-proxy -d -e iwx0 -t tap0 61 + [12:47:35.599] [iwx0] listening on egress using outbound MAC 00:d4:9e:x:x:x 62 + [12:47:35.599] [tap0] listening on tap 63 + [12:47:45.386] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 64 + [12:47:45.741] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 65 + [12:47:46.072] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 66 + [12:47:46.402] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 67 + [12:47:46.734] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 68 + [12:47:47.063] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 69 + [12:47:47.420] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 70 + [12:47:47.735] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 71 + [12:47:48.067] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 72 + [12:47:48.396] [tap0] [ 50] AARP: is there a 65512.1? [-> iwx0] 73 + [12:47:48.750] [tap0] [ 42] ZIP: GetNetInfo [-> iwx0] 74 + [12:47:49.566] [tap0] [ 42] ZIP: GetNetInfo [-> iwx0] 75 + [12:47:50.404] [tap0] [ 42] ZIP: GetNetInfo [-> iwx0] 76 + [12:47:51.270] [tap0] [ 67] NBP: lookup: "nanomac:Macintosh Plus@*" [-> iwx0] 77 + [12:47:52.324] [tap0] [ 67] NBP: lookup: "nanomac:Macintosh Plus@*" [-> iwx0] 78 + [12:47:53.231] [tap0] [ 67] NBP: lookup: "nanomac:Macintosh Plus@*" [-> iwx0] 79 + [12:47:57.418] [tap0] [ 56] NBP: lookup: "=:AFPServer@*" [-> iwx0] 80 + [12:47:57.580] [iwx0] [ 42] AARP: who has 57344.0? tell 256.12 [-> tap0] 81 + [12:47:57.610] [tap0] [ 50] AARP: 65512.12 is at 00:80:19:c0:c0:c0: replacing MAC in outbound AARP reply [-> iwx0] 82 + [12:47:57.612] [iwx0] [ 57] NBP: reply[1]: "fs:AFPServer@*" [-> tap0] 83 + [12:47:58.593] [tap0] [621] echo from 65512.1 to 65280.224 [-> iwx0] 84 + [12:47:58.596] [iwx0] [621] echo from 65280.224 to 65512.1 [-> tap0] 85 + [12:47:58.622] [tap0] [ 43] transaction protocol [-> iwx0] 86 + [12:47:58.628] [iwx0] [470] transaction protocol [-> tap0] 87 + [12:47:59.134] [tap0] [ 56] NBP: lookup: "=:AFPServer@*" [-> iwx0] 88 + [12:47:59.443] [iwx0] [ 57] NBP: reply[1]: "fs:AFPServer@*" [-> tap0] 89 + [12:48:00.337] [tap0] [ 43] transaction protocol [-> iwx0]