/[gxemul]/trunk/doc/configfiles.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/doc/configfiles.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Mon Oct 8 16:18:19 2007 UTC revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC
# Line 12  Line 12 
12    
13  <!--  <!--
14    
15  $Id: configfiles.html,v 1.8 2005/06/04 22:47:49 debug Exp $  $Id: configfiles.html,v 1.10 2005/06/21 05:38:05 debug Exp $
16    
17  Copyright (C) 2003-2005  Anders Gavare.  All rights reserved.  Copyright (C) 2003-2005  Anders Gavare.  All rights reserved.
18    
# Line 50  SUCH DAMAGE. Line 50  SUCH DAMAGE.
50  <ul>  <ul>
51    <li><a href="#config">Configuration file syntax</a>    <li><a href="#config">Configuration file syntax</a>
52    <li><a href="#minimal">A minimal example</a>    <li><a href="#minimal">A minimal example</a>
53      <li><a href="#multihost">Network across multiple hosts</a>
54  </ul>  </ul>
55    
56    
# Line 78  through an example is good enough: Line 79  through an example is good enough:
79  <b>emul(</b>  <b>emul(</b>
80      <b>name(<font color="#ff003f">"my test emul"</font>)</b>     <font color="#2020cf">!  Optional name of this emulation</font>      <b>name(<font color="#ff003f">"my test emul"</font>)</b>     <font color="#2020cf">!  Optional name of this emulation</font>
81    
82      <font color="#2020cf">!  This creates a network (ethernet):</font>      <font color="#2020cf">!  This creates an ethernet network:</font>
83      <b>net(</b>      <b>net(</b>
84          <b>ipv4net(<font color="#ff003f">"10.2.0.0"</font>)</b>  <font color="#2020cf">!  The default is 10.0.0.0/8, but</font>          <b>ipv4net(<font color="#ff003f">"10.2.0.0"</font>)</b>  <font color="#2020cf">!  The default is 10.0.0.0/8, but</font>
85          <b>ipv4len(16)</b>          <font color="#2020cf">!  it can be overridden like this.</font>          <b>ipv4len(16)</b>          <font color="#2020cf">!  it can be overridden like this.</font>
86            <font color="#2020cf">!  local_port(12345)</font>
87            <font color="#2020cf">!  add_remote("127.0.0.1:12346")</font>
88      <b>)</b>      <b>)</b>
89    
90      <font color="#2020cf">!  This creates a machine:</font>      <font color="#2020cf">!  This creates a machine:</font>
# Line 185  through an example is good enough: Line 188  through an example is good enough:
188  Starting the emulator with a configuration file is as simple as  Starting the emulator with a configuration file is as simple as
189    
190  <pre>  <pre>
191          $ <b>./gxemul @myconfig</b>          $ <b>gxemul @myconfig</b>
192  </pre>  </pre>
193    
194  if <b>myconfig</b> is the name of the configuration file.  if <b>myconfig</b> is the name of the configuration file.
# Line 195  if <b>myconfig</b> is the name of the co Line 198  if <b>myconfig</b> is the name of the co
198    
199    
200    
201    
202    
203  <p><br>  <p><br>
204  <a name="minimal"></a>  <a name="minimal"></a>
205  <h3>A minimal example:</h3>  <h3>A minimal example:</h3>
206    
207  Here is an example of what a minimal configuration file might look like:  Here is an example of what a minimal configuration file might look like:
208    
209  <p>  <p><table border="0"><tr><td width="40">&nbsp;</td><td><pre>
 <table border="0"><tr><td width="40">&nbsp;</td><td>  
 <pre>  
210  <font color="#2020cf">!!gxemul</font>  <font color="#2020cf">!!gxemul</font>
211    
212  <b>emul(</b>  <b>emul(</b>
# Line 216  Here is an example of what a minimal con Line 219  Here is an example of what a minimal con
219  </pre>  </pre>
220  </td></tr></table>  </td></tr></table>
221    
222  <p>  <p>For some machine types, specifying the <tt>subtype</tt> might not even
223  For some machine types, specifying the <b>subtype</b> might not even be  be necessary. Also, adding a <tt>net</tt> is quite useful, especially for
 necessary. Also, adding a <b>net</b> is quite useful, especially for  
224  netbooting kernels.  netbooting kernels.
225    
226    
227    
228    
229    
230    
231    <p><br>
232    <a name="multihost"></a>
233    <h3>Network across multiple hosts:</h3>
234    
235    <font color="#ff0000">2005-06-21: This a very new feature, so it might not
236    be totally stable yet.</font>
237    
238    <p>It is possible to add multiple <tt>machine</tt> entries into one
239    configuration file. This will cause the emulator to try to run all those
240    machines simultaneously. An alternative solution for doing this, which
241    gives higher reliability (stability) and performance, is to have one
242    configuration file per machine.
243    
244    <p><table border="0"><tr><td width="40">&nbsp;</td><td><pre>
245    <font color="#2020cf">!!gxemul</font>
246    
247    <b>emul(</b>
248        <b>net(</b>
249            <b>local_port(15000)</b>
250            <b>remote_add(<font color="#ff003f">"127.0.0.1:15001"</font>)</b>
251        <b>)</b>
252        <b>machine(</b>
253            <b>type(<font color="#ff003f">"dec"</font>)</b>
254            <b>subtype(<font color="#ff003f">"3max"</font>)</b>
255            <b>load(<font color="#ff003f">"netbsd-pmax-2.0-GENERIC"</font>)</b>
256        <b>)</b>
257    <b>)</b>
258    </pre>
259    </td></tr></table>
260    
261    <p>This example creates a network using the default settings (10.0.0.0/8),
262    but it also allows the network to be connected to other emulator
263    instances. <tt>local_port(15000)</tt> means that anything coming in to
264    UDP port 15000 on the host is added to the network. All ethernet packets
265    on the network are also sent out to all other connected machines (those
266    added with <tt>remote_add()</tt>).
267    
268    <p>As you can see in the example, this is a configuration file for running
269    NetBSD/pmax 2.0, with a netbooting GENERIC kernel. (Netbooting because
270    there is no disk image.) Another emulator instance (which must have
271    the same kind of <tt>net()</tt>, except that it listens to port 15001)  
272    emulates the nfs server.
273    
274    <p>There is no error checking or security checking of any kind. All UDP
275    packets arriving at the input port are added to the emulated ethernet.
276    <font color="#ff0000">This is not very good, and is the primary
277    reason why there needs to be some kind of rewrite before this
278    is to be considered stable.</font>
279    
280    
281    
282    
283  </p>  </p>
284    

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26