Avoid permanent network network hangs when a network transport starts to return errors for various reasons.
These hangs also result in at least one thread in a CPU bound loop attempting to read on a pcap connection which will never be useful again.
When transmit or receive errors occur, the invoking thread sleeps for 1 second and subsequent operations proceed. When the total of read + write errors reaches a multiple of ETH_ERROR_REOPEN_THRESHOLD the current transport connection (usually pcap) is closed and re-opened after a ETH_ERROR_REOPEN_PAUSE second delay. If the open succeeds, we're happy. If it fails, then the link behaves as if it were never attached until some subsequent operator intervention is performed.
Activities which are known to induce this problems include (but are not limited to) when a simulator is running in a Windows Virtual Machine on a Hyper-V host system and the Hyper-V host system performs a SAVE and a subsequent Restart of the Guest Windows Virtual Machine. This operation can occur due to specific operator requests or merely when the Hyper-V host system reboots.
Migrated the XQ help to the hierarchical help model. This is a work in progress which will eventually merge much from 0readme_ethernet.txt into the device help.
Some of this behavior was previously available in the pdp11_xq simulation for the DELQA device variants, but not the DEQNA. This adds the behavior for all ethernet devices.
The helps to avoid MAC address conflicts since the Ethernet physical address is completely user settable, and starts with a static value. Multiple simulators on the same LAN will have conflicting addresses if they don't specifically set unique values.
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.
Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
- Avoid assignments of void * values. Cast all memory allocation return values to appropriate types.
- Add output to sim_log where missing in various places.
- Fixed issue with lost file positions after a restore for devices which leverage the UNIT_SEQ flag.
- Added event debug support to scp and the vax simulator
- Moved external declarations into include files related to modules which define them and removed random externs from modules which referenced them
- Fixed typos in sim_ether
- Fixed sim_disk and sim_tape to properly manage asynchronous threads on an i/o flush
pdp11_xq.c, pdp11_xq.h
- Added emulation and visibility to the LEDs which were on the physical DEQNA/DELQA network boards. "show xq: will now display the LED state in addition to the other useful things.
- Added debugging of loopback packet data
- Avoided padding on short loopback packets
- Added support for extended length loopback packets (up to 1600 bytes) which is described in the DEQNA manual and used by the MicroVAX I boot ROM. Recieve such packets with the LONG error indicator.
- Returned 'reserved' status bits as 1's in received packet status word 1.
- Added debug display of transmit and receive Buffer Descriptor List contents.
sim_ether.c, sim_ether.h
- Added support for extended/oversized packets.
Fixed Ethernet formatting of open device names
Fixed serial generic naming to accomodate for the fact that an OS list of serial devices might not include devices which are already opened.
Fixed OS/X build issues from Tony Nickolson
Fixed OS/X tap networking startup
Added cygwin host NIC hardware address determination
Made *nix host NIC hardware address determination more robust
VMS engineers designed the address conflict strategy when essentially all LANs were single collision domains (i.e. ALL nodes which might be affected by an address conflict were physically present on a single Ethernet cable which might have been extended by a couple of repeaters). Since that time, essentially no networks are single collision domains. Thick and thinwire Ethernet cables don’t exist and very few networks even have hubs. Today, essentially all LANs are deployed using one or more layers of network switches. In a switched LAN environment, the switches on the LAN ‘learn’ which ports on the LAN source traffic from which MAC addresses and then forward traffic destined for particular MAC address to the appropriate ports. If a particular MAC address is already in use somewhere on the LAN, then the switches ‘know’ where it is. The host based test using the loopback protocol is poorly designed to detect this condition. This test is performed by the host first changing the device’s Physical MAC address to the address which is to be tested, and then sending a loopback packet FROM AND TO this MAC address with a loopback reply to be sent by a system which may be currently using the MAC address. If no reply is received, then the MAC address is presumed to be unused. The sending of this packet will result in its delivery to the right system since the switch port/MAC address tables know where to deliver packets destined to this MAC address, however the response it generates won’t be delivered to the system performing the test since the switches on the LAN won’t know about the local port being the right target for packets with this MAC address. A better test design to detect these conflicts would be for the testing system to send a loopback packet FROM the current physical MAC address (BEFORE changing it) TO the MAC address being tested with the loopback response coming to the current physical MAC address of the device. If a response is received, then the address is in use and the attempt to change the device’s MAC address should fail. Since we can’t change the software running in these simulators to implement this better conflict detection approach, we can still ‘do the right thing’ in the sim_ether layer. We’re already handling the loopback test packets specially since we always had to avoid receiving the packets which were being sent, but needed to allow for the incoming loopback packets to be properly dealt with. We can extend this current special handling to change outgoing ‘loopback to self’ packets to have source AND loopback destination addresses in the packets to be the host NIC’s physical address. The switch network will already know the correct MAC/port relationship for the host NIC’s physical address, so loopback response packets will be delivered as needed.
Fixed device name compare in eth_getname_byname to compare the whole name
Removed unused num field in eth_list structure
Extended the number of devices supported since some platforms may have many libpcap accessable devices but only a few basic Ethernet ones