From f0bd88195bcb210b60a248c746b7d19031e8a4bc Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 2 Jan 2019 21:49:38 -0500 Subject: [PATCH] bsd tuntap documentation. --- src/rawnet/Networking.txt | 35 +++++++++++++++++++++++++++++++++++ src/rawnet/rawnetarch_tap.c | 14 ++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/rawnet/Networking.txt diff --git a/src/rawnet/Networking.txt b/src/rawnet/Networking.txt new file mode 100644 index 0000000..084797c --- /dev/null +++ b/src/rawnet/Networking.txt @@ -0,0 +1,35 @@ +Networking +---------- + +GS+ can emulate an Uthernet (the original) card in slot 3. Marinetti is supported with the Uthernet Link Layer. Version 1.0.2 or newer is recommended. + +Configuration: + +In the settings menu, select Ethernet Card Configuration. + +Make sure Uthernet Card in Slot 3 is set to On. + +Select the Interface menu to choose the selected interface from a menu. + +Win32: + +Ethernet support uses Winpcap or its modern successor, npcap. You need to install them. + +Winpcap/npcap require a hardwired ethernet connection in promiscuous mode -- they work by tapping into the ethernet stream. + +Interface names are not particularly meaningful. Sorry. Run `getmac /v` from cmd.exe to get a human friendly name for the interface device. + +In marinetti, hardcode the ip address, gateway, and dns servers. + +OS X: + +Ethernet support uses the vmnet framework. This provides a virtual ethernet device, dhcp server, and dns server, all bridged to the Macintosh's network. + +Unfortunately, vmnet requires root permissions or a codesigning entitlment which may only valid for applications through the Mac App Store. + +In marinetti, use DHCP. + +Linux: + +Ethernet support uses the tap ethernet device. This require setting up the device and bridging it to your local network. + diff --git a/src/rawnet/rawnetarch_tap.c b/src/rawnet/rawnetarch_tap.c index b7d099f..940a74f 100644 --- a/src/rawnet/rawnetarch_tap.c +++ b/src/rawnet/rawnetarch_tap.c @@ -30,6 +30,20 @@ * 5. and add the ip address to the bridge * dhclient br0 # if using dhcp * ip address add 192.168.1.1/24 dev eth0 # if using static ip address. + * + * *BSD: + * - assumes eth0 is your main interface device. + * $ ifconfig bridge0 create + * $ ifconfig tap65816 create + * $ ifconfig bridge0 addm eth0 addm tap65816 up + * + * allow normal users to open tap devices? + * $ sysctl net.link.tap.user_open=1 + * $ sysctl net.link.tap.up_on_open=1 + * + * set permissions + * $ chown YOUR_USER_NAME /dev/tap65816 + * $ chmod 660 /dev/tap65816 */