--- trunk/doc/technical.html 2007/10/08 16:18:00 4 +++ trunk/doc/technical.html 2007/10/08 16:18:11 6 @@ -13,7 +13,7 @@ +

The gateway machine, which is the only "other" machine that the emulated OS sees on its emulated network, works as a NAT-style firewall/gateway. It -has a fixed IPv4 address of 10.0.0.254. An OS running in the emulator -can thus have any 10.x.x.x address; a typical choice would be 10.0.0.1. +usually has a fixed IPv4 address of 10.0.0.254. An OS running in +the emulator would usually have an address of the form 10.x.x.x; +a typical choice would be 10.0.0.1.

-Inside emulated NetBSD or OpenBSD, running the following commands should -configure the emulated NIC: +Inside emulated NetBSD/pmax or OpenBSD/pmax, running the following +commands should configure the emulated NIC:

 	# ifconfig le0 10.0.0.1
 	# route add default 10.0.0.254
 	add net default: gateway 10.0.0.254
 
+

If you want nameserver lookups to work, you need a valid /etc/resolv.conf as well:

 	# echo nameserver 129.16.1.3 > /etc/resolv.conf
 
-(But replace 129.16.1.3 with the actual real-world IP address of your -nearest nameserver.) +(But replace 129.16.1.3 with the actual real-world IP address of +your nearest nameserver.) +

Now, host lookups should work:

@@ -309,33 +324,20 @@
 	uucp-gw-2.pa.dec.com	172799 IN	A	204.123.2.19
 
-To transfer files via UDP, you can use the tftp program. - -
-	# tftp 12.34.56.78
-	tftp> get filename
-	Received XXXXXX bytes in X.X seconds
-	tftp> quit
-	# 
-
- -or, to do it non-interactively (with ugly output): - -
-	# echo get filename | tftp 12.34.56.78
-	tftp> Received XXXXXX bytes in X.X seconds
-	tftp> #
-
+

+At this point, UDP and TCP should (mostly) work. -This, of course, requires that you have put the file filename in -the root directory of the tftp server (12.34.56.78). +

+Here is an example of how to configure a server machine and an emulated +client machine for sharing files via NFS:

-It is also possible to run NFS via UDP. This is very useful if you want to -share entire directory trees between the emulated environment and another -machine. These instruction will work for FreeBSD, if you are running -something else, use your imagination to modify them: +(This is very useful if you want to share entire directory trees +between the emulated environment and another machine. These instruction +will work for FreeBSD, if you are running something else, use your +imagination to modify them.) +

-The return value of the access function has until 20040702 been a +The return value of the access function has until 2004-07-02 been a true/false value; 1 for success, or 0 for device access failure. A device access failure (on MIPS) will result in a DBE exception. @@ -512,7 +510,7 @@

To be compatible with pre-20040702 devices, a return value of 0 is treated -by the caller (in src/memory.c) as a value of -1. +by the caller (in src/memory_rw.c) as a value of -1. @@ -524,7 +522,7 @@ In order to make sure that the emulator actually works like it is supposed to, it must be tested. For this purpose, there is a simple regression -testing framework in the tests/ directory. +testing framework in the tests/ directory.

NOTE: The regression testing framework is basically just a skeleton so far. @@ -534,8 +532,8 @@ regression tests.

-To run all the regression tests, type make regtest. Each assembly -language file matching the pattern test_*.S will be compiled and +To run all the regression tests, type make regtest. Each assembly +language file matching the pattern test_*.S will be compiled and linked into a 64-bit MIPS ELF (using a gcc cross compiler), and run in the emulator. If everything goes well, you should see something like this: @@ -578,12 +576,13 @@

-Each test writes output to stdout, and there is a test_*.good for -each .S file which contains the wanted output. If the actual output -matches the .good file, then the test passes, otherwise it fails. +Each test writes output to stdout, and there is a test_*.good for +each .S file which contains the wanted output. If the actual +output matches the .good file, then the test passes, otherwise it +fails.

-Read tests/README for more information. +Read tests/README for more information.