Commit graph

331 commits

Author SHA1 Message Date
Mark Pizzolato
a3973f0e8c Merge branch 'master' into Extra-VAXen 2012-02-28 17:58:44 -08:00
Mark Pizzolato
9386369bd5 Made dynamic libreadline loading more robust for some systems 2012-02-28 17:56:41 -08:00
Mark Pizzolato
4f6ad32395 Fixed MAC Address Conflict detection support.
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.
2012-02-28 14:10:08 -08:00
Mark Pizzolato
4ab52659be Provided Console Control Event explanation as comments in the sim_console code. 2012-02-28 14:02:49 -08:00
Mark Pizzolato
4ce92b4f38 Fixed overrun bug in eth_devices.
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
2012-02-28 13:31:46 -08:00
Mark Pizzolato
d9e4afe64c Fixed internal loopback packet processing. We should only respond to loopback packets addressed to the physical MAC address OR the Broadcast address OR a Multicast address we're listening to (we may receive other loopback packets if we're in promiscuous mode but we should not respond to them). 2012-02-28 12:09:05 -08:00
Mark Pizzolato
cf49864327 More robust detection of file transfer/conversion errors in ROM/boot code 2012-02-26 12:38:07 -08:00
Mark Pizzolato
f09637186d Change default makefile behavior to prefer OS provided libpcap components over www.tcpdump.org components and to suggest that the build should be done with the OS libpcap-dev package. 2012-02-26 10:13:20 -08:00
Mark Pizzolato
153e905339 Added checking to detect unexpected file sizes for ROM image files.
This can happen if the file was transferred or unpacked incorrectly and in the process tried to convert line endings rather than passing the file's contents unmodified.
2012-02-25 08:56:25 -08:00
Mark Pizzolato
4838d1f7dd Align VHD disk data blocks for optimal performance when a VHD resides on storage with 4K sector size. 2012-02-25 08:45:52 -08:00
Mark Pizzolato
98e343f43f Fixed call to pcap_lookupnet to actually use the device name as the argument. 2012-02-17 16:33:06 -08:00
Mark Pizzolato
f2b583759a Clarified operational requirements for SIM_ASYNCH_IO on Windows 2012-02-06 10:03:09 -08:00
Mark Pizzolato
76f68d7b5e Finished merge of recent changes into VAX730 specific modules 2012-02-02 08:31:03 -08:00
Mark Pizzolato
30ef557968 Merge remote-tracking branch 'origin/master' into Extra-VAXen 2012-02-02 08:24:09 -08:00
Mark Pizzolato
d8b900ea8d Make sure that saved VAX clock state is stored in a host platform independent way. 2012-02-02 07:32:38 -08:00
Mark Pizzolato
5efd8fe1b5 Fixed bug in save command. The issue is that attached units which are buffered in memory should also be flushed to storage as part of the save operation to make all the components of the save 'snapshot' consistent. 2012-02-02 07:30:40 -08:00
Mark Pizzolato
9b5750f6a8 Fixed error path issue when RAW disk operations are active (found by Sergey Oboguev) 2012-02-01 20:01:46 -08:00
Mark Pizzolato
c2d50b503e Fixed error path issues found by Sergey Oboguev 2012-02-01 19:59:24 -08:00
Mark Pizzolato
e1d1893834 Fixed concurrent write issue (discovered by Sergey Oboguev) which may happen if SIM_ASYNC_IO is enabled 2012-02-01 19:58:55 -08:00
Mark Pizzolato
88076c4b1b Added check for required build dependencies in the Visual Studio Projects to provide advise when needed. 2012-01-31 05:45:33 -08:00
Mark Pizzolato
db5cdc1e6c Merged additional functionality from master branch into Extra-VAXen unique files. 2012-01-27 05:18:38 -08:00
Mark Pizzolato
c2e6a832e8 Merge remote-tracking branch 'origin/master' into Extra-VAXen 2012-01-27 05:03:52 -08:00
Mark Pizzolato
d690603045 Updated Windows Network build (in makefile and Visual Studio Projects) to reference WinPcap and pthreads in a consistent parallel directory to the simulator source (i.e. ../windows-build/...).
Updated Ethernet Documentation (in 0readme_ethernet.txt and sim_ether.c) to describe the proper build mechanics on both Windows and *nix platforms.
2012-01-27 05:00:46 -08:00
Mark Pizzolato
214b1b6047 Fix Linux build to support Debian Squeeze by a non-root user 2012-01-24 19:55:04 -08:00
Mark Pizzolato
94e1975539 Avoid compiler warnings when time_t is 64 bits. 2012-01-24 13:45:27 -08:00
Mark Pizzolato
7a558a4e63 Added support for Logical End of Tape (EOT) detection when required 2012-01-24 10:12:26 -08:00
Mark Pizzolato
3e8b43b4c6 Added description of all the required linux packages to perform a proper build 2012-01-24 10:02:13 -08:00
Mark Pizzolato
aa7c50eb38 Compiler cleanup for issues noticed during x64 compiles 2012-01-17 04:09:34 -08:00
Mark Pizzolato
01337fe114 Fixed tape I/O which didn't work when Asynch I/O was dynamically disabled by scp command 'set noasync' 2012-01-14 06:26:59 -08:00
Mark Pizzolato
d4c83e5f46 Make sure that the correct struct timespec definition (which the pthreads APIs will need) is known before we define our own. 2012-01-13 15:32:51 -08:00
Mark Pizzolato
6b6d7cccac Refined description of Asynch I/O build support. 2012-01-13 15:23:53 -08:00
Mark Pizzolato
3172e743ee Normalized the saved format of the optional VAX TODR persistent file so that it may be moved around from one platform to another along with other simulator state files (disk & tape images, save/restore files, etc.). 2012-01-13 10:51:26 -08:00
Mark Pizzolato
3443839ba7 Fixed disk I/O which didn't work when Asynch I/O was dynamically disabled by scp command 'set noasync' 2012-01-13 02:32:28 -08:00
Mark Pizzolato
369541731b Change 730 windows build to ignore deprecated POSIX APIs. 2012-01-11 14:59:48 -08:00
Mark Pizzolato
5263a9e906 Added a sanity check to validate the modify time of the simulator image being restored by the 'restore' command with respect to the modify times of any files which are attached during the restore operation.
The logic here is based on the idea that a restore image contains the memory content for a running simulator, while the attached files contain the disk contents for that simulator.  If the disk contents have changed since the memory image was created then the two data sets are likely out of sync and disk details cached in memory (i.e. file system information, storage allocation, etc.) will likely result in corrupted disk structures if they are used.

