Configuring the encapsulated-packet drivers can be confusing. (We refer to encapsulated-packet drivers as simulated drivers, and instances of x-kernel s using them as simulated hosts.) Simulated drivers sit at the bottom of a protocol stack, just like a standard device driver. Instead of sending packets directly to the device, however, they use the Unix socket interface (and thus the Unix implementations of UDP and IP) to send and receive packets. For example, if you implement IP and UDP within a user_level x-kernel , then the UDP packets produced by the x-kernel are, in turn, encapsulated in real UDP packets. This means that protocols and programs built on top of UDP in the x-kernel can only talk to their peers in other x-kernel s; they cannot communicate with ``real'' versions of those protocols running standalone, for example, on a Unix machine.
Since a user_level x-kernel with a simulated driver uses a connectionless UDP socket as its transport mechanism, more than one such x-kernel can be run on a single workstation. Because of this flexibility, the local IP address used by each kernel (the simulated IP address) is decoupled from the IP address of the actual workstation on which it runs (the real IP address). Configuration files for a user_level x-kernel must therefore indicate not only which UDP port should be used by the simulated driver, but also the binding between the real and simulated IP addresses for each x-kernel .
Consider the following example ROM files (as described in Section 12.4) for two user_level x-kernel s.
% cat client/rom simeth port 3050 # # Sim. IP addr Real IP addr Real UDP port # arp 128.10.5.54 192.12.69.1 3050 arp 128.10.5.23 192.12.69.1 3051 % cat server/rom simeth port 3051 # # Sim. IP addr Real IP addr Real UDP port # arp 128.10.5.54 192.12.69.1 3050 arp 128.10.5.23 192.12.69.1 3051
The simeth entries indicate the real UDP port number which each simulated host will use to receive network packets. A unique port number must be used for each simulated host running on any given real processor. Simulated hosts running on different processors can use the same port number. (In this example, the two simulated hosts run on the same real processor (192.12.69.1) and use different UDP port numbers: 3051 and 3050.) Note that the name of the ethernet protocol appears exactly as it does in the graph.comp file.
For the arp entries, each line corresponds to a simulated IP host. The second field is the simulated IP host number, the third field is the actual IP host number where the x-kernel runs, and the fourth field is the x-kernel 's UDP port number. Note that the simulated IP host numbers do not necessarily correspond to the real IP address of the machine on which the simulated host is running. Since ARP broadcasts are infeasible for simulated hosts, each x-kernel must be configured with an arp entry for each of its peers.
See the manual page in Appendix B for more information on configuring a specific simulated driver.