Base vmnet support covers bridged network interfaces and locally
accessible TAP network connections. These reflect the vmnet bridged
and host behaviors which are leveraged under the covers, but configured
using the original sim_ether commands. The resulting bridged case
behaves like the Windows network connections do (with direct access
to and from the local LAN as well as the host system) using the natural
interface name. NAT behaviors are specifically supported using the
original SLiRP code since the vmnet support depends on simulators
primarily getting IPv4 addressing via DHCP, but essentially no simh
simulators actually had OS network code which used DHCP and all
merely used static network address setup. The vmnet (shared/NAT)
support can't be configured to operate with the same DHCP and static
IP addresses provided by the original SLiRP implementation and to
avoid the need to specifically change hard coded simulator IPv4
addresses before things could work.
- Detect which network interfaces are WiFi (when possible) and thus
not useful candidates for bridging.
- Cleanly report when running as root is needed.
- Avoid allowing network connections to interfaces which aren't
actually connected to a network.
- Add support to explicitly set TAP network host side network
interface's IPv4 address and netmask. This optional support is
provided specifically for the Apple vmnet case, but not for other
platforms using TAP network connections due to the various ways
that must be handled with external commands.
- Add host system's IPv4 address, netmask, media type and connection
state to interface descriptions visible via SHOW ETHERNET.
Some system environments may have a significant number of potential
network interfaces, most of which aren't interesting to connect
simulators to. Knowing which interfaces are actually in useful
states helps users select the correct device.
The vmnet aspect of this functionality was originally inspired by
Calvin Buckley's pull request to the open-simh repository. That
solution wouldn't actually operate well certainly for NAT cases due
to the forced DHCP to non-configurable address blocks and the lack
of any way to support static addresses TCP or UDP port mapping.
Some host systems come with the libpcap shared object installed. If that
is the case, since the default build behavior is to dynamically load libpcap,
builds can now potentially avoid a forced install of the libpcap-devel package.
- Make sure that asynchronous mode can't be changed if devices using
sim_ether are already attached.
- Add missing DEV_ETHER type flag for the only sim_ether using device
that didn't already have it.
- Add common system includes used in may places which are allowed
and thus added directly in sim_defs.h.
- Separate completely private system data structures and system APIs
for use only by SCP library routines into sim_scp_private.h.
This adds support for the "framer" device, which is a USB-connected
device built around a Raspberry Pico that connects to a synchronous
line, either RS-232 or DEC "integral modem" coax connection. It
implements the framing portion of DDCMP: clock recovery for the
integral modem case, byte sync, and DDCMP frame handling including
CRC. The actual DDCMP protocol state machine, with its handling of
sequencing, timeout and retransmit, etc. is left to the host
software. All the design files for the framer may be found at
https://github.com/pkoning2/ddcmp .
This commit adds code to drive the framer from the TMXR library,
allowing it to be used either from simulated DMC-11 or simulated
DUP-11 devices. Both have been tested, using RSTS/E, RSX-11/M+, and
TOPS-20.
Fixed the one-digit limit on eth<n> device names, the limit is now 2.
Add optional enabling of broadcast address to hash based filter model.
LANCE based devices which use its AUTODIN II based hash generally
match the broadcast address independent of the contents of the
multicast hash.
This change to XQ mostly undoes the prior change to pdp11_xq and
brings the functionality into sim_ether so that it is generally available
for future ethernet devices.
Some dependent packages on some platforms may also define HAVE_DLOPEN
and that definition may have different syntax or semantics. This change
avoids the potential symbol conflict.
As reported in #1098
Historically on *nix platforms ifconfig was used to find the host system's
interface MAC address. This isn't always available on all systems since
it's being replaced by the ip command. We now only invoke commands
that exist.
- Recent Linux versions don't install ifconfig by default and now use
the new ip command for network details.
- Avoid writing command results to a temp file and use popen instead.
Most were noise and non-issues, but the change from fclose() to
pclose() was absolutely needed.
A false positive remains regarding tun variable going out of scope.
Under the conditions where a resource leak could occur, the tun
variable is saved in *fd_handle and thus not leaked.