The default behavior is to fail the restore operation if these inconsistencies are noticed.  This sanity check can be overridden if the restore command is invoked with the '-F' switch:  sim> restore -F simulator-state.file

Also added logging of all erro messages produced during a restore operation to both stdout and a simulator log file if it is being used.
2012-01-11 10:58:00 -08:00
Mark Pizzolato
6079add9e7 make output of 'show show' command consistent with other help output (lowercase primary commands). 2012-01-10 20:18:12 -08:00
Mark Pizzolato
d14853e14a Fixed build when using a libpcap from www.tcpdump.org 2012-01-10 20:14:09 -08:00
Mark Pizzolato
8db25247ba Declare the VAX730 as a non-Qbus system 2012-01-09 03:27:58 -08:00
Mark Pizzolato
7a8a6e828e Merge branch 'master' into Extra-VAXen 2012-01-02 12:03:07 -08:00
Mark Pizzolato
e143a06e8f Revert RQ and TQ to BR5. These devices (on Unibus Systems) are really BR5. 2011-12-26 05:48:28 -08:00
Mark Pizzolato
754c31b0ec Merge branch 'master' into Extra-VAXen 2011-12-18 19:53:19 -08:00
Mark Pizzolato
93f09d3253 Fixed interrupts to treat all Qbus devices as BR4. Changed RQ and TQ to BR4 to reflect real hardware (for the Unibus case). 2011-12-17 10:04:53 -08:00
Mark Pizzolato
de9facf9cc Added echo/log output of the results of a goto command to make it easier to read what happened in a simulator log file. Also flushed log files when starting instruction execution. 2011-12-17 08:36:11 -08:00
Mark Pizzolato
754934bb6b Added SIM_NAME as an environment variable while a simulator is executing. This can then be used by "do" scripts and/or in the context of host shell commands invoked with "!". 2011-12-17 08:32:39 -08:00
Mark Pizzolato
01369c13da Added sim_ttisatty to support reasonable behaviour (i.e. avoid in infinite loop) in the main command input loop when EOF is detected and input is coming from a file (or a null device: /dev/null or NUL:) This may happen when a simulator is running in a background process. 2011-12-07 10:01:07 -08:00
Mark Pizzolato
de5997608d Added missing command argument substitution for command lines read directly from stdin. Also, added new "set environment name=val" command which is potentially useful for scripting. 2011-12-01 10:00:14 -08:00
Mark Pizzolato
421fce7798 Added missing implementation of "set nobreak". The help set showed this as valid, but it wasn't defined. 2011-11-30 02:56:19 -08:00
Mark Pizzolato
cbcd244e0c Fix builds on BSD host systems 2011-11-26 08:21:45 -08:00
Mark Pizzolato
d9f3b66bbf Fixed line endings to be consistent in dynamically loaded pcap_fileno implementation 2011-11-26 06:42:13 -08:00
Mark Pizzolato
cc890aec1c Fixes bugs in multiply and divide introduced in 3.8-1; fixes XR and double precision bugs (from Adrian Wise) 2011-11-26 06:31:07 -08:00