The host entries are used to configure the protocol stacks of the hosts attached to the internetwork. The actions a host takes when the simulator is run is determined by its protocol stack, especially by the ``application-level'' protocol(s) (i.e., megtest and/or traffic) located at the top of the stack.
The only difference between a simulated host's protocol graph in x-sim and a real host's protocol graph in the x-kernel is that they specified through different means. In the x-kernel , the graph.comp file configures the protocol graph. In x-sim , the graph.comp file is used only to determine which protocols to include in the simulator executable; the relationships between the protocols are ignored. The simulator uses the host entries in the xsim.data file to configure protocol graphs for each host. Note that although we have created special, heavily-instrumented, versions of many protocols, any x-kernel protocol can be included in the simulator.
The syntax of a host entry is:
host <name>; protocols = <hlp> <llp> <llp> ... , <hlp> <llp> <llp> ... , ... ; args = <arg> <arg> ... ; pargs <protocol instance> = <arg> <arg> ... ; pargs <protocol instance> = <arg> <arg> ... ; ...
The name given in the host line must match the name given in the net entry.
The protocols line configures the protocol stack running on the simulated host. It consists of groups of protocols separated by commas. The first protocol in a group ( hlp) is configured over the remaining protocols ( llp) in the same group.
There are a couple of points to be aware of when building a host's protocol graph. First, all protocol graphs in the simulator must contain the special sim protocol on the bottom. Second, an application-level protocol like megtest or traffic must be placed at the top of the stack, otherwise the hosts will not have any reason to send data to each other
Figure 4: Example protocol graph
The following sections contain more information about these, and other, special simulator protocols. Figure 4 shows a typical protocol graph. This graph is represented in the
protocol line of a host entry as shown below.
protocols = megtest rtcp, rtcp ip, ip vnet, vnet eth arp, arp eth, eth ethd, ethd sim;
Many protocols accept configuration parameters; the args line lists those parameters that all the protocols interpret. Each protocol instance, at initialization, scans through the args line to see if it contains any arguments that the protocol understands.
In addition to, or in place of, the args line, there can occur one or more pargs lines ( pargs stands for ``protocol args''). A pargs line allows you to an specify argument list for a specific protocol instance that appeared in the protocols line.
An argument listed on the args line is interpreted by all protocol instances that understand the argument. However, a
pargs entry becomes necessary when multiple instances of a protocol are configured on a host, and each instance must be given different parameters. For example, assume that a host's protocol stack contains two instances of the Ethernet driver, named ethd/1 and
ethd/2. An -ethdDelay argument meant exclusively for the ethd/2 instance may be specified as:
pargs ethd/2 = -ethdDelay=10us;
The following subsections list, by protocol, arguments that can be included on the args and pargs lines.