-
diff --git a/docs/exampleservice.html b/docs/exampleservice.html
deleted file mode 100644
index cddb18d4..00000000
--- a/docs/exampleservice.html
+++ /dev/null
@@ -1,344 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
Sample user-defined service.
-
-
-
from core.service import CoreService
-from core.service import ServiceMode
-
-
-
-
-
-
-
Custom CORE Service
-
-
-
class MyService(CoreService):
-
-
-
-
-
-
-
-
-
Name used as a unique ID for this service and is required, no spaces.
-
-
-
-
-
-
-
-
Allows you to group services within the GUI under a common name.
-
-
-
-
-
-
-
-
Executables this service depends on to function, if executable is not on the path, service will not be loaded.
-
-
-
-
-
-
-
-
Services that this service depends on for startup, tuple of service names.
-
-
-
-
-
-
-
-
Directories that this service will create within a node.
-
-
-
-
-
-
-
-
Files that this service will generate, without a full path this file goes in the node’s directory.
-e.g. /tmp/pycore.12345/n1.conf/myfile
-
-
-
configs = ("myservice1.sh", "myservice2.sh")
-
-
-
-
-
-
-
Commands used to start this service, any non-zero exit code will cause a failure.
-
-
-
startup = ("sh %s" % configs[0], "sh %s" % configs[1])
-
-
-
-
-
-
-
Commands used to validate that a service was started, any non-zero exit code will cause a failure.
-
-
-
-
-
-
-
-
Validation mode, used to determine startup success.
-
-- NON_BLOCKING - runs startup commands, and validates success with validation commands
-- BLOCKING - runs startup commands, and validates success with the startup commands themselves
-- TIMER - runs startup commands, and validates success by waiting for “validation_timer” alone
-
-
-
-
validation_mode = ServiceMode.NON_BLOCKING
-
-
-
-
-
-
-
Time in seconds for a service to wait for validation, before determining success in TIMER/NON_BLOCKING modes.
-
-
-
-
-
-
-
-
Period in seconds to wait before retrying validation, only used in NON_BLOCKING mode.
-
-
-
-
-
-
-
-
Shutdown commands to stop this service.
-
-
-
-
-
-
-
-
@classmethod
- def on_load(cls):
-
-
-
-
-
-
-
Provides a way to run some arbitrary logic when the service is loaded, possibly to help facilitate
-dynamic settings for the environment.
-
-
-
-
-
-
-
-
@classmethod
- def get_configs(cls, node):
-
-
-
-
-
-
-
Provides a way to dynamically generate the config files from the node a service will run.
-Defaults to the class definition and can be left out entirely if not needed.
-
-
-
-
-
-
-
-
@classmethod
- def generate_config(cls, node, filename):
-
-
-
-
-
-
-
Returns a string representation for a file, given the node the service is starting on the config filename
-that this information will be used for. This must be defined, if “configs” are defined.
-
-
-
cfg = "#!/bin/sh\n"
-
- if filename == cls.configs[0]:
- cfg += "# auto-generated by MyService (sample.py)\n"
- for ifc in node.netifs():
- cfg += 'echo "Node %s has interface %s"\n' % (node.name, ifc.name)
- elif filename == cls.configs[1]:
- cfg += "echo hello"
-
- return cfg
-
-
-
-
-
-
-
@classmethod
- def get_startup(cls, node):
-
-
-
-
-
-
-
Provides a way to dynamically generate the startup commands from the node a service will run.
-Defaults to the class definition and can be left out entirely if not needed.
-
-
-
-
-
-
-
-
@classmethod
- def get_validate(cls, node):
-
-
-
-
-
-
-
Provides a way to dynamically generate the validate commands from the node a service will run.
-Defaults to the class definition and can be left out entirely if not needed.
-
-
-
-
-
-
diff --git a/docs/grpc.md b/docs/grpc.md
new file mode 100644
index 00000000..3266a57d
--- /dev/null
+++ b/docs/grpc.md
@@ -0,0 +1,411 @@
+* Table of Contents
+
+## Overview
+
+[gRPC](https://grpc.io/) is a client/server API for interfacing with CORE
+and used by the python GUI for driving all functionality. It is dependent
+on having a running `core-daemon` instance to be leveraged.
+
+A python client can be created from the raw generated grpc files included
+with CORE or one can leverage a provided gRPC client that helps encapsulate
+some functionality to try and help make things easier.
+
+## Python Client
+
+A python client wrapper is provided at
+[CoreGrpcClient](https://github.com/coreemu/core/blob/master/daemon/core/api/grpc/client.py)
+to help provide some conveniences when using the API.
+
+### Client HTTP Proxy
+
+Since gRPC is HTTP2 based, proxy configurations can cause issues. By default,
+the client disables proxy support to avoid issues when a proxy is present.
+You can enable and properly account for this issue when needed.
+
+## Proto Files
+
+Proto files are used to define the API and protobuf messages that are used for
+interfaces with this API.
+
+They can be found
+[here](https://github.com/coreemu/core/tree/master/daemon/proto/core/api/grpc)
+to see the specifics of
+what is going on and response message values that would be returned.
+
+## Examples
+
+### Node Models
+
+When creating nodes of type `NodeType.DEFAULT` these are the default models
+and the services they map to.
+
+* mdr
+ * zebra, OSPFv3MDR, IPForward
+* PC
+ * DefaultRoute
+* router
+ * zebra, OSPFv2, OSPFv3, IPForward
+* host
+ * DefaultRoute, SSH
+
+### Interface Helper
+
+There is an interface helper class that can be leveraged for convenience
+when creating interface data for nodes. Alternatively one can manually create
+a `core.api.grpc.wrappers.Interface` class instead with appropriate information.
+
+Manually creating gRPC client interface:
+
+```python
+from core.api.grpc.wrappers import Interface
+
+# id is optional and will set to the next available id
+# name is optional and will default to eth
+# mac is optional and will result in a randomly generated mac
+iface = Interface(
+ id=0,
+ name="eth0",
+ ip4="10.0.0.1",
+ ip4_mask=24,
+ ip6="2001::",
+ ip6_mask=64,
+)
+```
+
+Leveraging the interface helper class:
+
+```python
+from core.api.grpc import client
+
+iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64")
+# node_id is used to get an ip4/ip6 address indexed from within the above prefixes
+# iface_id is required and used exactly for that
+# name is optional and would default to eth
+# mac is optional and will result in a randomly generated mac
+iface_data = iface_helper.create_iface(
+ node_id=1, iface_id=0, name="eth0", mac="00:00:00:00:aa:00"
+)
+```
+
+### Listening to Events
+
+Various events that can occur within a session can be listened to.
+
+Event types:
+
+* session - events for changes in session state and mobility start/stop/pause
+* node - events for node movements and icon changes
+* link - events for link configuration changes and wireless link add/delete
+* config - configuration events when legacy gui joins a session
+* exception - alert/error events
+* file - file events when the legacy gui joins a session
+
+```python
+from core.api.grpc import client
+from core.api.grpc.wrappers import EventType
+
+
+def event_listener(event):
+ print(event)
+
+
+# create grpc client and connect
+core = client.CoreGrpcClient()
+core.connect()
+
+# add session
+session = core.create_session()
+
+# provide no events to listen to all events
+core.events(session.id, event_listener)
+
+# provide events to listen to specific events
+core.events(session.id, event_listener, [EventType.NODE])
+```
+
+### Configuring Links
+
+Links can be configured at the time of creation or during runtime.
+
+Currently supported configuration options:
+
+* bandwidth (bps)
+* delay (us)
+* duplicate (%)
+* jitter (us)
+* loss (%)
+
+```python
+from core.api.grpc import client
+from core.api.grpc.wrappers import LinkOptions, Position
+
+# interface helper
+iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64")
+
+# create grpc client and connect
+core = client.CoreGrpcClient()
+core.connect()
+
+# add session
+session = core.create_session()
+
+# create nodes
+position = Position(x=100, y=100)
+node1 = session.add_node(1, position=position)
+position = Position(x=300, y=100)
+node2 = session.add_node(2, position=position)
+
+# configuring when creating a link
+options = LinkOptions(
+ bandwidth=54_000_000,
+ delay=5000,
+ dup=5,
+ loss=5.5,
+ jitter=0,
+)
+iface1 = iface_helper.create_iface(node1.id, 0)
+iface2 = iface_helper.create_iface(node2.id, 0)
+link = session.add_link(node1=node1, node2=node2, iface1=iface1, iface2=iface2)
+
+# configuring during runtime
+link.options.loss = 10.0
+core.edit_link(session.id, link)
+```
+
+### Peer to Peer Example
+
+```python
+# required imports
+from core.api.grpc import client
+from core.api.grpc.wrappers import Position
+
+# interface helper
+iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64")
+
+# create grpc client and connect
+core = client.CoreGrpcClient()
+core.connect()
+
+# add session
+session = core.create_session()
+
+# create nodes
+position = Position(x=100, y=100)
+node1 = session.add_node(1, position=position)
+position = Position(x=300, y=100)
+node2 = session.add_node(2, position=position)
+
+# create link
+iface1 = iface_helper.create_iface(node1.id, 0)
+iface2 = iface_helper.create_iface(node2.id, 0)
+session.add_link(node1=node1, node2=node2, iface1=iface1, iface2=iface2)
+
+# start session
+core.start_session(session)
+```
+
+### Switch/Hub Example
+
+```python
+# required imports
+from core.api.grpc import client
+from core.api.grpc.wrappers import NodeType, Position
+
+# interface helper
+iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64")
+
+# create grpc client and connect
+core = client.CoreGrpcClient()
+core.connect()
+
+# add session
+session = core.create_session()
+
+# create nodes
+position = Position(x=200, y=200)
+switch = session.add_node(1, _type=NodeType.SWITCH, position=position)
+position = Position(x=100, y=100)
+node1 = session.add_node(2, position=position)
+position = Position(x=300, y=100)
+node2 = session.add_node(3, position=position)
+
+# create links
+iface1 = iface_helper.create_iface(node1.id, 0)
+session.add_link(node1=node1, node2=switch, iface1=iface1)
+iface1 = iface_helper.create_iface(node2.id, 0)
+session.add_link(node1=node2, node2=switch, iface1=iface1)
+
+# start session
+core.start_session(session)
+```
+
+### WLAN Example
+
+```python
+# required imports
+from core.api.grpc import client
+from core.api.grpc.wrappers import NodeType, Position
+
+# interface helper
+iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64")
+
+# create grpc client and connect
+core = client.CoreGrpcClient()
+core.connect()
+
+# add session
+session = core.create_session()
+
+# create nodes
+position = Position(x=200, y=200)
+wlan = session.add_node(1, _type=NodeType.WIRELESS_LAN, position=position)
+position = Position(x=100, y=100)
+node1 = session.add_node(2, model="mdr", position=position)
+position = Position(x=300, y=100)
+node2 = session.add_node(3, model="mdr", position=position)
+
+# create links
+iface1 = iface_helper.create_iface(node1.id, 0)
+session.add_link(node1=node1, node2=wlan, iface1=iface1)
+iface1 = iface_helper.create_iface(node2.id, 0)
+session.add_link(node1=node2, node2=wlan, iface1=iface1)
+
+# set wlan config using a dict mapping currently
+# support values as strings
+wlan.set_wlan(
+ {
+ "range": "280",
+ "bandwidth": "55000000",
+ "delay": "6000",
+ "jitter": "5",
+ "error": "5",
+ }
+)
+
+# start session
+core.start_session(session)
+```
+
+### EMANE Example
+
+For EMANE you can import and use one of the existing models and
+use its name for configuration.
+
+Current models:
+
+* core.emane.ieee80211abg.EmaneIeee80211abgModel
+* core.emane.rfpipe.EmaneRfPipeModel
+* core.emane.tdma.EmaneTdmaModel
+* core.emane.bypass.EmaneBypassModel
+
+Their configurations options are driven dynamically from parsed EMANE manifest files
+from the installed version of EMANE.
+
+Options and their purpose can be found at the [EMANE Wiki](https://github.com/adjacentlink/emane/wiki).
+
+If configuring EMANE global settings or model mac/phy specific settings, any value not provided
+will use the defaults. When no configuration is used, the defaults are used.
+
+```python
+# required imports
+from core.api.grpc import client
+from core.api.grpc.wrappers import NodeType, Position
+from core.emane.models.ieee80211abg import EmaneIeee80211abgModel
+
+# interface helper
+iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64")
+
+# create grpc client and connect
+core = client.CoreGrpcClient()
+core.connect()
+
+# add session
+session = core.create_session()
+
+# create nodes
+position = Position(x=200, y=200)
+emane = session.add_node(
+ 1, _type=NodeType.EMANE, position=position, emane=EmaneIeee80211abgModel.name
+)
+position = Position(x=100, y=100)
+node1 = session.add_node(2, model="mdr", position=position)
+position = Position(x=300, y=100)
+node2 = session.add_node(3, model="mdr", position=position)
+
+# create links
+iface1 = iface_helper.create_iface(node1.id, 0)
+session.add_link(node1=node1, node2=emane, iface1=iface1)
+iface1 = iface_helper.create_iface(node2.id, 0)
+session.add_link(node1=node2, node2=emane, iface1=iface1)
+
+# setting emane specific emane model configuration
+emane.set_emane_model(EmaneIeee80211abgModel.name, {
+ "eventservicettl": "2",
+ "unicastrate": "3",
+})
+
+# start session
+core.start_session(session)
+```
+
+EMANE Model Configuration:
+
+```python
+# emane network specific config, set on an emane node
+# this setting applies to all nodes connected
+emane.set_emane_model(EmaneIeee80211abgModel.name, {"unicastrate": "3"})
+
+# node specific config for an individual node connected to an emane network
+node.set_emane_model(EmaneIeee80211abgModel.name, {"unicastrate": "3"})
+
+# node interface specific config for an individual node connected to an emane network
+node.set_emane_model(EmaneIeee80211abgModel.name, {"unicastrate": "3"}, iface_id=0)
+```
+
+## Configuring a Service
+
+Services help generate and run bash scripts on nodes for a given purpose.
+
+Configuring the files of a service results in a specific hard coded script being
+generated, instead of the default scripts, that may leverage dynamic generation.
+
+The following features can be configured for a service:
+
+* files - files that will be generated
+* directories - directories that will be mounted unique to the node
+* startup - commands to run start a service
+* validate - commands to run to validate a service
+* shutdown - commands to run to stop a service
+
+Editing service properties:
+
+```python
+# configure a service, for a node, for a given session
+node.service_configs[service_name] = NodeServiceData(
+ configs=["file1.sh", "file2.sh"],
+ directories=["/etc/node"],
+ startup=["bash file1.sh"],
+ validate=[],
+ shutdown=[],
+)
+```
+
+When editing a service file, it must be the name of `config`
+file that the service will generate.
+
+Editing a service file:
+
+```python
+# to edit the contents of a generated file you can specify
+# the service, the file name, and its contents
+file_configs = node.service_file_configs.setdefault(service_name, {})
+file_configs[file_name] = "echo hello world"
+```
+
+## File Examples
+
+File versions of the network examples can be found
+[here](https://github.com/coreemu/core/tree/master/package/examples/grpc).
+These examples will create a session using the gRPC API when the core-daemon is running.
+
+You can then switch to and attach to these sessions using either of the CORE GUIs.
diff --git a/docs/gui.md b/docs/gui.md
new file mode 100644
index 00000000..c296ac18
--- /dev/null
+++ b/docs/gui.md
@@ -0,0 +1,497 @@
+# CORE GUI
+
+
+
+## Overview
+
+The GUI is used to draw nodes and network devices on a canvas, linking them
+together to create an emulated network session.
+
+After pressing the start button, CORE will proceed through these phases,
+staying in the **runtime** phase. After the session is stopped, CORE will
+proceed to the **data collection** phase before tearing down the emulated
+state.
+
+CORE can be customized to perform any action at each state. See the
+**Hooks...** entry on the [Session Menu](#session-menu) for details about
+when these session states are reached.
+
+## Prerequisites
+
+Beyond installing CORE, you must have the CORE daemon running. This is done
+on the command line with either systemd or sysv.
+
+```shell
+# systemd service
+sudo systemctl daemon-reload
+sudo systemctl start core-daemon
+
+# direct invocation
+sudo core-daemon
+```
+
+## GUI Files
+
+The GUI will create a directory in your home directory on first run called
+~/.coregui. This directory will help layout various files that the GUI may use.
+
+* .coregui/
+ * backgrounds/
+ * place backgrounds used for display in the GUI
+ * custom_emane/
+ * place to keep custom emane models to use with the core-daemon
+ * custom_services/
+ * place to keep custom services to use with the core-daemon
+ * icons/
+ * icons the GUI uses along with customs icons desired
+ * mobility/
+ * place to keep custom mobility files
+ * scripts/
+ * place to keep core related scripts
+ * xmls/
+ * place to keep saved session xml files
+ * gui.log
+ * log file when running the gui, look here when issues occur for exceptions etc
+ * config.yaml
+ * configuration file used to save/load various gui related settings (custom nodes, layouts, addresses, etc)
+
+## Modes of Operation
+
+The CORE GUI has two primary modes of operation, **Edit** and **Execute**
+modes. Running the GUI, by typing **core-gui** with no options, starts in
+Edit mode. Nodes are drawn on a blank canvas using the toolbar on the left
+and configured from right-click menus or by double-clicking them. The GUI
+does not need to be run as root.
+
+Once editing is complete, pressing the green **Start** button instantiates
+the topology and enters Execute mode. In execute mode,
+the user can interact with the running emulated machines by double-clicking or
+right-clicking on them. The editing toolbar disappears and is replaced by an
+execute toolbar, which provides tools while running the emulation. Pressing
+the red **Stop** button will destroy the running emulation and return CORE
+to Edit mode.
+
+Once the emulation is running, the GUI can be closed, and a prompt will appear
+asking if the emulation should be terminated. The emulation may be left
+running and the GUI can reconnect to an existing session at a later time.
+
+The GUI can be run as a normal user on Linux.
+
+The GUI currently provides the following options on startup.
+
+```shell
+usage: core-gui [-h] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-p]
+ [-s SESSION] [--create-dir]
+
+CORE Python GUI
+
+optional arguments:
+ -h, --help show this help message and exit
+ -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
+ logging level
+ -p, --proxy enable proxy
+ -s SESSION, --session SESSION
+ session id to join
+ --create-dir create gui directory and exit
+```
+
+## Toolbar
+
+The toolbar is a row of buttons that runs vertically along the left side of the
+CORE GUI window. The toolbar changes depending on the mode of operation.
+
+### Editing Toolbar
+
+When CORE is in Edit mode (the default), the vertical Editing Toolbar exists on
+the left side of the CORE window. Below are brief descriptions for each toolbar
+item, starting from the top. Most of the tools are grouped into related
+sub-menus, which appear when you click on their group icon.
+
+| Icon | Name | Description |
+|----------------------------|----------------|----------------------------------------------------------------------------------------|
+|  | Selection Tool | Tool for selecting, moving, configuring nodes. |
+|  | Start Button | Starts Execute mode, instantiates the emulation. |
+|  | Link | Allows network links to be drawn between two nodes by clicking and dragging the mouse. |
+
+### CORE Nodes
+
+These nodes will create a new node container and run associated services.
+
+| Icon | Name | Description |
+|----------------------------|---------|------------------------------------------------------------------------------|
+|  | Router | Runs Quagga OSPFv2 and OSPFv3 routing to forward packets. |
+|  | Host | Emulated server machine having a default route, runs SSH server. |
+|  | PC | Basic emulated machine having a default route, runs no processes by default. |
+|  | MDR | Runs Quagga OSPFv3 MDR routing for MANET-optimized routing. |
+|  | PRouter | Physical router represents a real testbed machine. |
+
+### Network Nodes
+
+These nodes are mostly used to create a Linux bridge that serves the
+purpose described below.
+
+| Icon | Name | Description |
+|-------------------------------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+|  | Hub | Ethernet hub forwards incoming packets to every connected node. |
+|  | Switch | Ethernet switch intelligently forwards incoming packets to attached hosts using an Ethernet address hash table. |
+|  | Wireless LAN | When routers are connected to this WLAN node, they join a wireless network and an antenna is drawn instead of a connecting line; the WLAN node typically controls connectivity between attached wireless nodes based on the distance between them. |
+|  | RJ45 | RJ45 Physical Interface Tool, emulated nodes can be linked to real physical interfaces; using this tool, real networks and devices can be physically connected to the live-running emulation. |
+|  | Tunnel | Tool allows connecting together more than one CORE emulation using GRE tunnels. |
+
+### Annotation Tools
+
+| Icon | Name | Description |
+|-------------------------------|-----------|---------------------------------------------------------------------|
+|  | Marker | For drawing marks on the canvas. |
+|  | Oval | For drawing circles on the canvas that appear in the background. |
+|  | Rectangle | For drawing rectangles on the canvas that appear in the background. |
+|  | Text | For placing text captions on the canvas. |
+
+### Execution Toolbar
+
+When the Start button is pressed, CORE switches to Execute mode, and the Edit
+toolbar on the left of the CORE window is replaced with the Execution toolbar
+Below are the items on this toolbar, starting from the top.
+
+| Icon | Name | Description |
+|----------------------------|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+|  | Stop Button | Stops Execute mode, terminates the emulation, returns CORE to edit mode. |
+|  | Selection Tool | In Execute mode, the Selection Tool can be used for moving nodes around the canvas, and double-clicking on a node will open a shell window for that node; right-clicking on a node invokes a pop-up menu of run-time options for that node. |
+|  | Marker | For drawing freehand lines on the canvas, useful during demonstrations; markings are not saved. |
+|  | Run Tool | This tool allows easily running a command on all or a subset of all nodes. A list box allows selecting any of the nodes. A text entry box allows entering any command. The command should return immediately, otherwise the display will block awaiting response. The *ping* command, for example, with no parameters, is not a good idea. The result of each command is displayed in a results box. The first occurrence of the special text "NODE" will be replaced with the node name. The command will not be attempted to run on nodes that are not routers, PCs, or hosts, even if they are selected. |
+
+## Menu
+
+The menubar runs along the top of the CORE GUI window and provides access to a
+variety of features. Some of the menus are detachable, such as the *Widgets*
+menu, by clicking the dashed line at the top.
+
+### File Menu
+
+The File menu contains options for saving and opening saved sessions.
+
+| Option | Description |
+|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| New Session | This starts a new session with an empty canvas. |
+| Save | Saves the current topology. If you have not yet specified a file name, the Save As dialog box is invoked. |
+| Save As | Invokes the Save As dialog box for selecting a new **.xml** file for saving the current configuration in the XML file. |
+| Open | Invokes the File Open dialog box for selecting a new XML file to open. |
+| Recently used files | Above the Quit menu command is a list of recently use files, if any have been opened. You can clear this list in the Preferences dialog box. You can specify the number of files to keep in this list from the Preferences dialog. Click on one of the file names listed to open that configuration file. |
+| Execute Python Script | Invokes a File Open dialog box for selecting a Python script to run and automatically connect to. After a selection is made, a Python Script Options dialog box is invoked to allow for command-line options to be added. The Python script must create a new CORE Session and add this session to the daemon's list of sessions in order for this to work. |
+| Quit | The Quit command should be used to exit the CORE GUI. CORE may prompt for termination if you are currently in Execute mode. Preferences and the recently-used files list are saved. |
+
+### Edit Menu
+
+| Option | Description |
+|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Preferences | Invokes the Preferences dialog box. |
+| Custom Nodes | Custom node creation dialog box. |
+| Undo | (Disabled) Attempts to undo the last edit in edit mode. |
+| Redo | (Disabled) Attempts to redo an edit that has been undone. |
+| Cut, Copy, Paste, Delete | Used to cut, copy, paste, and delete a selection. When nodes are pasted, their node numbers are automatically incremented, and existing links are preserved with new IP addresses assigned. Services and their customizations are copied to the new node, but care should be taken as node IP addresses have changed with possibly old addresses remaining in any custom service configurations. Annotations may also be copied and pasted. |
+
+### Canvas Menu
+
+The canvas menu provides commands related to the editing canvas.
+
+| Option | Description |
+|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Size/scale | Invokes a Canvas Size and Scale dialog that allows configuring the canvas size, scale, and geographic reference point. The size controls allow changing the width and height of the current canvas, in pixels or meters. The scale allows specifying how many meters are equivalent to 100 pixels. The reference point controls specify the latitude, longitude, and altitude reference point used to convert between geographic and Cartesian coordinate systems. By clicking the *Save as default* option, all new canvases will be created with these properties. The default canvas size can also be changed in the Preferences dialog box. |
+| Wallpaper | Used for setting the canvas background image. |
+
+### View Menu
+
+The View menu features items for toggling on and off their display on the canvas.
+
+| Option | Description |
+|-----------------|-----------------------------------|
+| Interface Names | Display interface names on links. |
+| IPv4 Addresses | Display IPv4 addresses on links. |
+| IPv6 Addresses | Display IPv6 addresses on links. |
+| Node Labels | Display node names. |
+| Link Labels | Display link labels. |
+| Annotations | Display annotations. |
+| Canvas Grid | Display the canvas grid. |
+
+### Tools Menu
+
+The tools menu lists different utility functions.
+
+| Option | Description |
+|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Find | Display find dialog used for highlighting a node on the canvas. |
+| Auto Grid | Automatically layout nodes in a grid. |
+| IP addresses | Invokes the IP Addresses dialog box for configuring which IPv4/IPv6 prefixes are used when automatically addressing new interfaces. |
+| MAC addresses | Invokes the MAC Addresses dialog box for configuring the starting number used as the lowest byte when generating each interface MAC address. This value should be changed when tunneling between CORE emulations to prevent MAC address conflicts. |
+
+### Widgets Menu
+
+Widgets are GUI elements that allow interaction with a running emulation.
+Widgets typically automate the running of commands on emulated nodes to report
+status information of some type and display this on screen.
+
+#### Periodic Widgets
+
+These Widgets are those available from the main *Widgets* menu. More than one
+of these Widgets may be run concurrently. An event loop fires once every second
+that the emulation is running. If one of these Widgets is enabled, its periodic
+routine will be invoked at this time. Each Widget may have a configuration
+dialog box which is also accessible from the *Widgets* menu.
+
+Here are some standard widgets:
+
+* **Adjacency** - displays router adjacency states for Quagga's OSPFv2 and OSPFv3
+ routing protocols. A line is drawn from each router halfway to the router ID
+ of an adjacent router. The color of the line is based on the OSPF adjacency
+ state such as Two-way or Full. To learn about the different colors, see the
+ *Configure Adjacency...* menu item. The **vtysh** command is used to
+ dump OSPF neighbor information.
+ Only half of the line is drawn because each
+ router may be in a different adjacency state with respect to the other.
+* **Throughput** - displays the kilobits-per-second throughput above each link,
+ using statistics gathered from each link. If the throughput exceeds a certain
+ threshold, the link will become highlighted. For wireless nodes which broadcast
+ data to all nodes in range, the throughput rate is displayed next to the node and
+ the node will become circled if the threshold is exceeded.
+
+#### Observer Widgets
+
+These Widgets are available from the **Observer Widgets** submenu of the
+**Widgets** menu, and from the Widgets Tool on the toolbar. Only one Observer Widget may
+be used at a time. Mouse over a node while the session is running to pop up
+an informational display about that node.
+
+Available Observer Widgets include IPv4 and IPv6 routing tables, socket
+information, list of running processes, and OSPFv2/v3 neighbor information.
+
+Observer Widgets may be edited by the user and rearranged. Choosing
+**Widgets->Observer Widgets->Edit Observers** from the Observer Widget menu will
+invoke the Observer Widgets dialog. A list of Observer Widgets is displayed along
+with up and down arrows for rearranging the list. Controls are available for
+renaming each widget, for changing the command that is run during mouse over, and
+for adding and deleting items from the list. Note that specified commands should
+return immediately to avoid delays in the GUI display. Changes are saved to a
+**config.yaml** file in the CORE configuration directory.
+
+### Session Menu
+
+The Session Menu has entries for starting, stopping, and managing sessions,
+in addition to global options such as node types, comments, hooks, servers,
+and options.
+
+| Option | Description |
+|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Sessions | Invokes the CORE Sessions dialog box containing a list of active CORE sessions in the daemon. Basic session information such as name, node count, start time, and a thumbnail are displayed. This dialog allows connecting to different sessions, shutting them down, or starting a new session. |
+| Servers | Invokes the CORE emulation servers dialog for configuring. |
+| Options | Presents per-session options, such as the IPv4 prefix to be used, if any, for a control network the ability to preserve the session directory; and an on/off switch for SDT3D support. |
+| Hooks | Invokes the CORE Session Hooks window where scripts may be configured for a particular session state. The session states are defined in the [table](#session-states) below. The top of the window has a list of configured hooks, and buttons on the bottom left allow adding, editing, and removing hook scripts. The new or edit button will open a hook script editing window. A hook script is a shell script invoked on the host (not within a virtual node). |
+
+#### Session States
+
+| State | Description |
+|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Definition | Used by the GUI to tell the backend to clear any state. |
+| Configuration | When the user presses the *Start* button, node, link, and other configuration data is sent to the backend. This state is also reached when the user customizes a service. |
+| Instantiation | After configuration data has been sent, just before the nodes are created. |
+| Runtime | All nodes and networks have been built and are running. (This is the same state at which the previously-named *global experiment script* was run.) |
+| Datacollect | The user has pressed the *Stop* button, but before services have been stopped and nodes have been shut down. This is a good time to collect log files and other data from the nodes. |
+| Shutdown | All nodes and networks have been shut down and destroyed. |
+
+### Help Menu
+
+| Option | Description |
+|--------------------------|---------------------------------------------------------------|
+| CORE Github (www) | Link to the CORE GitHub page. |
+| CORE Documentation (www) | Lnk to the CORE Documentation page. |
+| About | Invokes the About dialog box for viewing version information. |
+
+## Building Sample Networks
+
+### Wired Networks
+
+Wired networks are created using the **Link Tool** to draw a link between two
+nodes. This automatically draws a red line representing an Ethernet link and
+creates new interfaces on network-layer nodes.
+
+Double-click on the link to invoke the **link configuration** dialog box. Here
+you can change the Bandwidth, Delay, Loss, and Duplicate
+rate parameters for that link. You can also modify the color and width of the
+link, affecting its display.
+
+Link-layer nodes are provided for modeling wired networks. These do not create
+a separate network stack when instantiated, but are implemented using Linux bridging.
+These are the hub, switch, and wireless LAN nodes. The hub copies each packet from
+the incoming link to every connected link, while the switch behaves more like an
+Ethernet switch and keeps track of the Ethernet address of the connected peer,
+forwarding unicast traffic only to the appropriate ports.
+
+The wireless LAN (WLAN) is covered in the next section.
+
+### Wireless Networks
+
+Wireless networks allow moving nodes around to impact the connectivity between them. Connections between a
+pair of nodes is stronger when the nodes are closer while connection is weaker when the nodes are further away.
+CORE offers several levels of wireless emulation fidelity, depending on modeling needs and available
+hardware.
+
+* WLAN Node
+ * uses set bandwidth, delay, and loss
+ * links are enabled or disabled based on a set range
+ * uses the least CPU when moving, but nothing extra when not moving
+* Wireless Node
+ * uses set bandwidth, delay, and initial loss
+ * loss dynamically changes based on distance between nodes, which can be configured with range parameters
+ * links are enabled or disabled based on a set range
+ * uses more CPU to calculate loss for every movement, but nothing extra when not moving
+* EMANE Node
+ * uses a physical layer model to account for signal propagation, antenna profile effects and interference
+ sources in order to provide a realistic environment for wireless experimentation
+ * uses the most CPU for every packet, as complex calculations are used for fidelity
+ * See [Wiki](https://github.com/adjacentlink/emane/wiki) for details on general EMANE usage
+ * See [CORE EMANE](emane.md) for details on using EMANE in CORE
+
+| Model | Type | Supported Platform(s) | Fidelity | Description |
+|----------|--------|-----------------------|----------|-------------------------------------------------------------------------------|
+| WLAN | On/Off | Linux | Low | Ethernet bridging with nftables |
+| Wireless | On/Off | Linux | Medium | Ethernet bridging with nftables |
+| EMANE | RF | Linux | High | TAP device connected to EMANE emulator with pluggable MAC and PHY radio types |
+
+#### Example WLAN Network Setup
+
+To quickly build a wireless network, you can first place several router nodes
+onto the canvas. If you have the
+Quagga MDR software installed, it is
+recommended that you use the **mdr** node type for reduced routing overhead. Next
+choose the **WLAN** from the **Link-layer nodes** submenu. First set the
+desired WLAN parameters by double-clicking the cloud icon. Then you can link
+all selected right-clicking on the WLAN and choosing **Link to Selected**.
+
+Linking a router to the WLAN causes a small antenna to appear, but no red link
+line is drawn. Routers can have multiple wireless links and both wireless and
+wired links (however, you will need to manually configure route
+redistribution.) The mdr node type will generate a routing configuration that
+enables OSPFv3 with MANET extensions. This is a Boeing-developed extension to
+Quagga's OSPFv3 that reduces flooding overhead and optimizes the flooding
+procedure for mobile ad-hoc (MANET) networks.
+
+The default configuration of the WLAN is set to use the basic range model. Having this model
+selected causes **core-daemon** to calculate the distance between nodes based
+on screen pixels. A numeric range in screen pixels is set for the wireless
+network using the **Range** slider. When two wireless nodes are within range of
+each other, a green line is drawn between them and they are linked. Two
+wireless nodes that are farther than the range pixels apart are not linked.
+During Execute mode, users may move wireless nodes around by clicking and
+dragging them, and wireless links will be dynamically made or broken.
+
+### Running Commands within Nodes
+
+You can double click a node to bring up a terminal for running shell commands. Within
+the terminal you can run anything you like and those commands will be run in context of the node.
+For standard CORE nodes, the only thing to keep in mind is that you are using the host file
+system and anything you change or do can impact the greater system. By default, your terminal
+will open within the nodes home directory for the running session, but it is temporary and
+will be removed when the session is stopped.
+
+You can also launch GUI based applications from within standard CORE nodes, but you need to
+enable xhost access to root.
+
+```shell
+xhost +local:root
+```
+
+### Mobility Scripting
+
+CORE has a few ways to script mobility.
+
+| Option | Description |
+|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| ns-2 script | The script specifies either absolute positions or waypoints with a velocity. Locations are given with Cartesian coordinates. |
+| gRPC API | An external entity can move nodes by leveraging the gRPC API |
+| EMANE events | See [EMANE](emane.md) for details on using EMANE scripts to move nodes around. Location information is typically given as latitude, longitude, and altitude. |
+
+For the first method, you can create a mobility script using a text
+editor, or using a tool such as [BonnMotion](http://net.cs.uni-bonn.de/wg/cs/applications/bonnmotion/), and associate
+the script with one of the wireless
+using the WLAN configuration dialog box. Click the *ns-2 mobility script...*
+button, and set the *mobility script file* field in the resulting *ns2script*
+configuration dialog.
+
+Here is an example for creating a BonnMotion script for 10 nodes:
+
+```shell
+bm -f sample RandomWaypoint -n 10 -d 60 -x 1000 -y 750
+bm NSFile -f sample
+# use the resulting 'sample.ns_movements' file in CORE
+```
+
+When the Execute mode is started and one of the WLAN nodes has a mobility
+script, a mobility script window will appear. This window contains controls for
+starting, stopping, and resetting the running time for the mobility script. The
+**loop** checkbox causes the script to play continuously. The **resolution** text
+box contains the number of milliseconds between each timer event; lower values
+cause the mobility to appear smoother but consumes greater CPU time.
+
+The format of an ns-2 mobility script looks like:
+
+```shell
+# nodes: 3, max time: 35.000000, max x: 600.00, max y: 600.00
+$node_(2) set X_ 144.0
+$node_(2) set Y_ 240.0
+$node_(2) set Z_ 0.00
+$ns_ at 1.00 "$node_(2) setdest 130.0 280.0 15.0"
+```
+
+The first three lines set an initial position for node 2. The last line in the
+above example causes node 2 to move towards the destination **(130, 280)** at
+speed **15**. All units are screen coordinates, with speed in units per second.
+The total script time is learned after all nodes have reached their waypoints.
+Initially, the time slider in the mobility script dialog will not be
+accurate.
+
+Examples mobility scripts (and their associated topology files) can be found
+in the **configs/** directory.
+
+## Alerts
+
+The alerts button is located in the bottom right-hand corner
+of the status bar in the CORE GUI. This will change colors to indicate one or
+more problems with the running emulation. Clicking on the alerts button will invoke the
+alerts dialog.
+
+The alerts dialog contains a list of alerts received from
+the CORE daemon. An alert has a time, severity level, optional node number,
+and source. When the alerts button is red, this indicates one or more fatal
+exceptions. An alert with a fatal severity level indicates that one or more
+of the basic pieces of emulation could not be created, such as failure to
+create a bridge or namespace, or the failure to launch EMANE processes for an
+EMANE-based network.
+
+Clicking on an alert displays details for that
+exceptio. The exception source is a text string
+to help trace where the exception occurred; "service:UserDefined" for example,
+would appear for a failed validation command with the UserDefined service.
+
+A button is available at the bottom of the dialog for clearing the exception
+list.
+
+## Customizing your Topology's Look
+
+Several annotation tools are provided for changing the way your topology is
+presented. Captions may be added with the Text tool. Ovals and rectangles may
+be drawn in the background, helpful for visually grouping nodes together.
+
+During live demonstrations the marker tool may be helpful for drawing temporary
+annotations on the canvas that may be quickly erased. A size and color palette
+appears at the bottom of the toolbar when the marker tool is selected. Markings
+are only temporary and are not saved in the topology file.
+
+The basic node icons can be replaced with a custom image of your choice. Icons
+appear best when they use the GIF or PNG format with a transparent background.
+To change a node's icon, double-click the node to invoke its configuration
+dialog and click on the button to the right of the node name that shows the
+node's current icon.
+
+A background image for the canvas may be set using the *Wallpaper...* option
+from the *Canvas* menu. The image may be centered, tiled, or scaled to fit the
+canvas size. An existing terrain, map, or network diagram could be used as a
+background, for example, with CORE nodes drawn on top.
diff --git a/docs/hitl.md b/docs/hitl.md
new file mode 100644
index 00000000..b659a36f
--- /dev/null
+++ b/docs/hitl.md
@@ -0,0 +1,127 @@
+# Hardware In The Loop
+
+## Overview
+
+In some cases it may be impossible or impractical to run software using CORE
+nodes alone. You may need to bring in external hardware into the network.
+CORE's emulated networks run in real time, so they can be connected to live
+physical networks. The RJ45 tool and the Tunnel tool help with connecting to
+the real world. These tools are available from the **Link Layer Nodes** menu.
+
+When connecting two or more CORE emulations together, MAC address collisions
+should be avoided. CORE automatically assigns MAC addresses to interfaces when
+the emulation is started, starting with **00:00:00:aa:00:00** and incrementing
+the bottom byte. The starting byte should be changed on the second CORE machine
+using the **Tools->MAC Addresses** option the menu.
+
+## RJ45 Node
+
+CORE provides the RJ45 node, which represents a physical
+interface within the host that is running CORE. Any real-world network
+devices can be connected to the interface and communicate with the CORE nodes in real time.
+
+The main drawback is that one physical interface is required for each
+connection. When the physical interface is assigned to CORE, it may not be used
+for anything else. Another consideration is that the computer or network that
+you are connecting to must be co-located with the CORE machine.
+
+### GUI Usage
+
+To place an RJ45 connection, click on the **Link Layer Nodes** toolbar and select
+the **RJ45 Node** from the options. Click on the canvas, where you would like
+the nodes to place. Now click on the **Link Tool** and draw a link between the RJ45
+and the other node you wish to be connected to. The RJ45 node will display "UNASSIGNED".
+Double-click the RJ45 node to assign a physical interface. A list of available
+interfaces will be shown, and one may be selected, then selecting **Apply**.
+
+!!! note
+
+ When you press the Start button to instantiate your topology, the
+ interface assigned to the RJ45 will be connected to the CORE topology. The
+ interface can no longer be used by the system.
+
+### Multiple RJ45s with One Interface (VLAN)
+
+It is possible to have multiple RJ45 nodes using the same physical interface
+by leveraging 802.1x VLANs. This allows for more RJ45 nodes than physical ports
+are available, but the (e.g. switching) hardware connected to the physical port
+must support the VLAN tagging, and the available bandwidth will be shared.
+
+You need to create separate VLAN virtual devices on the Linux host,
+and then assign these devices to RJ45 nodes inside of CORE. The VLANing is
+actually performed outside of CORE, so when the CORE emulated node receives a
+packet, the VLAN tag will already be removed.
+
+Here are example commands for creating VLAN devices under Linux:
+
+```shell
+ip link add link eth0 name eth0.1 type vlan id 1
+ip link add link eth0 name eth0.2 type vlan id 2
+ip link add link eth0 name eth0.3 type vlan id 3
+```
+
+## Tunnel Tool
+
+The tunnel tool builds GRE tunnels between CORE emulations or other hosts.
+Tunneling can be helpful when the number of physical interfaces is limited or
+when the peer is located on a different network. In this case a physical interface does
+not need to be dedicated to CORE as with the RJ45 tool.
+
+The peer GRE tunnel endpoint may be another CORE machine or another
+host that supports GRE tunneling. When placing a Tunnel node, initially
+the node will display "UNASSIGNED". This text should be replaced with the IP
+address of the tunnel peer. This is the IP address of the other CORE machine or
+physical machine, not an IP address of another virtual node.
+
+!!! note
+
+ Be aware of possible MTU (Maximum Transmission Unit) issues with GRE devices.
+ The *gretap* device has an interface MTU of 1,458 bytes; when joined to a Linux
+ bridge, the bridge's MTU becomes 1,458 bytes. The Linux bridge will not perform
+ fragmentation for large packets if other bridge ports have a higher MTU such
+ as 1,500 bytes.
+
+The GRE key is used to identify flows with GRE tunneling. This allows multiple
+GRE tunnels to exist between that same pair of tunnel peers. A unique number
+should be used when multiple tunnels are used with the same peer. When
+configuring the peer side of the tunnel, ensure that the matching keys are
+used.
+
+### Example Usage
+
+Here are example commands for building the other end of a tunnel on a Linux
+machine. In this example, a router in CORE has the virtual address
+**10.0.0.1/24** and the CORE host machine has the (real) address
+**198.51.100.34/24**. The Linux box
+that will connect with the CORE machine is reachable over the (real) network
+at **198.51.100.76/24**.
+The emulated router is linked with the Tunnel Node. In the
+Tunnel Node configuration dialog, the address **198.51.100.76** is entered, with
+the key set to **1**. The gretap interface on the Linux box will be assigned
+an address from the subnet of the virtual router node,
+**10.0.0.2/24**.
+
+```shell
+# these commands are run on the tunnel peer
+sudo ip link add gt0 type gretap remote 198.51.100.34 local 198.51.100.76 key 1
+sudo ip addr add 10.0.0.2/24 dev gt0
+sudo ip link set dev gt0 up
+```
+
+Now the virtual router should be able to ping the Linux machine:
+
+```shell
+# from the CORE router node
+ping 10.0.0.2
+```
+
+And the Linux machine should be able to ping inside the CORE emulation:
+
+```shell
+# from the tunnel peer
+ping 10.0.0.1
+```
+
+To debug this configuration, **tcpdump** can be run on the gretap devices, or
+on the physical interfaces on the CORE or Linux machines. Make sure that a
+firewall is not blocking the GRE traffic.
diff --git a/docs/index.md b/docs/index.md
index f516b648..4afec59f 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -2,34 +2,17 @@
## Introduction
-CORE (Common Open Research Emulator) is a tool for building virtual networks. As an emulator, CORE builds a representation of a real computer network that runs in real time, as opposed to simulation, where abstract models are used. The live-running emulation can be connected to physical networks and routers. It provides an environment for running real applications and protocols, taking advantage of virtualization provided by the Linux operating system.
+CORE (Common Open Research Emulator) is a tool for building virtual networks. As an emulator, CORE builds a
+representation of a real computer network that runs in real time, as opposed to simulation, where abstract models are
+used. The live-running emulation can be connected to physical networks and routers. It provides an environment for
+running real applications and protocols, taking advantage of tools provided by the Linux operating system.
-CORE is typically used for network and protocol research, demonstrations, application and platform testing, evaluating networking scenarios, security studies, and increasing the size of physical test networks.
+CORE is typically used for network and protocol research, demonstrations, application and platform testing, evaluating
+networking scenarios, security studies, and increasing the size of physical test networks.
### Key Features
+
* Efficient and scalable
* Runs applications and protocols without modification
* Drag and drop GUI
* Highly customizable
-
-## Topics
-
-* [Architecture](architecture.md)
-* [Installation](install.md)
-* [Usage](usage.md)
-* [Python Scripting](scripting.md)
-* [Node Types](machine.md)
-* [CTRLNET](ctrlnet.md)
-* [Services](services.md)
-* [EMANE](emane.md)
-* [NS3](ns3.md)
-* [Performance](performance.md)
-* [Developers Guide](devguide.md)
-
-## Credits
-
-The CORE project was derived from the open source IMUNES project from the University of Zagreb in 2004. In 2006, changes for CORE were released back to that project, some items of which were adopted. Marko Zec is the primary developer from the University of Zagreb responsible for the IMUNES (GUI) and VirtNet (kernel) projects. Ana Kukec and Miljenko Mikuc are known contributors.
-
-Jeff Ahrenholz has been the primary Boeing developer of CORE, and has written this manual. Tom Goff designed the Python framework and has made significant contributions. Claudiu Danilov, Rod Santiago, Kevin Larson, Gary Pei, Phil Spagnolo, and Ian Chakeres have contributed code to CORE. Dan Mackley helped develop the CORE API, originally to interface with a simulator. Jae Kim and Tom Henderson have supervised the project and provided direction.
-
-Copyright (c) 2005-2018, the Boeing Company.
diff --git a/docs/install.md b/docs/install.md
index fb161f78..51c05dbc 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -1,314 +1,407 @@
+# Installation
-# CORE Installation
+!!! warning
-* Table of Contents
-{:toc}
+ If Docker is installed, the default iptable rules will block CORE traffic
-# Overview
+## Overview
-This section will describe how to set up a CORE machine. Note that the easiest way to install CORE is using a binary package on Ubuntu or Fedora/CentOS (deb or rpm) using the distribution's package manager to automatically install dependencies.
+CORE currently supports and provides the following installation options, with the package
+option being preferred.
-Ubuntu and Fedora/CentOS Linux are the recommended distributions for running CORE. However, these distributions are not strictly required. CORE will likely work on other flavors of Linux as well.
+* [Package based install (rpm/deb)](#package-based-install)
+* [Script based install](#script-based-install)
+* [Dockerfile based install](#dockerfile-based-install)
-The primary dependencies are Tcl/Tk (8.5 or newer) for the GUI, and Python 2.7 for the CORE daemon.
+### Requirements
-CORE files are installed to the following directories, when the installation prefix is */usr*.
+Any computer capable of running Linux should be able to run CORE. Since the physical machine will be hosting numerous
+containers, as a general rule you should select a machine having as much RAM and CPU resources as possible.
-Install Path | Description
--------------|------------
-/usr/bin/core-gui|GUI startup command
-/usr/bin/core-daemon|Daemon startup command
-/usr/bin/|Misc. helper commands/scripts
-/usr/lib/core|GUI files
-/usr/lib/python2.7/dist-packages/core|Python modules for daemon/scripts
-/etc/core/|Daemon configuration files
-~/.core/|User-specific GUI preferences and scenario files
-/usr/share/core/|Example scripts and scenarios
-/usr/share/man/man1/|Command man pages
-/etc/init.d/core-daemon|SysV startup script for daemon
-/etc/systemd/system/core-daemon.service|Systemd startup script for daemon
+* Linux Kernel v3.3+
+* iproute2 4.5+ is a requirement for bridge related commands
+* nftables compatible kernel and nft command line tool
-## Prerequisites
+### Supported Linux Distributions
-A Linux operating system is required. The GUI uses the Tcl/Tk scripting toolkit, and the CORE daemon requires Python. Details of the individual software packages required can be found in the installation steps.
+Plan is to support recent Ubuntu and CentOS LTS releases.
-## Required Hardware
+Verified:
-Any computer capable of running Linux should be able to run CORE. Since the physical machine will be hosting numerous virtual machines, as a general rule you should select a machine having as much RAM and CPU resources as possible.
+* Ubuntu - 18.04, 20.04, 22.04
+* CentOS - 7.8
-## Required Software
+### Files
-CORE requires a Linux operating system because it uses virtualization provided by the kernel. It does not run on Windows or Mac OS X operating systems (unless it is running within a virtual machine guest.) The virtualization technology that CORE currently uses is Linux network namespaces.
+The following is a list of files that would be installed after installation.
-The CORE GUI requires the X.Org X Window system (X11), or can run over a remote X11 session. For specific Tcl/Tk, Python, and other libraries required to run CORE.
+* executables
+ * `/bin/{vcmd, vnode}`
+ * can be adjusted using script based install , package will be /usr
+* python files
+ * virtual environment `/opt/core/venv`
+ * local install will be local to the python version used
+ * `python3 -c "import core; print(core.__file__)"`
+ * scripts {core-daemon, core-cleanup, etc}
+ * virtualenv `/opt/core/venv/bin`
+ * local `/usr/local/bin`
+* configuration files
+ * `/etc/core/{core.conf, logging.conf}`
+* ospf mdr repository files when using script based install
+ * `/../ospf-mdr`
-**NOTE: CORE *Services* determine what run on each node. You may require other software packages depending on the services you wish to use. For example, the *HTTP* service will require the *apache2* package.**
+### Installed Scripts
-## Installing from Packages
+The following python scripts are provided.
-The easiest way to install CORE is using the pre-built packages. The package managers on Ubuntu or Fedora/CentOS will automatically install dependencies for you. You can obtain the CORE packages from [CORE GitHub](https://github.com/coreemu/core/releases).
+| Name | Description |
+|---------------------|------------------------------------------------------------------------------|
+| core-cleanup | tool to help removed lingering core created containers, bridges, directories |
+| core-cli | tool to query, open xml files, and send commands using gRPC |
+| core-daemon | runs the backed core server providing a gRPC API |
+| core-gui | starts GUI |
+| core-python | provides a convenience for running the core python virtual environment |
+| core-route-monitor | tool to help monitor traffic across nodes and feed that to SDT |
+| core-service-update | tool to update automate modifying a legacy service to match current naming |
-### Installing from Packages on Ubuntu
+### Upgrading from Older Release
-Install Quagga for routing. If you plan on working with wireless networks, we recommend installing [OSPF MDR](http://www.nrl.navy.mil/itd/ncs/products/ospf-manet) (replace *amd64* below with *i386* if needed to match your architecture):
+Please make sure to uninstall any previous installations of CORE cleanly
+before proceeding to install.
+
+Clearing out a current install from 7.0.0+, making sure to provide options
+used for install (`-l` or `-p`).
```shell
-wget https://downloads.pf.itd.nrl.navy.mil/ospf-manet/quagga-0.99.21mr2.2/quagga-mr_0.99.21mr2.2_amd64.deb
-sudo dpkg -i quagga-mr_0.99.21mr2.2_amd64.deb
+cd
+inv uninstall
```
-Or, for the regular Ubuntu version of Quagga:
+Previous install was built from source for CORE release older than 7.0.0:
```shell
-sudo apt-get install quagga
+cd
+sudo make uninstall
+make clean
+./bootstrap.sh clean
```
-Install the CORE deb packages for Ubuntu from command line.
+Installed from previously built packages:
```shell
-sudo dpkg -i python-core_*.deb
-sudo dpkg -i core-gui_*.deb
+# centos
+sudo yum remove core
+# ubuntu
+sudo apt remove core
```
-Start the CORE daemon as root, the systemd installation will auto start the daemon, but you can use the commands below if need be.
+## Installation Examples
+
+The below links will take you to sections providing complete examples for installing
+CORE and related utilities on fresh installations. Otherwise, a breakdown for installing
+different components and the options available are detailed below.
+
+* [Ubuntu 22.04](install_ubuntu.md)
+* [CentOS 7](install_centos.md)
+
+## Package Based Install
+
+Starting with 9.0.0 there are pre-built rpm/deb packages. You can retrieve the
+rpm/deb package from [releases](https://github.com/coreemu/core/releases) page.
+
+The built packages will require and install system level dependencies, as well as running
+a post install script to install the provided CORE python wheel. A similar uninstall script
+is ran when uninstalling and would require the same options as given, during the install.
+
+!!! note
+
+ PYTHON defaults to python3 for installs below, CORE requires python3.9+, pip,
+ tk compatibility for python gui, and venv for virtual environments
+
+Examples for install:
```shell
-# systemd
-sudo systemctl start core-daemon
-
-# sysv
-sudo service core-daemon start
+# recommended to upgrade to the latest version of pip before installation
+# in python, can help avoid building from source issues
+sudo -m pip install --upgrade pip
+# install vcmd/vnoded, system dependencies,
+# and core python into a venv located at /opt/core/venv
+sudo install -y ./
+# disable the venv and install to python directly
+sudo NO_VENV=1 install -y ./
+# change python executable used to install for venv or direct installations
+sudo PYTHON=python3.9 install -y ./
+# disable venv and change python executable
+sudo NO_VENV=1 PYTHON=python3.9 install -y ./
+# skip installing the python portion entirely, as you plan to carry this out yourself
+# core python wheel is located at /opt/core/core--py3-none-any.whl
+sudo NO_PYTHON=1 install -y ./
+# install python wheel into python of your choosing
+sudo -m pip install /opt/core/core--py3-none-any.whl
```
-Run the CORE GUI as a normal user:
+Example for removal, requires using the same options as install:
```shell
-core-gui
+# remove a standard install
+sudo remove core
+# remove a local install
+sudo NO_VENV=1 remove core
+# remove install using alternative python
+sudo PYTHON=python3.9 remove core
+# remove install using alternative python and local install
+sudo NO_VENV=1 PYTHON=python3.9 remove core
+# remove install and skip python uninstall
+sudo NO_PYTHON=1 remove core
```
-After running the *core-gui* command, a GUI should appear with a canvas for drawing topologies. Messages will print out on the console about connecting to the CORE daemon.
+### Installing OSPF MDR
-### Installing from Packages on Fedora/CentOS
-
-The commands shown here should be run as root. The *x86_64* architecture is shown in the examples below, replace with *i686* is using a 32-bit architecture.
-
-**CentOS 7 Only: in order to install *tkimg* package you must build from source.**
-
-Make sure the system is up to date.
+You will need to manually install OSPF MDR for routing nodes, since this is not
+provided by the package.
```shell
-yum update
-```
-
-**Optional (Fedora 17+): Fedora 17 and newer have an additional prerequisite providing the required netem kernel modules (otherwise skip this step and have the package manager install it for you.)**
-
-```shell
-yum install kernel-modules-extra
-```
-
-Install Quagga for routing. If you plan on working with wireless networks, we recommend installing [OSPF MDR](http://www.nrl.navy.mil/itd/ncs/products/ospf-manet):
-
-```shell
-wget https://downloads.pf.itd.nrl.navy.mil/ospf-manet/quagga-0.99.21mr2.2/quagga-0.99.21mr2.2-1.el6.x86_64.rpm
-sudo yum install quagga-0.99.21mr2.2-1.el6.x86_64.rpm
-```
-
-Or, for the regular Fedora/CentOS version of Quagga:
-
-```shell
-yum install quagga
-```
-
-Install the CORE RPM packages and automatically resolve dependencies:
-
-```shell
-yum install python-core_*.rpm
-yum install core-gui_*.rpm
-```
-
-Turn off SELINUX by setting *SELINUX=disabled* in the */etc/sysconfig/selinux* file, and adding *selinux=0* to the kernel line in your */etc/grub.conf* file; on Fedora 15 and newer, disable sandboxd using ```chkconfig sandbox off```; you need to reboot in order for this change to take effect
-
-Turn off firewalls:
-
-```shell
-systemctl disable firewalld
-systemctl disable iptables.service
-systemctl disable ip6tables.service
-chkconfig iptables off
-chkconfig ip6tables off
-```
-
-You need to reboot after making these changes, or flush the firewall using
-
-```shell
-iptables -F
-ip6tables -F
-```
-
-Start the CORE daemon as root.
-
-```shell
-# systemd
-sudo systemctl daemon-reload
-sudo systemctl start core-daemon
-
-# sysv
-sudo service core-daemon start
-```
-
-Run the CORE GUI as a normal user:
-
-```shell
-core-gui
-```
-
-After running the *core-gui* command, a GUI should appear with a canvas for drawing topologies. Messages will print out on the console about connecting to the CORE daemon.
-
-### Installing from Source
-
-This option is listed here for developers and advanced users who are comfortable patching and building source code. Please consider using the binary packages instead for a simplified install experience.
-
-To build CORE from source on Ubuntu, first install these development packages. These packages are not required for normal binary package installs.
-
-#### Ubuntu 18.04 pre-reqs
-
-```shell
-sudo apt install automake pkg-config gcc libev-dev bridge-utils ebtables python-dev python-sphinx python-setuptools python-lxml python-enum34 tk libtk-img
-```
-
-#### Ubuntu 16.04 Requirements
-
-```shell
-sudo apt-get install automake bridge-utils ebtables python-dev libev-dev python-sphinx python-setuptools python-enum34 python-lxml libtk-img
-```
-
-
-#### CentOS 7 with Gnome Desktop Requirements
-
-```shell
-sudo yum -y install automake gcc python-devel libev-devel python-sphinx tk python-lxml python-enum34
-```
-
-You can obtain the CORE source from the [CORE GitHub](https://github.com/coreemu/core) page. Choose either a stable release version or the development snapshot available in the *nightly_snapshots* directory.
-
-```shell
-tar xzf core-*.tar.gz
-cd core-*
-```
-
-#### Tradional Autotools Build
-```shell
+git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git
+cd ospf-mdr
./bootstrap.sh
-./configure
-make
+./configure --disable-doc --enable-user=root --enable-group=root \
+ --with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
+ --localstatedir=/var/run/quagga
+make -j$(nproc)
sudo make install
```
-#### Build Documentation
+When done see [Post Install](#post-install).
+
+## Script Based Install
+
+The script based installation will install system level dependencies, python library and
+dependencies, as well as dependencies for building CORE.
+
+The script based install also automatically builds and installs OSPF MDR, used by default
+on routing nodes. This can optionally be skipped.
+
+Installaion will carry out the following steps:
+
+* installs system dependencies for building core
+* builds vcmd/vnoded and python grpc files
+* installs core into poetry managed virtual environment or locally, if flag is passed
+* installs systemd service pointing to appropriate python location based on install type
+* clone/build/install working version of [OPSF MDR](https://github.com/USNavalResearchLaboratory/ospf-mdr)
+
+!!! note
+
+ Installing locally comes with its own risks, it can result it potential
+ dependency conflicts with system package manager installed python dependencies
+
+!!! note
+
+ Provide a prefix that will be found on path when running as sudo,
+ if the default prefix /usr/local will not be valid
+
+The following tools will be leveraged during installation:
+
+| Tool | Description |
+|---------------------------------------------|-----------------------------------------------------------------------|
+| [pip](https://pip.pypa.io/en/stable/) | used to install pipx |
+| [pipx](https://pipxproject.github.io/pipx/) | used to install standalone python tools (invoke, poetry) |
+| [invoke](http://www.pyinvoke.org/) | used to run provided tasks (install, uninstall, reinstall, etc) |
+| [poetry](https://python-poetry.org/) | used to install python virtual environment or building a python wheel |
+
+First we will need to clone and navigate to the CORE repo.
+
```shell
-./bootstrap.sh
-./configure
-make doc
+# clone CORE repo
+git clone https://github.com/coreemu/core.git
+cd core
+
+# install dependencies to run installation task
+./setup.sh
+# skip installing system packages, due to using python built from source
+NO_SYSTEM=1 ./setup.sh
+
+# run the following or open a new terminal
+source ~/.bashrc
+
+# Ubuntu
+inv install
+# CentOS
+inv install -p /usr
+# optionally skip python system packages
+inv install --no-python
+# optionally skip installing ospf mdr
+inv install --no-ospf
+
+# install command options
+Usage: inv[oke] [--core-opts] install [--options] [other tasks here ...]
+
+Docstring:
+ install core, poetry, scripts, service, and ospf mdr
+
+Options:
+ -d, --dev install development mode
+ -i STRING, --install-type=STRING used to force an install type, can be one of the following (redhat, debian)
+ -l, --local determines if core will install to local system, default is False
+ -n, --no-python avoid installing python system dependencies
+ -o, --[no-]ospf disable ospf installation
+ -p STRING, --prefix=STRING prefix where scripts are installed, default is /usr/local
+ -v, --verbose
```
-#### Build Packages
-Install fpm: http://fpm.readthedocs.io/en/latest/installing.html
-Build package commands, DESTDIR is used for gui packaging only
+When done see [Post Install](#post-install).
+
+### Unsupported Linux Distribution
+
+For unsupported OSs you could attempt to do the following to translate
+an installation to your use case.
+
+* make sure you have python3.9+ with venv support
+* make sure you have python3 invoke available to leverage `/tasks.py`
```shell
-./bootstrap.sh
-./configure
-make
-mkdir /tmp/core-gui
-make fpm DESTDIR=/tmp/core-gui
-
-```
-This will produce:
-
-* CORE GUI rpm/deb files
- * core-gui_$VERSION_$ARCH
-* CORE ns3 rpm/deb files
- * python-core-ns3_$VERSION_$ARCH
-* CORE python rpm/deb files for SysV and systemd service types
- * python-core-sysv_$VERSION_$ARCH
- * python-core-systemd_$VERSION_$ARCH
-
-
-### Quagga Routing Software
-
-Virtual networks generally require some form of routing in order to work (e.g. to automatically populate routing tables for routing packets from one subnet to another.) CORE builds OSPF routing protocol configurations by default when the blue router node type is used. The OSPF protocol is available from the [Quagga open source routing suit](http://www.quagga.net).
-
-Quagga is not specified as a dependency for the CORE packages because there are two different Quagga packages that you may use:
-
-* [Quagga](http://www.quagga.net) - the standard version of Quagga, suitable for static wired networks, and usually available via your distribution's package manager.
-
-* [OSPF MANET Designated Routers](http://www.nrl.navy.mil/itd/ncs/products/ospf-manet) (MDR) - the Quagga routing suite with a modified version of OSPFv3, optimized for use with mobile wireless networks. The *mdr* node type (and the MDR service) requires this variant of Quagga.
-
-If you plan on working with wireless networks, we recommend installing OSPF MDR; otherwise install the standard version of Quagga using your package manager or from source.
-
-#### Installing Quagga from Packages
-
-To install the standard version of Quagga from packages, use your package manager (Linux).
-
-Ubuntu users:
-
-```shell
-sudo apt-get install quagga
+# this will print the commands that would be ran for a given installation
+# type without actually running them, they may help in being used as
+# the basis for translating to your OS
+inv install --dry -v -p -i
```
-Fedora/CentOS users:
+## Dockerfile Based Install
+
+You can leverage one of the provided Dockerfiles, to run and launch CORE within a Docker container.
+
+Since CORE nodes will leverage software available within the system for a given use case,
+make sure to update and build the Dockerfile with desired software.
```shell
-sudo yum install quagga
+# clone core
+git clone https://github.com/coreemu/core.git
+cd core
+# build image
+sudo docker build -t core -f dockerfiles/Dockerfile. .
+# start container
+sudo docker run -itd --name core -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw --privileged core
+# enable xhost access to the root user
+xhost +local:root
+# launch core-gui
+sudo docker exec -it core core-gui
```
-To install the Quagga variant having OSPFv3 MDR, first download the appropriate package, and install using the package manager.
+When done see [Post Install](#post-install).
+
+## Installing EMANE
+
+!!! note
+
+ Installing EMANE for the virtual environment is known to work for 1.21+
+
+The recommended way to install EMANE is using prebuilt packages, otherwise
+you can follow their instructions for installing from source. Installation
+information can be found [here](https://github.com/adjacentlink/emane/wiki/Install).
+
+There is an invoke task to help install the EMANE bindings into the CORE virtual
+environment, when needed. An example for running the task is below and the version
+provided should match the version of the packages installed.
+
+You will also need to make sure, you are providing the correct python binary where CORE
+is being used.
+
+Also, these EMANE bindings need to be built using `protoc` 3.19+. So make sure
+that is available and being picked up on PATH properly.
+
+Examples for building and installing EMANE python bindings for use in CORE:
-Ubuntu users:
```shell
-wget https://downloads.pf.itd.nrl.navy.mil/ospf-manet/quagga-0.99.21mr2.2/quagga-mr_0.99.21mr2.2_amd64.deb
-sudo dpkg -i quagga-mr_0.99.21mr2.2_amd64.deb
+# if your system does not have protoc 3.19+
+wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip
+mkdir protoc
+unzip protoc-3.19.6-linux-x86_64.zip -d protoc
+git clone https://github.com/adjacentlink/emane.git
+cd emane
+git checkout v1.3.3
+./autogen.sh
+PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr
+cd src/python
+PATH=/opt/protoc/bin:$PATH make
+/opt/core/venv/bin/python -m pip install .
+
+# when your system has protoc 3.19+
+cd
+# example version tag v1.3.3
+# overriding python used to leverage the default virtualenv install
+PYTHON=/opt/core/venv/bin/python inv install-emane -e
+# local install that uses whatever python3 refers to
+inv install-emane -e
```
-Replace *amd64* with *i686* if using a 32-bit architecture.
+## Post Install
-Fedora/CentOS users:
+After installation completes you are now ready to run CORE.
+
+### Resolving Docker Issues
+
+If you have Docker installed, by default it will change the iptables
+forwarding chain to drop packets, which will cause issues for CORE traffic.
+
+You can temporarily resolve the issue with the following command:
```shell
-wget https://downloads.pf.itd.nrl.navy.mil/ospf-manet/quagga-0.99.21mr2.2/quagga-0.99.21mr2.2-1.el6.x86_64.rpm
-sudo yum install quagga-0.99.21mr2.2-1.el6.x86_64.rpm
-````
-
-Replace *x86_64* with *i686* if using a 32-bit architecture.
-
-#### Compiling Quagga for CORE
-
-To compile Quagga to work with CORE on Linux:
-
-```shell
-wget https://downloads.pf.itd.nrl.navy.mil/ospf-manet/quagga-0.99.21mr2.2/quagga-0.99.21mr2.2.tar.gz
-tar xzf quagga-0.99.21mr2.2.tar.gz
-cd quagga-0.99
-./configure --enable-user=root --enable-group=root --with-cflags=-ggdb \\
- --sysconfdir=/usr/local/etc/quagga --enable-vtysh \\
- --localstatedir=/var/run/quagga
-make
-sudo make install
+sudo iptables --policy FORWARD ACCEPT
```
-Note that the configuration directory */usr/local/etc/quagga* shown for Quagga above could be */etc/quagga*, if you create a symbolic link from */etc/quagga/Quagga.conf -> /usr/local/etc/quagga/Quagga.conf* on the host. The *quaggaboot.sh* script in a Linux network namespace will try and do this for you if needed.
+Alternatively, you can configure Docker to avoid doing this, but will likely
+break normal Docker networking usage. Using the setting below will require
+a restart.
-If you try to run quagga after installing from source and get an error such as:
+Place the file contents below in **/etc/docker/docker.json**
-```shell
-error while loading shared libraries libzebra.so.0
+```json
+{
+ "iptables": false
+}
```
-this is usually a sign that you have to run ```sudo ldconfig```` to refresh the cache file.
+### Resolving Path Issues
-### VCORE
+One problem running CORE you may run into, using the virtual environment or locally
+can be issues related to your path.
-CORE is capable of running inside of a virtual machine, using software such as VirtualBox, VMware Server or QEMU. However, CORE itself is performing machine virtualization in order to realize multiple emulated nodes, and running CORE virtually adds additional contention for the physical resources. **For performance reasons, this is not recommended.** Timing inside of a VM often has problems. If you do run CORE from within a VM, it is recommended that you view the GUI with remote X11 over SSH, so the virtual machine does not need to emulate the video card with the X11 application.
+To add support for your user to run scripts from the virtual environment:
-A CORE virtual machine is provided for download, named VCORE. This is the perhaps the easiest way to get CORE up and running as the machine is already set up for you. This may be adequate for initially evaluating the tool but keep in mind the performance limitations of running within VirtualBox or VMware. To install the virtual machine, you first need to obtain VirtualBox from http://www.virtualbox.org, or VMware Server or Player from http://www.vmware.com (this commercial software is distributed for free.) Once virtualization software has been installed, you can import the virtual machine appliance using the *vbox* file for VirtualBox or the *vmx* file for VMware. See the documentation that comes with VCORE for login information.
+```shell
+# can add to ~/.bashrc
+export PATH=$PATH:/opt/core/venv/bin
+```
+This will not solve the path issue when running as sudo, so you can do either
+of the following to compensate.
+
+```shell
+# run command passing in the right PATH to pickup from the user running the command
+sudo env PATH=$PATH core-daemon
+
+# add an alias to ~/.bashrc or something similar
+alias sudop='sudo env PATH=$PATH'
+# now you can run commands like so
+sudop core-daemon
+```
+
+### Running CORE
+
+The following assumes I have resolved PATH issues and setup the `sudop` alias.
+
+```shell
+# in one terminal run the server daemon using the alias above
+sudop core-daemon
+# in another terminal run the gui client
+core-gui
+```
+
+### Enabling Service
+
+After installation, the core service is not enabled by default. If you desire to use the
+service, run the following commands.
+
+```shell
+sudo systemctl enable core-daemon
+sudo systemctl start core-daemon
+```
diff --git a/docs/install_centos.md b/docs/install_centos.md
new file mode 100644
index 00000000..53de2af6
--- /dev/null
+++ b/docs/install_centos.md
@@ -0,0 +1,144 @@
+# Install CentOS
+
+## Overview
+
+Below is a detailed path for installing CORE and related tooling on a fresh
+CentOS 7 install. Both of the examples below will install CORE into its
+own virtual environment located at **/opt/core/venv**. Both examples below
+also assume using **~/Documents** as the working directory.
+
+## Script Install
+
+This section covers step by step commands that can be used to install CORE using
+the script based installation path.
+
+``` shell
+# install system packages
+sudo yum -y update
+sudo yum install -y git sudo wget tzdata unzip libpcap-devel libpcre3-devel \
+ libxml2-devel protobuf-devel unzip uuid-devel tcpdump make epel-release
+sudo yum-builddep -y python3
+
+# install python3.9
+cd ~/Documents
+wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
+tar xf Python-3.9.15.tgz
+cd Python-3.9.15
+./configure --enable-optimizations --with-ensurepip=install
+sudo make -j$(nproc) altinstall
+python3.9 -m pip install --upgrade pip
+
+# install core
+cd ~/Documents
+git clone https://github.com/coreemu/core
+cd core
+NO_SYSTEM=1 PYTHON=/usr/local/bin/python3.9 ./setup.sh
+source ~/.bashrc
+PYTHON=python3.9 inv install -p /usr --no-python
+
+# install emane
+cd ~/Documents
+wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz
+tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz
+cd emane-1.3.3-release-1/rpms/el7/x86_64
+sudo yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm
+
+# install emane python bindings into CORE virtual environment
+cd ~/Documents
+wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip
+mkdir protoc
+unzip protoc-3.19.6-linux-x86_64.zip -d protoc
+git clone https://github.com/adjacentlink/emane.git
+cd emane
+git checkout v1.3.3
+./autogen.sh
+PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr
+cd src/python
+PATH=~/Documents/protoc/bin:$PATH make
+sudo /opt/core/venv/bin/python -m pip install .
+```
+
+## Package Install
+
+This section covers step by step commands that can be used to install CORE using
+the package based installation path. This will require downloading a package from the release
+page, to use during the install CORE step below.
+
+``` shell
+# install system packages
+sudo yum -y update
+sudo yum install -y git sudo wget tzdata unzip libpcap-devel libpcre3-devel libxml2-devel \
+ protobuf-devel unzip uuid-devel tcpdump automake gawk libreadline-devel libtool \
+ pkg-config make
+sudo yum-builddep -y python3
+
+# install python3.9
+cd ~/Documents
+wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
+tar xf Python-3.9.15.tgz
+cd Python-3.9.15
+./configure --enable-optimizations --with-ensurepip=install
+sudo make -j$(nproc) altinstall
+python3.9 -m pip install --upgrade pip
+
+# install core
+cd ~/Documents
+sudo PYTHON=python3.9 yum install -y ./core_*.rpm
+
+# install ospf mdr
+cd ~/Documents
+git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git
+cd ospf-mdr
+./bootstrap.sh
+./configure --disable-doc --enable-user=root --enable-group=root \
+ --with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
+ --localstatedir=/var/run/quagga
+make -j$(nproc)
+sudo make install
+
+# install emane
+cd ~/Documents
+wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz
+tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz
+cd emane-1.3.3-release-1/rpms/el7/x86_64
+sudo yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm
+
+# install emane python bindings into CORE virtual environment
+cd ~/Documents
+wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip
+mkdir protoc
+unzip protoc-3.19.6-linux-x86_64.zip -d protoc
+git clone https://github.com/adjacentlink/emane.git
+cd emane
+git checkout v1.3.3
+./autogen.sh
+PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr
+cd src/python
+PATH=~/Documents/protoc/bin:$PATH make
+sudo /opt/core/venv/bin/python -m pip install .
+```
+
+## Setup PATH
+
+The CORE virtual environment and related scripts will not be found on your PATH,
+so some adjustments needs to be made.
+
+To add support for your user to run scripts from the virtual environment:
+
+```shell
+# can add to ~/.bashrc
+export PATH=$PATH:/opt/core/venv/bin
+```
+
+This will not solve the path issue when running as sudo, so you can do either
+of the following to compensate.
+
+```shell
+# run command passing in the right PATH to pickup from the user running the command
+sudo env PATH=$PATH core-daemon
+
+# add an alias to ~/.bashrc or something similar
+alias sudop='sudo env PATH=$PATH'
+# now you can run commands like so
+sudop core-daemon
+```
diff --git a/docs/install_ubuntu.md b/docs/install_ubuntu.md
new file mode 100644
index 00000000..57274a4f
--- /dev/null
+++ b/docs/install_ubuntu.md
@@ -0,0 +1,116 @@
+# Install Ubuntu
+
+## Overview
+
+Below is a detailed path for installing CORE and related tooling on a fresh
+Ubuntu 22.04 installation. Both of the examples below will install CORE into its
+own virtual environment located at **/opt/core/venv**. Both examples below
+also assume using **~/Documents** as the working directory.
+
+## Script Install
+
+This section covers step by step commands that can be used to install CORE using
+the script based installation path.
+
+``` shell
+# install system packages
+sudo apt-get update -y
+sudo apt-get install -y ca-certificates git sudo wget tzdata libpcap-dev libpcre3-dev \
+ libprotobuf-dev libxml2-dev protobuf-compiler unzip uuid-dev iproute2 iputils-ping \
+ tcpdump
+
+# install core
+cd ~/Documents
+git clone https://github.com/coreemu/core
+cd core
+./setup.sh
+source ~/.bashrc
+inv install
+
+# install emane
+cd ~/Documents
+wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip
+mkdir protoc
+unzip protoc-3.19.6-linux-x86_64.zip -d protoc
+git clone https://github.com/adjacentlink/emane.git
+cd emane
+./autogen.sh
+./configure --prefix=/usr
+make -j$(nproc)
+sudo make install
+cd src/python
+make clean
+PATH=~/Documents/protoc/bin:$PATH make
+sudo /opt/core/venv/bin/python -m pip install .
+```
+
+## Package Install
+
+This section covers step by step commands that can be used to install CORE using
+the package based installation path. This will require downloading a package from the release
+page, to use during the install CORE step below.
+
+``` shell
+# install system packages
+sudo apt-get update -y
+sudo apt-get install -y ca-certificates python3 python3-tk python3-pip python3-venv \
+ libpcap-dev libpcre3-dev libprotobuf-dev libxml2-dev protobuf-compiler unzip \
+ uuid-dev automake gawk git wget libreadline-dev libtool pkg-config g++ make \
+ iputils-ping tcpdump
+
+# install core
+cd ~/Documents
+sudo apt-get install -y ./core_*.deb
+
+# install ospf mdr
+cd ~/Documents
+git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git
+cd ospf-mdr
+./bootstrap.sh
+./configure --disable-doc --enable-user=root --enable-group=root \
+ --with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
+ --localstatedir=/var/run/quagga
+make -j$(nproc)
+sudo make install
+
+# install emane
+cd ~/Documents
+wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip
+mkdir protoc
+unzip protoc-3.19.6-linux-x86_64.zip -d protoc
+git clone https://github.com/adjacentlink/emane.git
+cd emane
+./autogen.sh
+./configure --prefix=/usr
+make -j$(nproc)
+sudo make install
+cd src/python
+make clean
+PATH=~/Documents/protoc/bin:$PATH make
+sudo /opt/core/venv/bin/python -m pip install .
+```
+
+## Setup PATH
+
+The CORE virtual environment and related scripts will not be found on your PATH,
+so some adjustments needs to be made.
+
+To add support for your user to run scripts from the virtual environment:
+
+```shell
+# can add to ~/.bashrc
+export PATH=$PATH:/opt/core/venv/bin
+```
+
+This will not solve the path issue when running as sudo, so you can do either
+of the following to compensate.
+
+```shell
+# run command passing in the right PATH to pickup from the user running the command
+sudo env PATH=$PATH core-daemon
+
+# add an alias to ~/.bashrc or something similar
+alias sudop='sudo env PATH=$PATH'
+# now you can run commands like so
+sudop core-daemon
+```
diff --git a/docs/lxc.md b/docs/lxc.md
new file mode 100644
index 00000000..1ee11453
--- /dev/null
+++ b/docs/lxc.md
@@ -0,0 +1,43 @@
+# LXC Support
+
+## Overview
+
+LXC nodes are provided by way of LXD to create nodes using predefined
+images and provide file system separation.
+
+## Installation
+
+### Debian Systems
+
+```shell
+sudo snap install lxd
+```
+
+## Configuration
+
+Initialize LXD and say no to adding a default bridge.
+
+```shell
+sudo lxd init
+```
+
+## Group Setup
+
+To use LXC nodes within the python GUI, you will need to make sure the user running the GUI is a member of the
+lxd group.
+
+```shell
+# add group if does not exist
+sudo groupadd lxd
+
+# add user to group
+sudo usermod -aG lxd $USER
+
+# to get this change to take effect, log out and back in or run the following
+newgrp lxd
+```
+
+## Tools and Versions Tested With
+
+* LXD 3.14
+* nsenter from util-linux 2.31.1
diff --git a/docs/machine.md b/docs/machine.md
deleted file mode 100644
index bd68d7e1..00000000
--- a/docs/machine.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# CORE Node Types
-
-* Table of Contents
-{:toc}
-
-## Overview
-
-Different node types can be configured in CORE, and each node type has a *machine type* that indicates how the node will be represented at run time. Different machine types allow for different virtualization options.
-
-## netns nodes
-
-The *netns* machine type is the default. This is for nodes that will be backed by Linux network namespaces. See :ref:`Linux` for a brief explanation of netns. This default machine type is very lightweight, providing a minimum amount of virtualization in order to emulate a network. Another reason this is designated as the default machine type is because this virtualization technology typically requires no changes to the kernel; it is available out-of-the-box from the latest mainstream Linux distributions.
-
-## physical nodes
-
-The *physical* machine type is used for nodes that represent a real Linux-based machine that will participate in the emulated network scenario. This is typically used, for example, to incorporate racks of server machines from an emulation testbed. A physical node is one that is running the CORE daemon (*core-daemon*), but will not be further partitioned into virtual machines. Services that are run on the physical node do not run in an isolated or virtualized environment, but directly on the operating system.
-
-Physical nodes must be assigned to servers, the same way nodes are assigned to emulation servers with *Distributed Emulation*. The list of available physical nodes currently shares the same dialog box and list as the emulation servers, accessed using the *Emulation Servers...* entry from the *Session* menu.
-
-Support for physical nodes is under development and may be improved in future releases. Currently, when any node is linked to a physical node, a dashed line is drawn to indicate network tunneling. A GRE tunneling interface will be created on the physical node and used to tunnel traffic to and from the emulated world.
-
-Double-clicking on a physical node during runtime opens a terminal with an SSH shell to that node. Users should configure public-key SSH login as done with emulation servers.
diff --git a/docs/nodetypes.md b/docs/nodetypes.md
new file mode 100644
index 00000000..8f095746
--- /dev/null
+++ b/docs/nodetypes.md
@@ -0,0 +1,53 @@
+# Node Types
+
+## Overview
+
+Different node types can be used within CORE, each with their own
+tradeoffs and functionality.
+
+## CORE Nodes
+
+CORE nodes are the standard node type typically used in CORE. They are
+backed by Linux network namespaces. They use very little system resources
+in order to emulate a network. They do however share the hosts file system
+as they do not get their own. CORE nodes will have a directory uniquely
+created for them as a place to keep their files and mounted directories
+(`/tmp/pycore./
-```
-
-The interactive Python shell allows some interaction with the Python objects for the emulation.
-
-In another terminal, nodes can be accessed using *vcmd*:
-
-```shell
-vcmd -c /tmp/pycore.10781/n1 -- bash
-root@n1:/tmp/pycore.10781/n1.conf#
-root@n1:/tmp/pycore.10781/n1.conf# ping 10.0.0.3
-PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
-64 bytes from 10.0.0.3: icmp_req=1 ttl=64 time=7.99 ms
-64 bytes from 10.0.0.3: icmp_req=2 ttl=64 time=3.73 ms
-64 bytes from 10.0.0.3: icmp_req=3 ttl=64 time=3.60 ms
-^C
---- 10.0.0.3 ping statistics ---
-3 packets transmitted, 3 received, 0% packet loss, time 2002ms
-rtt min/avg/max/mdev = 3.603/5.111/7.993/2.038 ms
-root@n1:/tmp/pycore.10781/n1.conf#
-```
-
-The ping packets shown above are traversing an ns-3 ad-hoc Wifi simulated network.
-
-To clean up the session, use the Session.shutdown() method from the Python terminal.
-
-```python
-print session
-
-session.shutdown()
-```
-
-A CORE/ns-3 Python script will instantiate an Ns3Session, which is a CORE Session having CoreNs3Nodes, an ns-3 MobilityHelper, and a fixed duration. The CoreNs3Node inherits from both the CoreNode and the ns-3 Node classes -- it is a network namespace having an associated simulator object. The CORE TunTap interface is used, represented by a ns-3 TapBridge in *CONFIGURE_LOCAL* mode, where ns-3 creates and configures the tap device. An event is scheduled to install the taps at time 0.
-
-**NOTE: The GUI can be used to run the *ns3wifi.py* and *ns3wifirandomwalk.py* scripts directly. First, *core-daemon* must be stopped and run within the waf root shell. Then the GUI may be run as a normal user, and the *Execute Python Script...* option may be used from the *File* menu. Dragging nodes around in the *ns3wifi.py* example will cause their ns-3 positions to be updated.**
-
-Users may find the files *ns3wimax.py* and *ns3lte.py* in that example directory; those files were similarly configured, but the underlying ns-3 support is not present as of ns-3.16, so they will not work. Specifically, the ns-3 has to be extended to support bridging the Tap device to an LTE and a WiMax device.
-
-## Integration details
-
-The previous example *ns3wifi.py* used Python API from the special Python objects *Ns3Session* and *Ns3WifiNet*. The example program does not import anything directly from the ns-3 python modules; rather, only the above two objects are used, and the API available to configure the underlying ns-3 objects is constrained. For example, *Ns3WifiNet* instantiates a constant-rate 802.11a-based ad hoc network, using a lot of ns-3 defaults.
-
-However, programs may be written with a blend of ns-3 API and CORE Python API calls. This section examines some of the fundamental objects in the CORE ns-3 support. Source code can be found in *ns3/corens3/obj.py* and example code in *ns3/corens3/examples/*.
-
-## Ns3Session
-
-The *Ns3Session* class is a CORE Session that starts an ns-3 simulation thread. ns-3 actually runs as a separate process on the same host as the CORE daemon, and the control of starting and stopping this process is performed by the *Ns3Session* class.
-
-Example:
-
-```python
-session = Ns3Session(persistent=True, duration=opt.duration)
-```
-
-Note the use of the duration attribute to control how long the ns-3 simulation should run. By default, the duration is 600 seconds.
-
-Typically, the session keeps track of the ns-3 nodes (holding a node container for references to the nodes). This is accomplished via the ```addnode()``` method, e.g.:
-
-```python
-for i in xrange(1, opt.numnodes + 1):
- node = session.addnode(name = "n%d" % i)
-```
-
-```addnode()``` creates instances of a *CoreNs3Node*, which we'll cover next.
-
-## CoreNs3Node
-
-A *CoreNs3Node* is both a CoreNode and an ns-3 node:
-
-```python
-class CoreNs3Node(CoreNode, ns.network.Node):
- """
- The CoreNs3Node is both a CoreNode backed by a network namespace and
- an ns-3 Node simulator object. When linked to simulated networks, the TunTap
- device will be used.
- """
-```
-
-## CoreNs3Net
-
-A *CoreNs3Net* derives from *PyCoreNet*. This network exists entirely in simulation, using the TunTap device to interact between the emulated and the simulated realm. *Ns3WifiNet* is a specialization of this.
-
-As an example, this type of code would be typically used to add a WiFi network to a session:
-
-```python
-wifi = session.addobj(cls=Ns3WifiNet, name="wlan1", rate="OfdmRate12Mbps")
-wifi.setposition(30, 30, 0)
-```
-
-The above two lines will create a wlan1 object and set its initial canvas position. Later in the code, the newnetif method of the CoreNs3Node can be used to add interfaces on particular nodes to this network; e.g.:
-
-```python
-for i in xrange(1, opt.numnodes + 1):
- node = session.addnode(name = "n%d" % i)
- node.newnetif(wifi, ["%s/%s" % (prefix.addr(i), prefix.prefixlen)])
-```
-
-## Mobility
-
-Mobility in ns-3 is handled by an object (a MobilityModel) aggregated to an ns-3 node. The MobilityModel is able to report the position of the object in the ns-3 space. This is a slightly different model from, for instance, EMANE, where location is associated with an interface, and the CORE GUI, where mobility is configured by right-clicking on a WiFi cloud.
-
-The CORE GUI supports the ability to render the underlying ns-3 mobility model, if one is configured, on the CORE canvas. For example, the example program :file:`ns3wifirandomwalk.py` uses five nodes (by default) in a random walk mobility model. This can be executed by starting the core daemon from an ns-3 waf shell:
-
-```shell
-sudo bash
-cd /path/to/ns-3
-./waf shell
-core-daemon
-```
-
-and in a separate window, starting the CORE GUI (not from a waf shell) and selecting the *Execute Python script...* option from the File menu, selecting the *ns3wifirandomwalk.py* script.
-
-The program invokes ns-3 mobility through the following statement:
-
-```python
-session.setuprandomwalkmobility(bounds=(1000.0, 750.0, 0))
-```
-
-This can be replaced by a different mode of mobility, in which nodes are placed according to a constant mobility model, and a special API call to the CoreNs3Net object is made to use the CORE canvas positions.
-
-```python
-session.setuprandomwalkmobility(bounds=(1000.0, 750.0, 0))
-session.setupconstantmobility()
-wifi.usecorepositions()
-```
-
-In this mode, the user dragging around the nodes on the canvas will cause CORE to update the position of the underlying ns-3 nodes.
diff --git a/docs/performance.md b/docs/performance.md
index b057dd23..449e3837 100644
--- a/docs/performance.md
+++ b/docs/performance.md
@@ -1,28 +1,44 @@
# CORE Performance
-* Table of Contents
-{:toc}
-
## Overview
-The top question about the performance of CORE is often *how many nodes can it handle?* The answer depends on several factors:
+The top question about the performance of CORE is often *how many nodes can it
+handle?* The answer depends on several factors:
-* Hardware - the number and speed of processors in the computer, the available processor cache, RAM memory, and front-side bus speed may greatly affect overall performance.
-* Operating system version - distribution of Linux and the specific kernel versions used will affect overall performance.
-* Active processes - all nodes share the same CPU resources, so if one or more nodes is performing a CPU-intensive task, overall performance will suffer.
-* Network traffic - the more packets that are sent around the virtual network increases the amount of CPU usage.
-* GUI usage - widgets that run periodically, mobility scenarios, and other GUI interactions generally consume CPU cycles that may be needed for emulation.
+| Factor | Performance Impact |
+|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Hardware | the number and speed of processors in the computer, the available processor cache, RAM memory, and front-side bus speed may greatly affect overall performance. |
+| Operating system version | distribution of Linux and the specific kernel versions used will affect overall performance. |
+| Active processes | all nodes share the same CPU resources, so if one or more nodes is performing a CPU-intensive task, overall performance will suffer. |
+| Network traffic | the more packets that are sent around the virtual network increases the amount of CPU usage. |
+| GUI usage | widgets that run periodically, mobility scenarios, and other GUI interactions generally consume CPU cycles that may be needed for emulation. |
-On a typical single-CPU Xeon 3.0GHz server machine with 2GB RAM running Linux, we have found it reasonable to run 30-75 nodes running OSPFv2 and OSPFv3 routing. On this hardware CORE can instantiate 100 or more nodes, but at that point it becomes critical as to what each of the nodes is doing.
+On a typical single-CPU Xeon 3.0GHz server machine with 2GB RAM running Linux,
+we have found it reasonable to run 30-75 nodes running OSPFv2 and OSPFv3
+routing. On this hardware CORE can instantiate 100 or more nodes, but at
+that point it becomes critical as to what each of the nodes is doing.
-Because this software is primarily a network emulator, the more appropriate question is *how much network traffic can it handle?* On the same 3.0GHz server described above, running Linux, about 300,000 packets-per-second can be pushed through the system. The number of hops and the size of the packets is less important. The limiting factor is the number of times that the operating system needs to handle a packet. The 300,000 pps figure represents the number of times the system as a whole needed to deal with a packet. As more network hops are added, this increases the number of context switches and decreases the throughput seen on the full length of the network path.
+Because this software is primarily a network emulator, the more appropriate
+question is *how much network traffic can it handle?* On the same 3.0GHz
+server described above, running Linux, about 300,000 packets-per-second can
+be pushed through the system. The number of hops and the size of the packets
+is less important. The limiting factor is the number of times that the
+operating system needs to handle a packet. The 300,000 pps figure represents
+the number of times the system as a whole needed to deal with a packet. As
+more network hops are added, this increases the number of context switches
+and decreases the throughput seen on the full length of the network path.
-**NOTE: The right question to be asking is *"how much traffic?"*, not *"how many nodes?"*.**
+!!! note
-For a more detailed study of performance in CORE, refer to the following publications:
+ The right question to be asking is *"how much traffic?"*, not
+ *"how many nodes?"*.
-* J\. Ahrenholz, T. Goff, and B. Adamson, Integration of the CORE and EMANE Network Emulators, Proceedings of the IEEE Military Communications Conference 2011, November 2011.
+For a more detailed study of performance in CORE, refer to the following
+publications:
-* Ahrenholz, J., Comparison of CORE Network Emulation Platforms, Proceedings of the IEEE Military Communications Conference 2010, pp. 864-869, November 2010.
-
-* J\. Ahrenholz, C. Danilov, T. Henderson, and J.H. Kim, CORE: A real-time network emulator, Proceedings of IEEE MILCOM Conference, 2008.
+* J\. Ahrenholz, T. Goff, and B. Adamson, Integration of the CORE and EMANE
+ Network Emulators, Proceedings of the IEEE Military Communications Conference 2011, November 2011.
+* Ahrenholz, J., Comparison of CORE Network Emulation Platforms, Proceedings
+ of the IEEE Military Communications Conference 2010, pp. 864-869, November 2010.
+* J\. Ahrenholz, C. Danilov, T. Henderson, and J.H. Kim, CORE: A real-time
+ network emulator, Proceedings of IEEE MILCOM Conference, 2008.
diff --git a/docs/pycco.css b/docs/pycco.css
deleted file mode 100644
index aef571a5..00000000
--- a/docs/pycco.css
+++ /dev/null
@@ -1,190 +0,0 @@
-/*--------------------- Layout and Typography ----------------------------*/
-body {
- font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
- font-size: 16px;
- line-height: 24px;
- color: #252519;
- margin: 0; padding: 0;
- background: #f5f5ff;
-}
-a {
- color: #261a3b;
-}
- a:visited {
- color: #261a3b;
- }
-p {
- margin: 0 0 15px 0;
-}
-h1, h2, h3, h4, h5, h6 {
- margin: 40px 0 15px 0;
-}
-h2, h3, h4, h5, h6 {
- margin-top: 0;
- }
-#container {
- background: white;
- }
-#container, div.section {
- position: relative;
-}
-#background {
- position: absolute;
- top: 0; left: 580px; right: 0; bottom: 0;
- background: #f5f5ff;
- border-left: 1px solid #e5e5ee;
- z-index: 0;
-}
-#jump_to, #jump_page {
- background: white;
- -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777;
- -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px;
- font: 10px Arial;
- text-transform: uppercase;
- cursor: pointer;
- text-align: right;
-}
-#jump_to, #jump_wrapper {
- position: fixed;
- right: 0; top: 0;
- padding: 5px 10px;
-}
- #jump_wrapper {
- padding: 0;
- display: none;
- }
- #jump_to:hover #jump_wrapper {
- display: block;
- }
- #jump_page {
- padding: 5px 0 3px;
- margin: 0 0 25px 25px;
- }
- #jump_page .source {
- display: block;
- padding: 5px 10px;
- text-decoration: none;
- border-top: 1px solid #eee;
- }
- #jump_page .source:hover {
- background: #f5f5ff;
- }
- #jump_page .source:first-child {
- }
-div.docs {
- float: left;
- max-width: 500px;
- min-width: 500px;
- min-height: 5px;
- padding: 10px 25px 1px 50px;
- vertical-align: top;
- text-align: left;
-}
- .docs pre {
- margin: 15px 0 15px;
- padding-left: 15px;
- }
- .docs p tt, .docs p code {
- background: #f8f8ff;
- border: 1px solid #dedede;
- font-size: 12px;
- padding: 0 0.2em;
- }
- .octowrap {
- position: relative;
- }
- .octothorpe {
- font: 12px Arial;
- text-decoration: none;
- color: #454545;
- position: absolute;
- top: 3px; left: -20px;
- padding: 1px 2px;
- opacity: 0;
- -webkit-transition: opacity 0.2s linear;
- }
- div.docs:hover .octothorpe {
- opacity: 1;
- }
-div.code {
- margin-left: 580px;
- padding: 14px 15px 16px 50px;
- vertical-align: top;
-}
- .code pre, .docs p code {
- font-size: 12px;
- }
- pre, tt, code {
- line-height: 18px;
- font-family: Monaco, Consolas, "Lucida Console", monospace;
- margin: 0; padding: 0;
- }
-div.clearall {
- clear: both;
-}
-
-
-/*---------------------- Syntax Highlighting -----------------------------*/
-td.linenos { background-color: #f0f0f0; padding-right: 10px; }
-span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
-body .hll { background-color: #ffffcc }
-body .c { color: #408080; font-style: italic } /* Comment */
-body .err { border: 1px solid #FF0000 } /* Error */
-body .k { color: #954121 } /* Keyword */
-body .o { color: #666666 } /* Operator */
-body .cm { color: #408080; font-style: italic } /* Comment.Multiline */
-body .cp { color: #BC7A00 } /* Comment.Preproc */
-body .c1 { color: #408080; font-style: italic } /* Comment.Single */
-body .cs { color: #408080; font-style: italic } /* Comment.Special */
-body .gd { color: #A00000 } /* Generic.Deleted */
-body .ge { font-style: italic } /* Generic.Emph */
-body .gr { color: #FF0000 } /* Generic.Error */
-body .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-body .gi { color: #00A000 } /* Generic.Inserted */
-body .go { color: #808080 } /* Generic.Output */
-body .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
-body .gs { font-weight: bold } /* Generic.Strong */
-body .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-body .gt { color: #0040D0 } /* Generic.Traceback */
-body .kc { color: #954121 } /* Keyword.Constant */
-body .kd { color: #954121; font-weight: bold } /* Keyword.Declaration */
-body .kn { color: #954121; font-weight: bold } /* Keyword.Namespace */
-body .kp { color: #954121 } /* Keyword.Pseudo */
-body .kr { color: #954121; font-weight: bold } /* Keyword.Reserved */
-body .kt { color: #B00040 } /* Keyword.Type */
-body .m { color: #666666 } /* Literal.Number */
-body .s { color: #219161 } /* Literal.String */
-body .na { color: #7D9029 } /* Name.Attribute */
-body .nb { color: #954121 } /* Name.Builtin */
-body .nc { color: #0000FF; font-weight: bold } /* Name.Class */
-body .no { color: #880000 } /* Name.Constant */
-body .nd { color: #AA22FF } /* Name.Decorator */
-body .ni { color: #999999; font-weight: bold } /* Name.Entity */
-body .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
-body .nf { color: #0000FF } /* Name.Function */
-body .nl { color: #A0A000 } /* Name.Label */
-body .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
-body .nt { color: #954121; font-weight: bold } /* Name.Tag */
-body .nv { color: #19469D } /* Name.Variable */
-body .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
-body .w { color: #bbbbbb } /* Text.Whitespace */
-body .mf { color: #666666 } /* Literal.Number.Float */
-body .mh { color: #666666 } /* Literal.Number.Hex */
-body .mi { color: #666666 } /* Literal.Number.Integer */
-body .mo { color: #666666 } /* Literal.Number.Oct */
-body .sb { color: #219161 } /* Literal.String.Backtick */
-body .sc { color: #219161 } /* Literal.String.Char */
-body .sd { color: #219161; font-style: italic } /* Literal.String.Doc */
-body .s2 { color: #219161 } /* Literal.String.Double */
-body .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
-body .sh { color: #219161 } /* Literal.String.Heredoc */
-body .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
-body .sx { color: #954121 } /* Literal.String.Other */
-body .sr { color: #BB6688 } /* Literal.String.Regex */
-body .s1 { color: #219161 } /* Literal.String.Single */
-body .ss { color: #19469D } /* Literal.String.Symbol */
-body .bp { color: #954121 } /* Name.Builtin.Pseudo */
-body .vc { color: #19469D } /* Name.Variable.Class */
-body .vg { color: #19469D } /* Name.Variable.Global */
-body .vi { color: #19469D } /* Name.Variable.Instance */
-body .il { color: #666666 } /* Literal.Number.Integer.Long */
diff --git a/docs/python.md b/docs/python.md
new file mode 100644
index 00000000..0985bb8d
--- /dev/null
+++ b/docs/python.md
@@ -0,0 +1,437 @@
+# Python API
+
+## Overview
+
+Writing your own Python scripts offers a rich programming environment with
+complete control over all aspects of the emulation.
+
+The scripts need to be ran with root privileges because they create new network
+namespaces. In general, a CORE Python script does not connect to the CORE
+daemon, in fact the *core-daemon* is just another Python script that uses
+the CORE Python modules and exchanges messages with the GUI.
+
+## Examples
+
+### Node Models
+
+When creating nodes of type `core.nodes.base.CoreNode` these are the default models
+and the services they map to.
+
+* mdr
+ * zebra, OSPFv3MDR, IPForward
+* PC
+ * DefaultRoute
+* router
+ * zebra, OSPFv2, OSPFv3, IPForward
+* host
+ * DefaultRoute, SSH
+
+### Interface Helper
+
+There is an interface helper class that can be leveraged for convenience
+when creating interface data for nodes. Alternatively one can manually create
+a `core.emulator.data.InterfaceData` class instead with appropriate information.
+
+Manually creating interface data:
+
+```python
+from core.emulator.data import InterfaceData
+
+# id is optional and will set to the next available id
+# name is optional and will default to eth
+# mac is optional and will result in a randomly generated mac
+iface_data = InterfaceData(
+ id=0,
+ name="eth0",
+ ip4="10.0.0.1",
+ ip4_mask=24,
+ ip6="2001::",
+ ip6_mask=64,
+)
+```
+
+Leveraging the interface prefixes helper class:
+
+```python
+from core.emulator.data import IpPrefixes
+
+ip_prefixes = IpPrefixes(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64")
+# node is used to get an ip4/ip6 address indexed from within the above prefixes
+# name is optional and would default to eth
+# mac is optional and will result in a randomly generated mac
+iface_data = ip_prefixes.create_iface(
+ node=node, name="eth0", mac="00:00:00:00:aa:00"
+)
+```
+
+### Listening to Events
+
+Various events that can occur within a session can be listened to.
+
+Event types:
+
+* session - events for changes in session state and mobility start/stop/pause
+* node - events for node movements and icon changes
+* link - events for link configuration changes and wireless link add/delete
+* config - configuration events when legacy gui joins a session
+* exception - alert/error events
+* file - file events when the legacy gui joins a session
+
+```python
+def event_listener(event):
+ print(event)
+
+
+# add an event listener to event type you want to listen to
+# each handler will receive an object unique to that type
+session.event_handlers.append(event_listener)
+session.exception_handlers.append(event_listener)
+session.node_handlers.append(event_listener)
+session.link_handlers.append(event_listener)
+session.file_handlers.append(event_listener)
+session.config_handlers.append(event_listener)
+```
+
+### Configuring Links
+
+Links can be configured at the time of creation or during runtime.
+
+Currently supported configuration options:
+
+* bandwidth (bps)
+* delay (us)
+* dup (%)
+* jitter (us)
+* loss (%)
+
+```python
+from core.emulator.data import LinkOptions
+
+# configuring when creating a link
+options = LinkOptions(
+ bandwidth=54_000_000,
+ delay=5000,
+ dup=5,
+ loss=5.5,
+ jitter=0,
+)
+session.add_link(n1_id, n2_id, iface1_data, iface2_data, options)
+
+# configuring during runtime
+session.update_link(n1_id, n2_id, iface1_id, iface2_id, options)
+```
+
+### Peer to Peer Example
+
+```python
+# required imports
+from core.emulator.coreemu import CoreEmu
+from core.emulator.data import IpPrefixes
+from core.emulator.enumerations import EventTypes
+from core.nodes.base import CoreNode, Position
+
+# ip nerator for example
+ip_prefixes = IpPrefixes(ip4_prefix="10.0.0.0/24")
+
+# create emulator instance for creating sessions and utility methods
+coreemu = CoreEmu()
+session = coreemu.create_session()
+
+# must be in configuration state for nodes to start, when using "node_add" below
+session.set_state(EventTypes.CONFIGURATION_STATE)
+
+# create nodes
+position = Position(x=100, y=100)
+n1 = session.add_node(CoreNode, position=position)
+position = Position(x=300, y=100)
+n2 = session.add_node(CoreNode, position=position)
+
+# link nodes together
+iface1 = ip_prefixes.create_iface(n1)
+iface2 = ip_prefixes.create_iface(n2)
+session.add_link(n1.id, n2.id, iface1, iface2)
+
+# start session
+session.instantiate()
+
+# do whatever you like here
+input("press enter to shutdown")
+
+# stop session
+session.shutdown()
+```
+
+### Switch/Hub Example
+
+```python
+# required imports
+from core.emulator.coreemu import CoreEmu
+from core.emulator.data import IpPrefixes
+from core.emulator.enumerations import EventTypes
+from core.nodes.base import CoreNode, Position
+from core.nodes.network import SwitchNode
+
+# ip nerator for example
+ip_prefixes = IpPrefixes(ip4_prefix="10.0.0.0/24")
+
+# create emulator instance for creating sessions and utility methods
+coreemu = CoreEmu()
+session = coreemu.create_session()
+
+# must be in configuration state for nodes to start, when using "node_add" below
+session.set_state(EventTypes.CONFIGURATION_STATE)
+
+# create switch
+position = Position(x=200, y=200)
+switch = session.add_node(SwitchNode, position=position)
+
+# create nodes
+position = Position(x=100, y=100)
+n1 = session.add_node(CoreNode, position=position)
+position = Position(x=300, y=100)
+n2 = session.add_node(CoreNode, position=position)
+
+# link nodes to switch
+iface1 = ip_prefixes.create_iface(n1)
+session.add_link(n1.id, switch.id, iface1)
+iface1 = ip_prefixes.create_iface(n2)
+session.add_link(n2.id, switch.id, iface1)
+
+# start session
+session.instantiate()
+
+# do whatever you like here
+input("press enter to shutdown")
+
+# stop session
+session.shutdown()
+```
+
+### WLAN Example
+
+```python
+# required imports
+from core.emulator.coreemu import CoreEmu
+from core.emulator.data import IpPrefixes
+from core.emulator.enumerations import EventTypes
+from core.location.mobility import BasicRangeModel
+from core.nodes.base import CoreNode, Position
+from core.nodes.network import WlanNode
+
+# ip nerator for example
+ip_prefixes = IpPrefixes(ip4_prefix="10.0.0.0/24")
+
+# create emulator instance for creating sessions and utility methods
+coreemu = CoreEmu()
+session = coreemu.create_session()
+
+# must be in configuration state for nodes to start, when using "node_add" below
+session.set_state(EventTypes.CONFIGURATION_STATE)
+
+# create wlan
+position = Position(x=200, y=200)
+wlan = session.add_node(WlanNode, position=position)
+
+# create nodes
+options = CoreNode.create_options()
+options.model = "mdr"
+position = Position(x=100, y=100)
+n1 = session.add_node(CoreNode, position=position, options=options)
+position = Position(x=300, y=100)
+n2 = session.add_node(CoreNode, position=position, options=options)
+
+# configuring wlan
+session.mobility.set_model_config(wlan.id, BasicRangeModel.name, {
+ "range": "280",
+ "bandwidth": "55000000",
+ "delay": "6000",
+ "jitter": "5",
+ "error": "5",
+})
+
+# link nodes to wlan
+iface1 = ip_prefixes.create_iface(n1)
+session.add_link(n1.id, wlan.id, iface1)
+iface1 = ip_prefixes.create_iface(n2)
+session.add_link(n2.id, wlan.id, iface1)
+
+# start session
+session.instantiate()
+
+# do whatever you like here
+input("press enter to shutdown")
+
+# stop session
+session.shutdown()
+```
+
+### EMANE Example
+
+For EMANE you can import and use one of the existing models and
+use its name for configuration.
+
+Current models:
+
+* core.emane.ieee80211abg.EmaneIeee80211abgModel
+* core.emane.rfpipe.EmaneRfPipeModel
+* core.emane.tdma.EmaneTdmaModel
+* core.emane.bypass.EmaneBypassModel
+
+Their configurations options are driven dynamically from parsed EMANE manifest files
+from the installed version of EMANE.
+
+Options and their purpose can be found at the [EMANE Wiki](https://github.com/adjacentlink/emane/wiki).
+
+If configuring EMANE global settings or model mac/phy specific settings, any value not provided
+will use the defaults. When no configuration is used, the defaults are used.
+
+```python
+# required imports
+from core.emane.models.ieee80211abg import EmaneIeee80211abgModel
+from core.emane.nodes import EmaneNet
+from core.emulator.coreemu import CoreEmu
+from core.emulator.data import IpPrefixes
+from core.emulator.enumerations import EventTypes
+from core.nodes.base import CoreNode, Position
+
+# ip nerator for example
+ip_prefixes = IpPrefixes(ip4_prefix="10.0.0.0/24")
+
+# create emulator instance for creating sessions and utility methods
+coreemu = CoreEmu()
+session = coreemu.create_session()
+
+# location information is required to be set for emane
+session.location.setrefgeo(47.57917, -122.13232, 2.0)
+session.location.refscale = 150.0
+
+# must be in configuration state for nodes to start, when using "node_add" below
+session.set_state(EventTypes.CONFIGURATION_STATE)
+
+# create emane
+options = EmaneNet.create_options()
+options.emane_model = EmaneIeee80211abgModel.name
+position = Position(x=200, y=200)
+emane = session.add_node(EmaneNet, position=position, options=options)
+
+# create nodes
+options = CoreNode.create_options()
+options.model = "mdr"
+position = Position(x=100, y=100)
+n1 = session.add_node(CoreNode, position=position, options=options)
+position = Position(x=300, y=100)
+n2 = session.add_node(CoreNode, position=position, options=options)
+
+# configure general emane settings
+config = session.emane.get_configs()
+config.update({
+ "eventservicettl": "2"
+})
+
+# configure emane model settings
+# using a dict mapping currently support values as strings
+session.emane.set_model_config(emane.id, EmaneIeee80211abgModel.name, {
+ "unicastrate": "3",
+})
+
+# link nodes to emane
+iface1 = ip_prefixes.create_iface(n1)
+session.add_link(n1.id, emane.id, iface1)
+iface1 = ip_prefixes.create_iface(n2)
+session.add_link(n2.id, emane.id, iface1)
+
+# start session
+session.instantiate()
+
+# do whatever you like here
+input("press enter to shutdown")
+
+# stop session
+session.shutdown()
+```
+
+EMANE Model Configuration:
+
+```python
+from core import utils
+
+# standardized way to retrieve an appropriate config id
+# iface id can be omitted, to allow a general configuration for a model, per node
+config_id = utils.iface_config_id(node.id, iface_id)
+# set emane configuration for the config id
+session.emane.set_config(config_id, EmaneIeee80211abgModel.name, {
+ "unicastrate": "3",
+})
+```
+
+## Configuring a Service
+
+Services help generate and run bash scripts on nodes for a given purpose.
+
+Configuring the files of a service results in a specific hard coded script being
+generated, instead of the default scripts, that may leverage dynamic generation.
+
+The following features can be configured for a service:
+
+* configs - files that will be generated
+* dirs - directories that will be mounted unique to the node
+* startup - commands to run start a service
+* validate - commands to run to validate a service
+* shutdown - commands to run to stop a service
+
+Editing service properties:
+
+```python
+# configure a service, for a node, for a given session
+session.services.set_service(node_id, service_name)
+service = session.services.get_service(node_id, service_name)
+service.configs = ("file1.sh", "file2.sh")
+service.dirs = ("/etc/node",)
+service.startup = ("bash file1.sh",)
+service.validate = ()
+service.shutdown = ()
+```
+
+When editing a service file, it must be the name of `config`
+file that the service will generate.
+
+Editing a service file:
+
+```python
+# to edit the contents of a generated file you can specify
+# the service, the file name, and its contents
+session.services.set_service_file(
+ node_id,
+ service_name,
+ file_name,
+ "echo hello",
+)
+```
+
+## File Examples
+
+File versions of the network examples can be found
+[here](https://github.com/coreemu/core/tree/master/package/examples/python).
+
+## Executing Scripts from GUI
+
+To execute a python script from a GUI you need have the following.
+
+The builtin name check here to know it is being executed from the GUI, this can
+be avoided if your script does not use a name check.
+
+```python
+if __name__ in ["__main__", "__builtin__"]:
+ main()
+```
+
+A script can add sessions to the core-daemon. A global *coreemu* variable is
+exposed to the script pointing to the *CoreEmu* object.
+
+The example below has a fallback to a new CoreEmu object, in the case you would
+like to run the script standalone, outside of the core-daemon.
+
+```python
+coreemu = globals().get("coreemu") or CoreEmu()
+session = coreemu.create_session()
+```
diff --git a/docs/scripting.md b/docs/scripting.md
deleted file mode 100644
index 0b0ca47f..00000000
--- a/docs/scripting.md
+++ /dev/null
@@ -1,120 +0,0 @@
-
-# CORE Python Scripting
-
-* Table of Contents
-{:toc}
-
-## Overview
-
-CORE can be used via the GUI or Python scripting. Writing your own Python scripts offers a rich programming environment with complete control over all aspects of the emulation. This chapter provides a brief introduction to scripting. Most of the documentation is available from sample scripts, or online via interactive Python.
-
-The best starting point is the sample scripts that are included with CORE. If you have a CORE source tree, the example script files can be found under *core/daemon/examples/api/*. When CORE is installed from packages, the example script files will be in */usr/share/core/examples/api/* (or */usr/local/* prefix when installed from source.) For the most part, the example scripts are self-documenting; see the comments contained within the Python code.
-
-The scripts should be run with root privileges because they create new network namespaces. In general, a CORE Python script does not connect to the CORE daemon, in fact the *core-daemon* is just another Python script that uses the CORE Python modules and exchanges messages with the GUI. To connect the GUI to your scripts, see the included sample scripts that allow for GUI connections.
-
-Here are the basic elements of a CORE Python script:
-
-```python
-from core.emulator.coreemu import CoreEmu
-from core.emulator.emudata import IpPrefixes
-from core.enumerations import EventTypes
-from core.enumerations import NodeTypes
-
-# ip generator for example
-prefixes = IpPrefixes(ip4_prefix="10.83.0.0/16")
-
-# create emulator instance for creating sessions and utility methods
-coreemu = CoreEmu()
-session = coreemu.create_session()
-
-# must be in configuration state for nodes to start, when using "node_add" below
-session.set_state(EventTypes.CONFIGURATION_STATE)
-
-# create switch network node
-switch = session.add_node(_type=NodeTypes.SWITCH)
-
-# create nodes
-for _ in xrange(options.nodes):
- node = session.add_node()
- interface = prefixes.create_interface(node)
- session.add_link(node.objid, switch.objid, interface_one=interface)
-
-# instantiate session
-session.instantiate()
-
-# shutdown session
-coreemu.shutdown()
-```
-
-The above script creates a CORE session having two nodes connected with a hub. The first node pings the second node with 5 ping packets; the result is displayed on screen.
-
-A good way to learn about the CORE Python modules is via interactive Python. Scripts can be run using *python -i*. Cut and paste the simple script above and you will have two nodes connected by a hub, with one node running a test ping to the other.
-
-The CORE Python modules are documented with comments in the code. From an interactive Python shell, you can retrieve online help about the various classes and methods; for example *help(nodes.CoreNode)* or *help(Session)*.
-
-**NOTE: The CORE daemon *core-daemon* manages a list of sessions and allows the GUI to connect and control sessions. Your Python script uses the same CORE modules but runs independently of the daemon. The daemon does not need to be running for your script to work.**
-
-The session created by a Python script may be viewed in the GUI if certain steps are followed. The GUI has a *File Menu*, *Execute Python script...* option for running a script and automatically connecting to it. Once connected, normal GUI interaction is possible, such as moving and double-clicking nodes, activating Widgets, etc.
-
-The script should have a line such as the following for running it from the GUI.
-
-```python
-if __name__ in ["__main__", "__builtin__"]:
- main()
-```
-
-A script can add sessions to the core-daemon. A global *coreemu* variable is exposed to the script pointing to the *CoreEmu* object.
-The example below has a fallback to a new CoreEmu object, in the case you would like to run the script standalone, outside of the core-daemon.
-
-```python
-coreemu = globals().get("coreemu", CoreEmu())
-session = coreemu.create_session()
-```
-
-Finally, nodes and networks need to have their coordinates set to something, otherwise they will be grouped at the coordinates *<0, 0>*. First sketching the topology in the GUI and then using the *Export Python script* option may help here.
-
-```python
-switch.setposition(x=80,y=50)
-```
-
-A fully-worked example script that you can launch from the GUI is available in the examples directory.
-
-## Configuring Services
-
-Examples setting or configuring custom services for a node.
-
-```python
-# create session and node
-coreemu = CoreEmu()
-session = coreemu.create_session()
-node = session.add_node()
-
-# create and retrieve custom service
-session.services.set_service(node.objid, "ServiceName")
-custom_service = session.services.get_service(node.objid, "ServiceName")
-
-# set custom file data
-session.services.set_service_file(node.objid, "ServiceName", "FileName", "custom file data")
-
-# set services to a node, using custom services when defined
-session.services.add_services(node, node.type, ["Service1", "Service2"])
-```
-
-# Configuring EMANE Models
-
-Examples for configuring custom emane model settings.
-
-```python
-# create session and emane network
-coreemu = CoreEmu()
-session = coreemu.create_session()
-emane_network = session.create_emane_network(
- model=EmaneIeee80211abgModel,
- geo_reference=(47.57917, -122.13232, 2.00000)
-)
-emane_network.setposition(x=80, y=50)
-
-# set custom emane model config
-config = {}
-session.emane.set_model_config(emane_network.objid, EmaneIeee80211abgModel.name, config)
-```
diff --git a/docs/services.md b/docs/services.md
index 793e6f99..9e6e3642 100644
--- a/docs/services.md
+++ b/docs/services.md
@@ -1,13 +1,299 @@
-# CORE Services
+# Services (Deprecated)
-* Table of Contents
-{:toc}
+## Overview
-## Custom Services
+CORE uses the concept of services to specify what processes or scripts run on a
+node when it is started. Layer-3 nodes such as routers and PCs are defined by
+the services that they run.
-CORE supports custom developed services by way of dynamically loading user created python files.
-Custom services should be placed within the path defined by **custom_services_dir** in the CORE
-configuration file. This path cannot end in **/services**.
+Services may be customized for each node, or new custom services can be
+created. New node types can be created each having a different name, icon, and
+set of default services. Each service defines the per-node directories,
+configuration files, startup index, starting commands, validation commands,
+shutdown commands, and meta-data associated with a node.
-Here is an example service with documentation describing functionality:
-[Example Service](exampleservice.html)
+!!! note
+
+ **Network namespace nodes do not undergo the normal Linux boot process**
+ using the **init**, **upstart**, or **systemd** frameworks. These
+ lightweight nodes use configured CORE *services*.
+
+## Available Services
+
+| Service Group | Services |
+|----------------------------------|-----------------------------------------------------------------------|
+| [BIRD](services/bird.md) | BGP, OSPF, RADV, RIP, Static |
+| [EMANE](services/emane.md) | Transport Service |
+| [FRR](services/frr.md) | BABEL, BGP, OSPFv2, OSPFv3, PIMD, RIP, RIPNG, Zebra |
+| [NRL](services/nrl.md) | arouted, MGEN Sink, MGEN Actor, NHDP, OLSR, OLSRORG, OLSRv2, SMF |
+| [Quagga](services/quagga.md) | BABEL, BGP, OSPFv2, OSPFv3, OSPFv3 MDR, RIP, RIPNG, XPIMD, Zebra |
+| [SDN](services/sdn.md) | OVS, RYU |
+| [Security](services/security.md) | Firewall, IPsec, NAT, VPN Client, VPN Server |
+| [Utility](services/utility.md) | ATD, Routing Utils, DHCP, FTP, IP Forward, PCAP, RADVD, SSF, UCARP |
+| [XORP](services/xorp.md) | BGP, OLSR, OSPFv2, OSPFv3, PIMSM4, PIMSM6, RIP, RIPNG, Router Manager |
+
+## Node Types and Default Services
+
+Here are the default node types and their services:
+
+| Node Type | Services |
+|-----------|--------------------------------------------------------------------------------------------------------------------------------------------|
+| *router* | zebra, OSFPv2, OSPFv3, and IPForward services for IGP link-state routing. |
+| *host* | DefaultRoute and SSH services, representing an SSH server having a default route when connected directly to a router. |
+| *PC* | DefaultRoute service for having a default route when connected directly to a router. |
+| *mdr* | zebra, OSPFv3MDR, and IPForward services for wireless-optimized MANET Designated Router routing. |
+| *prouter* | a physical router, having the same default services as the *router* node type; for incorporating Linux testbed machines into an emulation. |
+
+Configuration files can be automatically generated by each service. For
+example, CORE automatically generates routing protocol configuration for the
+router nodes in order to simplify the creation of virtual networks.
+
+To change the services associated with a node, double-click on the node to
+invoke its configuration dialog and click on the *Services...* button,
+or right-click a node a choose *Services...* from the menu.
+Services are enabled or disabled by clicking on their names. The button next to
+each service name allows you to customize all aspects of this service for this
+node. For example, special route redistribution commands could be inserted in
+to the Quagga routing configuration associated with the zebra service.
+
+To change the default services associated with a node type, use the Node Types
+dialog available from the *Edit* button at the end of the Layer-3 nodes
+toolbar, or choose *Node types...* from the *Session* menu. Note that
+any new services selected are not applied to existing nodes if the nodes have
+been customized.
+
+## Customizing a Service
+
+A service can be fully customized for a particular node. From the node's
+configuration dialog, click on the button next to the service name to invoke
+the service customization dialog for that service.
+The dialog has three tabs for configuring the different aspects of the service:
+files, directories, and startup/shutdown.
+
+!!! note
+
+ A **yellow** customize icon next to a service indicates that service
+ requires customization (e.g. the *Firewall* service).
+ A **green** customize icon indicates that a custom configuration exists.
+ Click the *Defaults* button when customizing a service to remove any
+ customizations.
+
+The Files tab is used to display or edit the configuration files or scripts that
+are used for this service. Files can be selected from a drop-down list, and
+their contents are displayed in a text entry below. The file contents are
+generated by the CORE daemon based on the network topology that exists at
+the time the customization dialog is invoked.
+
+The Directories tab shows the per-node directories for this service. For the
+default types, CORE nodes share the same filesystem tree, except for these
+per-node directories that are defined by the services. For example, the
+**/var/run/quagga** directory needs to be unique for each node running
+the Zebra service, because Quagga running on each node needs to write separate
+PID files to that directory.
+
+!!! note
+
+ The **/var/log** and **/var/run** directories are
+ mounted uniquely per-node by default.
+ Per-node mount targets can be found in **/tmp/pycore./.conf/**
+
+The Startup/shutdown tab lists commands that are used to start and stop this
+service. The startup index allows configuring when this service starts relative
+to the other services enabled for this node; a service with a lower startup
+index value is started before those with higher values. Because shell scripts
+generated by the Files tab will not have execute permissions set, the startup
+commands should include the shell name, with
+something like ```sh script.sh```.
+
+Shutdown commands optionally terminate the process(es) associated with this
+service. Generally they send a kill signal to the running process using the
+*kill* or *killall* commands. If the service does not terminate
+the running processes using a shutdown command, the processes will be killed
+when the *vnoded* daemon is terminated (with *kill -9*) and
+the namespace destroyed. It is a good practice to
+specify shutdown commands, which will allow for proper process termination, and
+for run-time control of stopping and restarting services.
+
+Validate commands are executed following the startup commands. A validate
+command can execute a process or script that should return zero if the service
+has started successfully, and have a non-zero return value for services that
+have had a problem starting. For example, the *pidof* command will check
+if a process is running and return zero when found. When a validate command
+produces a non-zero return value, an exception is generated, which will cause
+an error to be displayed in the Check Emulation Light.
+
+!!! note
+
+ To start, stop, and restart services during run-time, right-click a
+ node and use the *Services...* menu.
+
+## New Services
+
+Services can save time required to configure nodes, especially if a number
+of nodes require similar configuration procedures. New services can be
+introduced to automate tasks.
+
+### Leveraging UserDefined
+
+The easiest way to capture the configuration of a new process into a service
+is by using the **UserDefined** service. This is a blank service where any
+aspect may be customized. The UserDefined service is convenient for testing
+ideas for a service before adding a new service type.
+
+### Creating New Services
+
+!!! note
+
+ The directory name used in **custom_services_dir** below should be unique and
+ should not correspond to any existing Python module name. For example, don't
+ use the name **subprocess** or **services**.
+
+1. Modify the example service shown below
+ to do what you want. It could generate config/script files, mount per-node
+ directories, start processes/scripts, etc. sample.py is a Python file that
+ defines one or more classes to be imported. You can create multiple Python
+ files that will be imported.
+
+2. Put these files in a directory such as `/home//.coregui/custom_services`
+ Note that the last component of this directory name **custom_services** should not
+ be named the same as any python module, due to naming conflicts.
+
+3. Add a **custom_services_dir = `/home//.coregui/custom_services`** entry to the
+ /etc/core/core.conf file.
+
+4. Restart the CORE daemon (core-daemon). Any import errors (Python syntax)
+ should be displayed in the daemon output.
+
+5. Start using your custom service on your nodes. You can create a new node
+ type that uses your service, or change the default services for an existing
+ node type, or change individual nodes.
+
+If you have created a new service type that may be useful to others, please
+consider contributing it to the CORE project.
+
+#### Example Custom Service
+
+Below is the skeleton for a custom service with some documentation. Most
+people would likely only setup the required class variables **(name/group)**.
+Then define the **configs** (files they want to generate) and implement the
+**generate_config** function to dynamically create the files wanted. Finally
+the **startup** commands would be supplied, which typically tends to be
+running the shell files generated.
+
+```python
+"""
+Simple example custom service, used to drive shell commands on a node.
+"""
+from typing import Tuple
+
+from core.nodes.base import CoreNode
+from core.services.coreservices import CoreService, ServiceMode
+
+
+class ExampleService(CoreService):
+ """
+ Example Custom CORE Service
+
+ :cvar name: name used as a unique ID for this service and is required, no spaces
+ :cvar group: allows you to group services within the GUI under a common name
+ :cvar executables: executables this service depends on to function, if executable is
+ not on the path, service will not be loaded
+ :cvar dependencies: services that this service depends on for startup, tuple of
+ service names
+ :cvar dirs: directories that this service will create within a node
+ :cvar configs: files that this service will generate, without a full path this file
+ goes in the node's directory e.g. /tmp/pycore.12345/n1.conf/myfile
+ :cvar startup: commands used to start this service, any non-zero exit code will
+ cause a failure
+ :cvar validate: commands used to validate that a service was started, any non-zero
+ exit code will cause a failure
+ :cvar validation_mode: validation mode, used to determine startup success.
+ NON_BLOCKING - runs startup commands, and validates success with validation commands
+ BLOCKING - runs startup commands, and validates success with the startup commands themselves
+ TIMER - runs startup commands, and validates success by waiting for "validation_timer" alone
+ :cvar validation_timer: time in seconds for a service to wait for validation, before
+ determining success in TIMER/NON_BLOCKING modes.
+ :cvar validation_period: period in seconds to wait before retrying validation,
+ only used in NON_BLOCKING mode
+ :cvar shutdown: shutdown commands to stop this service
+ """
+
+ name: str = "ExampleService"
+ group: str = "Utility"
+ executables: Tuple[str, ...] = ()
+ dependencies: Tuple[str, ...] = ()
+ dirs: Tuple[str, ...] = ()
+ configs: Tuple[str, ...] = ("myservice1.sh", "myservice2.sh")
+ startup: Tuple[str, ...] = tuple(f"sh {x}" for x in configs)
+ validate: Tuple[str, ...] = ()
+ validation_mode: ServiceMode = ServiceMode.NON_BLOCKING
+ validation_timer: int = 5
+ validation_period: float = 0.5
+ shutdown: Tuple[str, ...] = ()
+
+ @classmethod
+ def on_load(cls) -> None:
+ """
+ Provides a way to run some arbitrary logic when the service is loaded, possibly
+ to help facilitate dynamic settings for the environment.
+
+ :return: nothing
+ """
+ pass
+
+ @classmethod
+ def get_configs(cls, node: CoreNode) -> Tuple[str, ...]:
+ """
+ Provides a way to dynamically generate the config files from the node a service
+ will run. Defaults to the class definition and can be left out entirely if not
+ needed.
+
+ :param node: core node that the service is being ran on
+ :return: tuple of config files to create
+ """
+ return cls.configs
+
+ @classmethod
+ def generate_config(cls, node: CoreNode, filename: str) -> str:
+ """
+ Returns a string representation for a file, given the node the service is
+ starting on the config filename that this information will be used for. This
+ must be defined, if "configs" are defined.
+
+ :param node: core node that the service is being ran on
+ :param filename: configuration file to generate
+ :return: configuration file content
+ """
+ cfg = "#!/bin/sh\n"
+ if filename == cls.configs[0]:
+ cfg += "# auto-generated by MyService (sample.py)\n"
+ for iface in node.get_ifaces():
+ cfg += f'echo "Node {node.name} has interface {iface.name}"\n'
+ elif filename == cls.configs[1]:
+ cfg += "echo hello"
+ return cfg
+
+ @classmethod
+ def get_startup(cls, node: CoreNode) -> Tuple[str, ...]:
+ """
+ Provides a way to dynamically generate the startup commands from the node a
+ service will run. Defaults to the class definition and can be left out entirely
+ if not needed.
+
+ :param node: core node that the service is being ran on
+ :return: tuple of startup commands to run
+ """
+ return cls.startup
+
+ @classmethod
+ def get_validate(cls, node: CoreNode) -> Tuple[str, ...]:
+ """
+ Provides a way to dynamically generate the validate commands from the node a
+ service will run. Defaults to the class definition and can be left out entirely
+ if not needed.
+
+ :param node: core node that the service is being ran on
+ :return: tuple of commands to validate service startup with
+ """
+ return cls.validate
+```
diff --git a/docs/services/bird.md b/docs/services/bird.md
new file mode 100644
index 00000000..db2f7701
--- /dev/null
+++ b/docs/services/bird.md
@@ -0,0 +1,45 @@
+# BIRD Internet Routing Daemon
+
+## Overview
+
+The [BIRD Internet Routing Daemon](https://bird.network.cz/) is a routing
+daemon; i.e., a software responsible for managing kernel packet forwarding
+tables. It aims to develop a dynamic IP routing daemon with full support of
+all modern routing protocols, easy to use configuration interface and powerful
+route filtering language, primarily targeted on (but not limited to) Linux and
+other UNIX-like systems and distributed under the GNU General Public License.
+BIRD has a free implementation of several well known and common routing and
+router-supplemental protocols, namely RIP, RIPng, OSPFv2, OSPFv3, BGP, BFD,
+and NDP/RA. BIRD supports IPv4 and IPv6 address families, Linux kernel and
+several BSD variants (tested on FreeBSD, NetBSD and OpenBSD). BIRD consists
+of bird daemon and birdc interactive CLI client used for supervision.
+
+In order to be able to use the BIRD Internet Routing Protocol, you must first
+install the project on your machine.
+
+## BIRD Package Install
+
+```shell
+sudo apt-get install bird
+```
+
+## BIRD Source Code Install
+
+You can download BIRD source code from its
+[official repository.](https://gitlab.labs.nic.cz/labs/bird/)
+
+```shell
+./configure
+make
+su
+make install
+vi /etc/bird/bird.conf
+```
+
+The installation will place the bird directory inside */etc* where you will
+also find its config file.
+
+In order to be able to do use the Bird Internet Routing Protocol, you must
+modify *bird.conf* due to the fact that the given configuration file is not
+configured beyond allowing the bird daemon to start, which means that nothing
+else will happen if you run it.
diff --git a/docs/services/emane.md b/docs/services/emane.md
new file mode 100644
index 00000000..3f904091
--- /dev/null
+++ b/docs/services/emane.md
@@ -0,0 +1,10 @@
+# EMANE Services
+
+## Overview
+
+EMANE related services for CORE.
+
+## Transport Service
+
+Helps with setting up EMANE for using an external transport.
+
diff --git a/docs/services/frr.md b/docs/services/frr.md
new file mode 100644
index 00000000..aa2db6ff
--- /dev/null
+++ b/docs/services/frr.md
@@ -0,0 +1,91 @@
+# FRRouting
+
+## Overview
+
+FRRouting is a routing software package that provides TCP/IP based routing services with routing protocols support such
+as BGP, RIP, OSPF, IS-IS and more. FRR also supports special BGP Route Reflector and Route Server behavior. In addition
+to traditional IPv4 routing protocols, FRR also supports IPv6 routing protocols. With an SNMP daemon that supports the
+AgentX protocol, FRR provides routing protocol MIB read-only access (SNMP Support).
+
+FRR (as of v7.2) currently supports the following protocols:
+
+* BGPv4
+* OSPFv2
+* OSPFv3
+* RIPv1/v2/ng
+* IS-IS
+* PIM-SM/MSDP/BSM(AutoRP)
+* LDP
+* BFD
+* Babel
+* PBR
+* OpenFabric
+* VRRPv2/v3
+* EIGRP (alpha)
+* NHRP (alpha)
+
+## FRRouting Package Install
+
+Ubuntu 19.10 and later
+
+```shell
+sudo apt update && sudo apt install frr
+```
+
+Ubuntu 16.04 and Ubuntu 18.04
+
+```shell
+sudo apt install curl
+curl -s https://deb.frrouting.org/frr/keys.asc | sudo apt-key add -
+FRRVER="frr-stable"
+echo deb https://deb.frrouting.org/frr $(lsb_release -s -c) $FRRVER | sudo tee -a /etc/apt/sources.list.d/frr.list
+sudo apt update && sudo apt install frr frr-pythontools
+```
+
+Fedora 31
+
+```shell
+sudo dnf update && sudo dnf install frr
+```
+
+## FRRouting Source Code Install
+
+Building FRR from source is the best way to ensure you have the latest features and bug fixes. Details for each
+supported platform, including dependency package listings, permissions, and other gotchas, are in the developer’s
+documentation.
+
+FRR’s source is available on the project [GitHub page](https://github.com/FRRouting/frr).
+
+```shell
+git clone https://github.com/FRRouting/frr.git
+```
+
+Change into your FRR source directory and issue:
+
+```shell
+./bootstrap.sh
+```
+
+Then, choose the configuration options that you wish to use for the installation. You can find these options on
+FRR's [official webpage](http://docs.frrouting.org/en/latest/installation.html). Once you have chosen your configure
+options, run the configure script and pass the options you chose:
+
+```shell
+./configure \
+ --prefix=/usr \
+ --enable-exampledir=/usr/share/doc/frr/examples/ \
+ --localstatedir=/var/run/frr \
+ --sbindir=/usr/lib/frr \
+ --sysconfdir=/etc/frr \
+ --enable-pimd \
+ --enable-watchfrr \
+ ...
+```
+
+After configuring the software, you are ready to build and install it in your system.
+
+```shell
+make && sudo make install
+```
+
+If everything finishes successfully, FRR should be installed.
diff --git a/docs/services/nrl.md b/docs/services/nrl.md
new file mode 100644
index 00000000..da26ab25
--- /dev/null
+++ b/docs/services/nrl.md
@@ -0,0 +1,86 @@
+# NRL Services
+
+## Overview
+
+The Protean Protocol Prototyping Library (ProtoLib) is a cross-platform library that allows applications to be built
+while supporting a variety of platforms including Linux, Windows, WinCE/PocketPC, MacOS, FreeBSD, Solaris, etc as well
+as the simulation environments of NS2 and Opnet. The goal of the Protolib is to provide a set of simple, cross-platform
+C++ classes that allow development of network protocols and applications that can run on different platforms and in
+network simulation environments. While Protolib provides an overall framework for developing working protocol
+implementations, applications, and simulation modules, the individual classes are designed for use as stand-alone
+components when possible. Although Protolib is principally for research purposes, the code has been constructed to
+provide robust, efficient performance and adaptability to real applications. In some cases, the code consists of data
+structures, etc useful in protocol implementations and, in other cases, provides common, cross-platform interfaces to
+system services and functions (e.g., sockets, timers, routing tables, etc).
+
+Currently, the Naval Research Laboratory uses this library to develop a wide variety of protocols.The NRL Protolib
+currently supports the following protocols:
+
+* MGEN_Sink
+* NHDP
+* SMF
+* OLSR
+* OLSRv2
+* OLSRORG
+* MgenActor
+* arouted
+
+## NRL Installation
+
+In order to be able to use the different protocols that NRL offers, you must first download the support library itself.
+You can get the source code from their [NRL Protolib Repo](https://github.com/USNavalResearchLaboratory/protolib).
+
+## Multi-Generator (MGEN)
+
+Download MGEN from the [NRL MGEN Repo](https://github.com/USNavalResearchLaboratory/mgen), unpack it and copy the
+protolib library into the main folder *mgen*. Execute the following commands to build the protocol.
+
+```shell
+cd mgen/makefiles
+make -f Makefile.{os} mgen
+```
+
+## Neighborhood Discovery Protocol (NHDP)
+
+Download NHDP from the [NRL NHDP Repo](https://github.com/USNavalResearchLaboratory/NCS-Downloads/tree/master/nhdp).
+
+```shell
+sudo apt-get install libpcap-dev libboost-all-dev
+wget https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0/protoc-3.8.0-linux-x86_64.zip
+unzip protoc-3.8.0-linux-x86_64.zip
+```
+
+Then place the binaries in your $PATH. To know your paths you can issue the following command
+
+```shell
+echo $PATH
+```
+
+Go to the downloaded *NHDP* tarball, unpack it and place the protolib library inside the NHDP main folder. Now, compile
+the NHDP Protocol.
+
+```shell
+cd nhdp/unix
+make -f Makefile.{os}
+```
+
+## Simplified Multicast Forwarding (SMF)
+
+Download SMF from the [NRL SMF Repo](https://github.com/USNavalResearchLaboratory/nrlsmf) , unpack it and place the
+protolib library inside the *smf* main folder.
+
+```shell
+cd mgen/makefiles
+make -f Makefile.{os}
+```
+
+## Optimized Link State Routing Protocol (OLSR)
+
+To install the OLSR protocol, download their source code from
+their [NRL OLSR Repo](https://github.com/USNavalResearchLaboratory/nrlolsr). Unpack it and place the previously
+downloaded protolib library inside the *nrlolsr* main directory. Then execute the following commands:
+
+```shell
+cd ./unix
+make -f Makefile.{os}
+```
diff --git a/docs/services/quagga.md b/docs/services/quagga.md
new file mode 100644
index 00000000..6842b5e7
--- /dev/null
+++ b/docs/services/quagga.md
@@ -0,0 +1,32 @@
+# Quagga Routing Suite
+
+## Overview
+
+Quagga is a routing software suite, providing implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix
+platforms, particularly FreeBSD, Linux, Solaris and NetBSD. Quagga is a fork of GNU Zebra which was developed by
+Kunihiro Ishiguro.
+The Quagga architecture consists of a core daemon, zebra, which acts as an abstraction layer to the underlying Unix
+kernel and presents the Zserv API over a Unix or TCP stream to Quagga clients. It is these Zserv clients which typically
+implement a routing protocol and communicate routing updates to the zebra daemon.
+
+## Quagga Package Install
+
+```shell
+sudo apt-get install quagga
+```
+
+## Quagga Source Install
+
+First, download the source code from their [official webpage](https://www.quagga.net/).
+
+```shell
+sudo apt-get install gawk
+```
+
+Extract the tarball, go to the directory of your currently extracted code and issue the following commands.
+
+```shell
+./configure
+make
+sudo make install
+```
diff --git a/docs/services/sdn.md b/docs/services/sdn.md
new file mode 100644
index 00000000..05e8606e
--- /dev/null
+++ b/docs/services/sdn.md
@@ -0,0 +1,30 @@
+# Software Defined Networking
+
+## Overview
+
+Ryu is a component-based software defined networking framework. Ryu provides software components with well defined API
+that make it easy for developers to create new network management and control applications. Ryu supports various
+protocols for managing network devices, such as OpenFlow, Netconf, OF-config, etc. About OpenFlow, Ryu supports fully
+1.0, 1.2, 1.3, 1.4, 1.5 and Nicira Extensions. All of the code is freely available under the Apache 2.0 license.
+
+## Installation
+
+### Prerequisites
+
+```shell
+sudo apt-get install gcc python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev zlib1g-dev
+```
+
+### Ryu Package Install
+
+```shell
+pip install ryu
+```
+
+### Ryu Source Install
+
+```shell
+git clone git://github.com/osrg/ryu.git
+cd ryu
+pip install .
+```
diff --git a/docs/services/security.md b/docs/services/security.md
new file mode 100644
index 00000000..a621009d
--- /dev/null
+++ b/docs/services/security.md
@@ -0,0 +1,90 @@
+# Security Services
+
+## Overview
+
+The security services offer a wide variety of protocols capable of satisfying the most use cases available. Security
+services such as IP security protocols, for providing security at the IP layer, as well as the suite of protocols
+designed to provide that security, through authentication and encryption of IP network packets. Virtual Private
+Networks (VPNs) and Firewalls are also available for use to the user.
+
+## Installation
+
+Libraries needed for some security services.
+
+```shell
+sudo apt-get install ipsec-tools racoon
+```
+
+## OpenVPN
+
+Below is a set of instruction for running a very simple OpenVPN client/server scenario.
+
+### Installation
+
+```shell
+# install openvpn
+sudo apt install openvpn
+
+# retrieve easyrsa3 for key/cert generation
+git clone https://github.com/OpenVPN/easy-rsa
+```
+
+### Generating Keys/Certs
+
+```shell
+# navigate into easyrsa3 repo subdirectory that contains built binary
+cd easy-rsa/easyrsa3
+
+# initalize pki
+./easyrsa init-pki
+
+# build ca
+./easyrsa build-ca
+
+# generate and sign server keypair(s)
+SERVER_NAME=server1
+./easyrsa get-req $SERVER_NAME nopass
+./easyrsa sign-req server $SERVER_NAME
+
+# generate and sign client keypair(s)
+CLIENT_NAME=client1
+./easyrsa get-req $CLIENT_NAME nopass
+./easyrsa sign-req client $CLIENT_NAME
+
+# DH generation
+./easyrsa gen-dh
+
+# create directory for keys for CORE to use
+# NOTE: the default is set to a directory that requires using sudo, but can be
+# anywhere and not require sudo at all
+KEYDIR=/etc/core/keys
+sudo mkdir $KEYDIR
+
+# move keys to directory
+sudo cp pki/ca.crt $KEYDIR
+sudo cp pki/issued/*.crt $KEYDIR
+sudo cp pki/private/*.key $KEYDIR
+sudo cp pki/dh.pem $KEYDIR/dh1024.pem
+```
+
+### Configure Server Nodes
+
+Add VPNServer service to nodes desired for running an OpenVPN server.
+
+Modify [sampleVPNServer](https://github.com/coreemu/core/blob/master/package/examples/services/sampleVPNServer) for the
+following
+
+* Edit keydir key/cert directory
+* Edit keyname to use generated server name above
+* Edit vpnserver to match an address that the server node will have
+
+### Configure Client Nodes
+
+Add VPNClient service to nodes desired for acting as an OpenVPN client.
+
+Modify [sampleVPNClient](https://github.com/coreemu/core/blob/master/package/examples/services/sampleVPNClient) for the
+following
+
+* Edit keydir key/cert directory
+* Edit keyname to use generated client name above
+* Edit vpnserver to match the address a server was configured to use
diff --git a/docs/services/utility.md b/docs/services/utility.md
new file mode 100644
index 00000000..698de4f8
--- /dev/null
+++ b/docs/services/utility.md
@@ -0,0 +1,44 @@
+# Utility Services
+
+## Overview
+
+Variety of convenience services for carrying out common networking changes.
+
+The following services are provided as utilities:
+
+* UCARP
+* IP Forward
+* Default Routing
+* Default Muticast Routing
+* Static Routing
+* SSH
+* DHCP
+* DHCP Client
+* FTP
+* HTTP
+* PCAP
+* RADVD
+* ATD
+
+## Installation
+
+To install the functionality of the previously metioned services you can run the following command:
+
+```shell
+sudo apt-get install isc-dhcp-server apache2 libpcap-dev radvd at
+```
+
+## UCARP
+
+UCARP allows a couple of hosts to share common virtual IP addresses in order to provide automatic failover. It is a
+portable userland implementation of the secure and patent-free Common Address Redundancy Protocol (CARP, OpenBSD's
+alternative to the patents-bloated VRRP).
+
+Strong points of the CARP protocol are: very low overhead, cryptographically signed messages, interoperability between
+different operating systems and no need for any dedicated extra network link between redundant hosts.
+
+### Installation
+
+```shell
+sudo apt-get install ucarp
+```
diff --git a/docs/services/xorp.md b/docs/services/xorp.md
new file mode 100644
index 00000000..a9bd108d
--- /dev/null
+++ b/docs/services/xorp.md
@@ -0,0 +1,52 @@
+# XORP routing suite
+
+## Overview
+
+XORP is an open networking platform that supports OSPF, RIP, BGP, OLSR, VRRP, PIM, IGMP (Multicast) and other routing
+protocols. Most protocols support IPv4 and IPv6 where applicable. It is known to work on various Linux distributions and
+flavors of BSD.
+
+XORP started life as a project at the ICSI Center for Open Networking (ICON) at the International Computer Science
+Institute in Berkeley, California, USA, and spent some time with the team at XORP, Inc. It is now maintained and
+improved on a volunteer basis by a core of long-term XORP developers and some newer contributors.
+
+XORP's primary goal is to be an open platform for networking protocol implementations and an alternative to proprietary
+and closed networking products in the marketplace today. It is the only open source platform to offer integrated
+multicast capability.
+
+XORP design philosophy is:
+
+* modularity
+* extensibility
+* performance
+* robustness
+ This is achieved by carefully separating functionalities into independent modules, and by providing an API for each
+ module.
+
+XORP divides into two subsystems. The higher-level ("user-level") subsystem consists of the routing protocols. The
+lower-level ("kernel") manages the forwarding path, and provides APIs for the higher-level to access.
+
+User-level XORP uses multi-process architecture with one process per routing protocol, and a novel inter-process
+communication mechanism called XRL (XORP Resource Locator).
+
+The lower-level subsystem can use traditional UNIX kernel forwarding, or Click modular router. The modularity and
+independency of the lower-level from the user-level subsystem allows for its easily replacement with other solutions
+including high-end hardware-based forwarding engines.
+
+## Installation
+
+In order to be able to install the XORP Routing Suite, you must first install scons in order to compile it.
+
+```shell
+sudo apt-get install scons
+```
+
+Then, download XORP from its official [release web page](http://www.xorp.org/releases/current/).
+
+```shell
+http://www.xorp.org/releases/current/
+cd xorp
+sudo apt-get install libssl-dev ncurses-dev
+scons
+scons install
+```
diff --git a/docs/static/architecture.png b/docs/static/architecture.png
new file mode 100644
index 00000000..f4ce3388
Binary files /dev/null and b/docs/static/architecture.png differ
diff --git a/docs/static/core-architecture.jpg b/docs/static/core-architecture.jpg
deleted file mode 100644
index 04f6390f..00000000
Binary files a/docs/static/core-architecture.jpg and /dev/null differ
diff --git a/docs/static/core-gui.png b/docs/static/core-gui.png
new file mode 100644
index 00000000..6d0fbd40
Binary files /dev/null and b/docs/static/core-gui.png differ
diff --git a/docs/static/core-workflow.jpg b/docs/static/core-workflow.jpg
deleted file mode 100644
index b60eff7d..00000000
Binary files a/docs/static/core-workflow.jpg and /dev/null differ
diff --git a/docs/static/distributed-controlnetwork.png b/docs/static/distributed-controlnetwork.png
deleted file mode 100644
index ed9b0354..00000000
Binary files a/docs/static/distributed-controlnetwork.png and /dev/null differ
diff --git a/docs/static/distributed-emane-configuration.png b/docs/static/distributed-emane-configuration.png
deleted file mode 100644
index 219e5d43..00000000
Binary files a/docs/static/distributed-emane-configuration.png and /dev/null differ
diff --git a/docs/static/distributed-emane-network.png b/docs/static/distributed-emane-network.png
deleted file mode 100644
index ebc5577f..00000000
Binary files a/docs/static/distributed-emane-network.png and /dev/null differ
diff --git a/docs/static/emane-configuration.png b/docs/static/emane-configuration.png
new file mode 100644
index 00000000..ad66a6f3
Binary files /dev/null and b/docs/static/emane-configuration.png differ
diff --git a/docs/static/emane-single-pc.png b/docs/static/emane-single-pc.png
new file mode 100644
index 00000000..8c58d825
Binary files /dev/null and b/docs/static/emane-single-pc.png differ
diff --git a/docs/static/gui/host.png b/docs/static/gui/host.png
new file mode 100644
index 00000000..e6efda08
Binary files /dev/null and b/docs/static/gui/host.png differ
diff --git a/docs/static/gui/hub.png b/docs/static/gui/hub.png
new file mode 100644
index 00000000..c9a2523b
Binary files /dev/null and b/docs/static/gui/hub.png differ
diff --git a/docs/static/gui/lanswitch.png b/docs/static/gui/lanswitch.png
new file mode 100644
index 00000000..eb9ba593
Binary files /dev/null and b/docs/static/gui/lanswitch.png differ
diff --git a/docs/static/gui/link.png b/docs/static/gui/link.png
new file mode 100644
index 00000000..d6b6745b
Binary files /dev/null and b/docs/static/gui/link.png differ
diff --git a/docs/static/gui/marker.png b/docs/static/gui/marker.png
new file mode 100644
index 00000000..8c60bacb
Binary files /dev/null and b/docs/static/gui/marker.png differ
diff --git a/docs/static/gui/mdr.png b/docs/static/gui/mdr.png
new file mode 100644
index 00000000..b0678ee7
Binary files /dev/null and b/docs/static/gui/mdr.png differ
diff --git a/docs/static/gui/oval.png b/docs/static/gui/oval.png
new file mode 100644
index 00000000..1babf1b7
Binary files /dev/null and b/docs/static/gui/oval.png differ
diff --git a/docs/static/gui/pc.png b/docs/static/gui/pc.png
new file mode 100644
index 00000000..3f587e70
Binary files /dev/null and b/docs/static/gui/pc.png differ
diff --git a/docs/static/gui/rectangle.png b/docs/static/gui/rectangle.png
new file mode 100644
index 00000000..ca6c8c06
Binary files /dev/null and b/docs/static/gui/rectangle.png differ
diff --git a/docs/static/gui/rj45.png b/docs/static/gui/rj45.png
new file mode 100644
index 00000000..c9d87cfd
Binary files /dev/null and b/docs/static/gui/rj45.png differ
diff --git a/docs/static/gui/router.png b/docs/static/gui/router.png
new file mode 100644
index 00000000..1de5014a
Binary files /dev/null and b/docs/static/gui/router.png differ
diff --git a/docs/static/gui/run.png b/docs/static/gui/run.png
new file mode 100644
index 00000000..a39a997f
Binary files /dev/null and b/docs/static/gui/run.png differ
diff --git a/docs/static/gui/select.png b/docs/static/gui/select.png
new file mode 100644
index 00000000..04e18891
Binary files /dev/null and b/docs/static/gui/select.png differ
diff --git a/docs/static/gui/start.png b/docs/static/gui/start.png
new file mode 100644
index 00000000..719f4cd9
Binary files /dev/null and b/docs/static/gui/start.png differ
diff --git a/docs/static/gui/stop.png b/docs/static/gui/stop.png
new file mode 100644
index 00000000..1e87c929
Binary files /dev/null and b/docs/static/gui/stop.png differ
diff --git a/docs/static/gui/text.png b/docs/static/gui/text.png
new file mode 100644
index 00000000..14a85dc0
Binary files /dev/null and b/docs/static/gui/text.png differ
diff --git a/docs/static/gui/tunnel.png b/docs/static/gui/tunnel.png
new file mode 100644
index 00000000..2871b74f
Binary files /dev/null and b/docs/static/gui/tunnel.png differ
diff --git a/docs/static/gui/wlan.png b/docs/static/gui/wlan.png
new file mode 100644
index 00000000..db979a09
Binary files /dev/null and b/docs/static/gui/wlan.png differ
diff --git a/docs/static/single-pc-emane.png b/docs/static/single-pc-emane.png
deleted file mode 100644
index 579255b8..00000000
Binary files a/docs/static/single-pc-emane.png and /dev/null differ
diff --git a/docs/static/tutorial-common/running-join.png b/docs/static/tutorial-common/running-join.png
new file mode 100644
index 00000000..30fbcb80
Binary files /dev/null and b/docs/static/tutorial-common/running-join.png differ
diff --git a/docs/static/tutorial-common/running-open.png b/docs/static/tutorial-common/running-open.png
new file mode 100644
index 00000000..7e3e722c
Binary files /dev/null and b/docs/static/tutorial-common/running-open.png differ
diff --git a/docs/static/tutorial1/link-config-dialog.png b/docs/static/tutorial1/link-config-dialog.png
new file mode 100644
index 00000000..73d4ed2d
Binary files /dev/null and b/docs/static/tutorial1/link-config-dialog.png differ
diff --git a/docs/static/tutorial1/link-config.png b/docs/static/tutorial1/link-config.png
new file mode 100644
index 00000000..35f45327
Binary files /dev/null and b/docs/static/tutorial1/link-config.png differ
diff --git a/docs/static/tutorial1/scenario.png b/docs/static/tutorial1/scenario.png
new file mode 100644
index 00000000..c1a2dfc7
Binary files /dev/null and b/docs/static/tutorial1/scenario.png differ
diff --git a/docs/static/tutorial2/wireless-config-delay.png b/docs/static/tutorial2/wireless-config-delay.png
new file mode 100644
index 00000000..b375af76
Binary files /dev/null and b/docs/static/tutorial2/wireless-config-delay.png differ
diff --git a/docs/static/tutorial2/wireless-configuration.png b/docs/static/tutorial2/wireless-configuration.png
new file mode 100644
index 00000000..9b87959c
Binary files /dev/null and b/docs/static/tutorial2/wireless-configuration.png differ
diff --git a/docs/static/tutorial2/wireless.png b/docs/static/tutorial2/wireless.png
new file mode 100644
index 00000000..8543117d
Binary files /dev/null and b/docs/static/tutorial2/wireless.png differ
diff --git a/docs/static/tutorial3/mobility-script.png b/docs/static/tutorial3/mobility-script.png
new file mode 100644
index 00000000..6f32e5b1
Binary files /dev/null and b/docs/static/tutorial3/mobility-script.png differ
diff --git a/docs/static/tutorial3/motion_continued_breaks_link.png b/docs/static/tutorial3/motion_continued_breaks_link.png
new file mode 100644
index 00000000..cc1f5dcd
Binary files /dev/null and b/docs/static/tutorial3/motion_continued_breaks_link.png differ
diff --git a/docs/static/tutorial3/motion_from_ns2_file.png b/docs/static/tutorial3/motion_from_ns2_file.png
new file mode 100644
index 00000000..704cc1d9
Binary files /dev/null and b/docs/static/tutorial3/motion_from_ns2_file.png differ
diff --git a/docs/static/tutorial3/move-n2.png b/docs/static/tutorial3/move-n2.png
new file mode 100644
index 00000000..befcd4b0
Binary files /dev/null and b/docs/static/tutorial3/move-n2.png differ
diff --git a/docs/static/tutorial5/VM-network-settings.png b/docs/static/tutorial5/VM-network-settings.png
new file mode 100644
index 00000000..5d47738e
Binary files /dev/null and b/docs/static/tutorial5/VM-network-settings.png differ
diff --git a/docs/static/tutorial5/configure-the-rj45.png b/docs/static/tutorial5/configure-the-rj45.png
new file mode 100644
index 00000000..0e2b8f8b
Binary files /dev/null and b/docs/static/tutorial5/configure-the-rj45.png differ
diff --git a/docs/static/tutorial5/rj45-connector.png b/docs/static/tutorial5/rj45-connector.png
new file mode 100644
index 00000000..8c8e86ef
Binary files /dev/null and b/docs/static/tutorial5/rj45-connector.png differ
diff --git a/docs/static/tutorial5/rj45-unassigned.png b/docs/static/tutorial5/rj45-unassigned.png
new file mode 100644
index 00000000..eda4a3b6
Binary files /dev/null and b/docs/static/tutorial5/rj45-unassigned.png differ
diff --git a/docs/static/tutorial6/configure-icon.png b/docs/static/tutorial6/configure-icon.png
new file mode 100644
index 00000000..52a9e2e8
Binary files /dev/null and b/docs/static/tutorial6/configure-icon.png differ
diff --git a/docs/static/tutorial6/create-nodes.png b/docs/static/tutorial6/create-nodes.png
new file mode 100644
index 00000000..38257e24
Binary files /dev/null and b/docs/static/tutorial6/create-nodes.png differ
diff --git a/docs/static/tutorial6/hidden-nodes.png b/docs/static/tutorial6/hidden-nodes.png
new file mode 100644
index 00000000..604829dd
Binary files /dev/null and b/docs/static/tutorial6/hidden-nodes.png differ
diff --git a/docs/static/tutorial6/linked-nodes.png b/docs/static/tutorial6/linked-nodes.png
new file mode 100644
index 00000000..8e75007e
Binary files /dev/null and b/docs/static/tutorial6/linked-nodes.png differ
diff --git a/docs/static/tutorial6/only-node1-moving.png b/docs/static/tutorial6/only-node1-moving.png
new file mode 100644
index 00000000..01ac2ebd
Binary files /dev/null and b/docs/static/tutorial6/only-node1-moving.png differ
diff --git a/docs/static/tutorial6/scenario-with-motion.png b/docs/static/tutorial6/scenario-with-motion.png
new file mode 100644
index 00000000..e30e781c
Binary files /dev/null and b/docs/static/tutorial6/scenario-with-motion.png differ
diff --git a/docs/static/tutorial6/scenario-with-terrain.png b/docs/static/tutorial6/scenario-with-terrain.png
new file mode 100644
index 00000000..db424e9b
Binary files /dev/null and b/docs/static/tutorial6/scenario-with-terrain.png differ
diff --git a/docs/static/tutorial6/select-wallpaper.png b/docs/static/tutorial6/select-wallpaper.png
new file mode 100644
index 00000000..41d40f57
Binary files /dev/null and b/docs/static/tutorial6/select-wallpaper.png differ
diff --git a/docs/static/tutorial6/wlan-links.png b/docs/static/tutorial6/wlan-links.png
new file mode 100644
index 00000000..ab6c152d
Binary files /dev/null and b/docs/static/tutorial6/wlan-links.png differ
diff --git a/docs/static/tutorial7/scenario.png b/docs/static/tutorial7/scenario.png
new file mode 100644
index 00000000..1c677aa3
Binary files /dev/null and b/docs/static/tutorial7/scenario.png differ
diff --git a/docs/static/workflow.png b/docs/static/workflow.png
new file mode 100644
index 00000000..35613983
Binary files /dev/null and b/docs/static/workflow.png differ
diff --git a/docs/tutorials/common/grpc.md b/docs/tutorials/common/grpc.md
new file mode 100644
index 00000000..2a85d7c8
--- /dev/null
+++ b/docs/tutorials/common/grpc.md
@@ -0,0 +1,22 @@
+## gRPC Python Scripts
+
+You can also run the same steps above, using the provided gRPC script versions of scenarios.
+Below are the steps to run and join one of these scenario, then you can continue with
+the remaining steps of a given section.
+
+1. Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+2. From another terminal run the tutorial python script, which will create a session to join
+ ``` shell
+ /opt/core/venv/bin/python scenario.py
+ ```
+3. In another terminal run the CORE GUI
+ ``` shell
+ core-gui
+ ```
+4. You will be presented with sessions to join, select the one created by the script
+
+
+
diff --git a/docs/tutorials/overview.md b/docs/tutorials/overview.md
new file mode 100644
index 00000000..6ec0d275
--- /dev/null
+++ b/docs/tutorials/overview.md
@@ -0,0 +1,29 @@
+# CORE Tutorials
+
+These tutorials will cover various use cases within CORE. These
+tutorials will provide example python, gRPC, XML, and related files, as well
+as an explanation for their usage and purpose.
+
+## Checklist
+
+These are the items you should become familiar with for running all the tutorials below.
+
+* [Install CORE](../install.md)
+* [Tutorial Setup](setup.md)
+
+## Tutorials
+
+* [Tutorial 1 - Wired Network](tutorial1.md)
+ * Covers interactions when using a simple 2 node wired network
+* [Tutorial 2 - Wireless Network](tutorial2.md)
+ * Covers interactions when using a simple 3 node wireless network
+* [Tutorial 3 - Basic Mobility](tutorial3.md)
+ * Covers mobility interactions when using a simple 3 node wireless network
+* [Tutorial 4 - Tests](tutorial4.md)
+ * Covers automating scenarios as tests to validate software
+* [Tutorial 5 - RJ45 Node](tutorial5.md)
+ * Covers using the RJ45 node to connect a Windows OS
+* [Tutorial 6 - Improve Visuals](tutorial6.md)
+ * Covers changing the look of a scenario within the CORE GUI
+* [Tutorial 7 - EMANE](tutorial7.md)
+ * Covers using EMANE within CORE for higher fidelity RF networks
diff --git a/docs/tutorials/setup.md b/docs/tutorials/setup.md
new file mode 100644
index 00000000..858b0f1d
--- /dev/null
+++ b/docs/tutorials/setup.md
@@ -0,0 +1,82 @@
+# Tutorial Setup
+
+## Setup for CORE
+
+We assume the prior installation of CORE, using a virtual environment. You can
+then adjust your PATH and add an alias to help more conveniently run CORE
+commands.
+
+This can be setup in your **.bashrc**
+
+```shell
+export PATH=$PATH:/opt/core/venv/bin
+alias sudop='sudo env PATH=$PATH'
+```
+
+## Setup for Chat App
+
+There is a simple TCP chat app provided as example software to use and run within
+the tutorials provided.
+
+### Installation
+
+The following will install chatapp and its scripts into **/usr/local**, which you
+may need to add to PATH within node to be able to use command directly.
+
+``` shell
+sudo python3 -m pip install .
+```
+
+!!! note
+
+ Some Linux distros will not have **/usr/local** in their PATH and you
+ will need to compensate.
+
+``` shell
+export PATH=$PATH:/usr/local
+```
+
+### Running the Server
+
+The server will print and log connected clients and their messages.
+
+``` shell
+usage: chatapp-server [-h] [-a ADDRESS] [-p PORT]
+
+chat app server
+
+optional arguments:
+ -h, --help show this help message and exit
+ -a ADDRESS, --address ADDRESS
+ address to listen on (default: )
+ -p PORT, --port PORT port to listen on (default: 9001)
+```
+
+### Running the Client
+
+The client will print and log messages from other clients and their join/leave status.
+
+``` shell
+usage: chatapp-client [-h] -a ADDRESS [-p PORT]
+
+chat app client
+
+optional arguments:
+ -h, --help show this help message and exit
+ -a ADDRESS, --address ADDRESS
+ address to listen on (default: None)
+ -p PORT, --port PORT port to listen on (default: 9001)
+```
+
+### Installing the Chat App Service
+
+1. You will first need to edit **/etc/core/core.conf** to update the config
+ service path to pick up your service
+ ``` shell
+ custom_config_services_dir =
+ ```
+2. Then you will need to copy/move **chatapp/chatapp_service.py** to the directory
+ configured above
+3. Then you will need to restart the **core-daemon** to pick up this new service
+4. Now the service will be an available option under the group **ChatApp** with
+ the name **ChatApp Server**
diff --git a/docs/tutorials/tutorial1.md b/docs/tutorials/tutorial1.md
new file mode 100644
index 00000000..7bda7e7f
--- /dev/null
+++ b/docs/tutorials/tutorial1.md
@@ -0,0 +1,252 @@
+# Tutorial 1 - Wired Network
+
+## Overview
+
+This tutorial will cover some use cases when using a wired 2 node
+scenario in CORE.
+
+
+
+
+
+## Files
+
+Below is the list of files used for this tutorial.
+
+* 2 node wired scenario
+ * scenario.xml
+ * scenario.py
+* 2 node wired scenario, with **n1** running the "Chat App Server" service
+ * scenario_service.xml
+ * scenario_service.py
+
+## Running this Tutorial
+
+This section covers interactions that can be carried out for this scenario.
+
+Our scenario has the following nodes and addresses:
+
+* n1 - 10.0.0.20
+* n2 - 10.0.0.21
+
+All usages below assume a clean scenario start.
+
+### Using Ping
+
+Using the command line utility **ping** can be a good way to verify connectivity
+between nodes in CORE.
+
+* Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ``` shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**, then navigate to and select **scenario.xml**
+
+
+
+* You can now click on the **Start Session** button to run the scenario
+
+
+
+* Open a terminal on **n1** by double clicking it in the GUI
+* Run the following in **n1** terminal
+ ``` shell
+ ping -c 3 10.0.0.21
+ ```
+* You should see the following output
+ ``` shell
+ PING 10.0.0.21 (10.0.0.21) 56(84) bytes of data.
+ 64 bytes from 10.0.0.21: icmp_seq=1 ttl=64 time=0.085 ms
+ 64 bytes from 10.0.0.21: icmp_seq=2 ttl=64 time=0.079 ms
+ 64 bytes from 10.0.0.21: icmp_seq=3 ttl=64 time=0.072 ms
+
+ --- 10.0.0.21 ping statistics ---
+ 3 packets transmitted, 3 received, 0% packet loss, time 1999ms
+ rtt min/avg/max/mdev = 0.072/0.078/0.085/0.011 ms
+ ```
+
+### Using Tcpdump
+
+Using **tcpdump** can be very beneficial for examining a network. You can verify
+traffic being sent/received among many other uses.
+
+* Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ``` shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**, then navigate to and select **scenario.xml**
+
+
+
+* You can now click on the **Start Session** button to run the scenario
+
+
+
+* Open a terminal on **n1** by double clicking it in the GUI
+* Open a terminal on **n2** by double clicking it in the GUI
+* Run the following in **n2** terminal
+ ``` shell
+ tcpdump -lenni eth0
+ ```
+* Run the following in **n1** terminal
+ ``` shell
+ ping -c 1 10.0.0.21
+ ```
+* You should see the following in **n2** terminal
+ ``` shell
+ tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
+ listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
+ 10:23:04.685292 00:00:00:aa:00:00 > 00:00:00:aa:00:01, ethertype IPv4 (0x0800), length 98: 10.0.0.20 > 10.0.0.21: ICMP echo request, id 67, seq 1, length 64
+ 10:23:04.685329 00:00:00:aa:00:01 > 00:00:00:aa:00:00, ethertype IPv4 (0x0800), length 98: 10.0.0.21 > 10.0.0.20: ICMP echo reply, id 67, seq 1, length 64
+ ```
+
+### Editing a Link
+
+You can edit links between nodes in CORE to modify loss, delay, bandwidth, and more. This can be
+beneficial for understanding how software will behave in adverse conditions.
+
+* Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ``` shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**, then navigate to and select **scenario.xml**
+
+
+
+* You can now click on the **Start Session** button to run the scenario
+
+
+
+* Right click the link between **n1** and **n2**
+* Select **Configure**
+
+
+
+* Update the loss to **25**
+
+
+
+* Open a terminal on **n1** by double clicking it in the GUI
+* Run the following in **n1** terminal
+ ``` shell
+ ping -c 10 10.0.0.21
+ ```
+* You should see something similar for the summary output, reflecting the change in loss
+ ``` shell
+ --- 10.0.0.21 ping statistics ---
+ 10 packets transmitted, 6 received, 40% packet loss, time 9000ms
+ rtt min/avg/max/mdev = 0.077/0.093/0.108/0.016 ms
+ ```
+* Remember that the loss above is compounded, since a ping and the loss applied occurs in both directions
+
+### Running Software
+
+We will now leverage the installed Chat App software to stand up a server and client
+within the nodes of our scenario.
+
+* Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ``` shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**, then navigate to and select **scenario.xml**
+
+
+
+* You can now click on the **Start Session** button to run the scenario
+
+
+
+* Open a terminal on **n1** by double clicking it in the GUI
+* Run the following in **n1** terminal
+ ``` shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-server
+ ```
+* Open a terminal on **n2** by double clicking it in the GUI
+* Run the following in **n2** terminal
+ ``` shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-client -a 10.0.0.20
+ ```
+* You will see the following output in **n1** terminal
+ ``` shell
+ chat server listening on: :9001
+ [server] 10.0.0.21:44362 joining
+ ```
+* Type the following in **n2** terminal and hit enter
+ ``` shell
+ hello world
+ ```
+* You will see the following output in **n1** terminal
+ ``` shell
+ chat server listening on: :9001
+ [server] 10.0.0.21:44362 joining
+ [10.0.0.21:44362] hello world
+ ```
+
+### Tailing a Log
+
+In this case we are using the service based scenario. This will automatically start
+and run the Chat App Server on **n1** and log to a file. This case will demonstrate
+using `tail -f` to observe the output of running software.
+
+* Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ``` shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**, then navigate to and select **scenario_service.xml**
+
+
+
+* You can now click on the **Start Session** button to run the scenario
+
+
+
+* Open a terminal on **n1** by double clicking it in the GUI
+* Run the following in **n1** terminal
+ ``` shell
+ tail -f chatapp.log
+ ```
+* Open a terminal on **n2** by double clicking it in the GUI
+* Run the following in **n2** terminal
+ ``` shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-client -a 10.0.0.20
+ ```
+* You will see the following output in **n1** terminal
+ ``` shell
+ chat server listening on: :9001
+ [server] 10.0.0.21:44362 joining
+ ```
+* Type the following in **n2** terminal and hit enter
+ ``` shell
+ hello world
+ ```
+* You will see the following output in **n1** terminal
+ ``` shell
+ chat server listening on: :9001
+ [server] 10.0.0.21:44362 joining
+ [10.0.0.21:44362] hello world
+ ```
+
+--8<-- "tutorials/common/grpc.md"
diff --git a/docs/tutorials/tutorial2.md b/docs/tutorials/tutorial2.md
new file mode 100644
index 00000000..7b82e04e
--- /dev/null
+++ b/docs/tutorials/tutorial2.md
@@ -0,0 +1,145 @@
+# Tutorial 2 - Wireless Network
+
+## Overview
+
+This tutorial will cover the use of a 3 node scenario in CORE. Then
+running a chat server on one node and a chat client on the other. The client will
+send a simple message and the server will log receipt of the message.
+
+## Files
+
+Below is the list of files used for this tutorial.
+
+* scenario.xml - 3 node CORE xml scenario file (wireless)
+* scenario.py - 3 node CORE gRPC python script (wireless)
+
+## Running with the XML Scenario File
+
+This section will cover running this sample tutorial using the
+XML scenario file, leveraging an NS2 mobility file.
+
+* Make sure the **core-daemon** is running a terminal
+ ```shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ```shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**
+* Navigate to and select this tutorials **scenario.xml** file
+* You can now click play to start the session
+
+
+
+* Note that OSPF routing protocol is included in the scenario to provide routes to other nodes, as they are discovered
+* Double click node **n4** to open a terminal and ping node **n2**
+ ```shell
+ ping -c 2 10.0.0.2
+ PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
+ 64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=20.2 ms
+ 64 bytes from 10.0.0.2: icmp_seq=2 ttl=63 time=20.2 ms
+
+ --- 10.0.0.2 ping statistics ---
+ 2 packets transmitted, 2 received, 0% packet loss, time 1000ms
+ rtt min/avg/max/mdev = 20.168/20.173/20.178/0.005 ms
+ ```
+
+### Configuring Delay
+
+* Right click on the **wlan1** node and select **WLAN Config**, then set delay to 500000
+
+
+
+* Using the open terminal for node **n4**, ping **n2** again, expect about 2 seconds delay
+ ```shell
+ ping -c 5 10.0.0.2
+ 64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=2001 ms
+ 64 bytes from 10.0.0.2: icmp_seq=2 ttl=63 time=2000 ms
+ 64 bytes from 10.0.0.2: icmp_seq=3 ttl=63 time=2000 ms
+ 64 bytes from 10.0.0.2: icmp_seq=4 ttl=63 time=2000 ms
+ 64 bytes from 10.0.0.2: icmp_seq=5 ttl=63 time=2000 ms
+
+ --- 10.0.0.2 ping statistics ---
+ 5 packets transmitted, 5 received, 0% packet loss, time 4024ms
+ rtt min/avg/max/mdev = 2000.176/2000.438/2001.166/0.376 ms, pipe 2
+ ```
+
+### Configure Loss
+
+* Right click on the **wlan1** node and select **WLAN Config**, set delay back to 5000 and loss to 10
+
+
+
+* Using the open terminal for node **n4**, ping **n2** again, expect to notice considerable loss
+ ```shell
+ ping -c 10 10.0.0.2
+ PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
+ 64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=20.4 ms
+ 64 bytes from 10.0.0.2: icmp_seq=2 ttl=63 time=20.5 ms
+ 64 bytes from 10.0.0.2: icmp_seq=3 ttl=63 time=20.2 ms
+ 64 bytes from 10.0.0.2: icmp_seq=4 ttl=63 time=20.8 ms
+ 64 bytes from 10.0.0.2: icmp_seq=5 ttl=63 time=21.9 ms
+ 64 bytes from 10.0.0.2: icmp_seq=8 ttl=63 time=22.7 ms
+ 64 bytes from 10.0.0.2: icmp_seq=9 ttl=63 time=22.4 ms
+ 64 bytes from 10.0.0.2: icmp_seq=10 ttl=63 time=20.3 ms
+
+ --- 10.0.0.2 ping statistics ---
+ 10 packets transmitted, 8 received, 20% packet loss, time 9064ms
+ rtt min/avg/max/mdev = 20.188/21.143/22.717/0.967 ms
+ ```
+* Make sure to set loss back to 0 when done
+
+## Running with the gRPC Python Script
+
+This section will cover running this sample tutorial using the
+gRPC python script and providing mobility over the gRPC interface.
+
+* Make sure the **core-daemon** is running a terminal
+ ```shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ```shell
+ core-gui
+ ```
+* From another terminal run the **scenario.py** script
+ ```shell
+ /opt/core/venv/bin/python scenario.py
+ ```
+* In the GUI dialog box select the session and click connect
+* You will now have joined the already running scenario
+
+
+
+
+
+## Running Software
+
+We will now leverage the installed Chat App software to stand up a server and client
+within the nodes of our scenario. You can use the bases of the running scenario from
+either **scenario.xml** or the **scenario.py** gRPC script.
+
+* In the GUI double click on node **n4**, this will bring up a terminal for this node
+* In the **n4** terminal, run the server
+ ```shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-server
+ ```
+* In the GUI double click on node **n2**, this will bring up a terminal for this node
+* In the **n2** terminal, run the client
+ ```shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-client -a 10.0.0.4
+ ```
+* This will result in **n2** connecting to the server
+* In the **n2** terminal, type a message at the client prompt
+ ```shell
+ >>hello world
+ ```
+* Observe that text typed at client then appears in the terminal of **n4**
+ ```shell
+ chat server listening on: :9001
+ [server] 10.0.0.2:53684 joining
+ [10.0.0.2:53684] hello world
+ ```
diff --git a/docs/tutorials/tutorial3.md b/docs/tutorials/tutorial3.md
new file mode 100644
index 00000000..eaa2a5e6
--- /dev/null
+++ b/docs/tutorials/tutorial3.md
@@ -0,0 +1,155 @@
+# Tutorial 3 - Basic Mobility
+
+## Overview
+
+This tutorial will cover using a 3 node scenario in CORE with basic mobility.
+Mobility can be provided from a NS2 file or by including mobility commands in a gRPC script.
+
+## Files
+
+Below is the list of files used for this tutorial.
+
+* movements1.txt - a NS2 mobility input file
+* scenario.xml - 3 node CORE xml scenario file (wireless)
+* scenario.py - 3 node CORE gRPC python script (wireless)
+* printout.py - event listener
+
+## Running with XML file using NS2 Movement
+
+This section will cover running this sample tutorial using the XML scenario
+file, leveraging an NS2 file for mobility.
+
+* Make sure the **core-daemon** is running a terminal
+ ```shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ```shell
+ core-gui
+ ```
+* Observe the format of the N2 file, cat movements1.txt. Note that this file was manually developed.
+ ```shell
+ $node_(1) set X_ 208.1
+ $node_(1) set Y_ 211.05
+ $node_(1) set Z_ 0
+ $ns_ at 0.0 "$node_(1) setdest 208.1 211.05 0.00"
+ $node_(2) set X_ 393.1
+ $node_(2) set Y_ 223.05
+ $node_(2) set Z_ 0
+ $ns_ at 0.0 "$node_(2) setdest 393.1 223.05 0.00"
+ $node_(4) set X_ 499.1
+ $node_(4) set Y_ 186.05
+ $node_(4) set Z_ 0
+ $ns_ at 0.0 "$node_(4) setdest 499.1 186.05 0.00"
+ $ns_ at 1.0 "$node_(1) setdest 190.1 225.05 0.00"
+ $ns_ at 1.0 "$node_(2) setdest 393.1 225.05 0.00"
+ $ns_ at 1.0 "$node_(4) setdest 515.1 186.05 0.00"
+ $ns_ at 2.0 "$node_(1) setdest 175.1 250.05 0.00"
+ $ns_ at 2.0 "$node_(2) setdest 393.1 250.05 0.00"
+ $ns_ at 2.0 "$node_(4) setdest 530.1 186.05 0.00"
+ $ns_ at 3.0 "$node_(1) setdest 160.1 275.05 0.00"
+ $ns_ at 3.0 "$node_(2) setdest 393.1 275.05 0.00"
+ $ns_ at 3.0 "$node_(4) setdest 530.1 186.05 0.00"
+ $ns_ at 4.0 "$node_(1) setdest 160.1 300.05 0.00"
+ $ns_ at 4.0 "$node_(2) setdest 393.1 300.05 0.00"
+ $ns_ at 4.0 "$node_(4) setdest 550.1 186.05 0.00"
+ $ns_ at 5.0 "$node_(1) setdest 160.1 275.05 0.00"
+ $ns_ at 5.0 "$node_(2) setdest 393.1 275.05 0.00"
+ $ns_ at 5.0 "$node_(4) setdest 530.1 186.05 0.00"
+ $ns_ at 6.0 "$node_(1) setdest 175.1 250.05 0.00"
+ $ns_ at 6.0 "$node_(2) setdest 393.1 250.05 0.00"
+ $ns_ at 6.0 "$node_(4) setdest 515.1 186.05 0.00"
+ $ns_ at 7.0 "$node_(1) setdest 190.1 225.05 0.00"
+ $ns_ at 7.0 "$node_(2) setdest 393.1 225.05 0.00"
+ $ns_ at 7.0 "$node_(4) setdest 499.1 186.05 0.00"
+ ```
+* In the GUI menu bar select **File->Open...**, and select this tutorials **scenario.xml** file
+* You can now click play to start the session
+* Select the play button on the Mobility Player to start mobility
+* Observe movement of the nodes
+* Note that OSPF routing protocol is included in the scenario to build routing table so that routes to other nodes are
+ known and when the routes are discovered, ping will work
+
+
+
+
+
+## Running with the gRPC Script
+
+This section covers using a gRPC script to create and provide scenario movement.
+
+* Make sure the **core-daemon** is running a terminal
+ ```shell
+ sudop core-daemon
+ ```
+* From another terminal run the **scenario.py** script
+ ```shell
+ /opt/core/venv/bin/python scenario.py
+ ```
+* In another terminal run the GUI
+ ```shell
+ core-gui
+ ```
+* In the GUI dialog box select the session and click connect
+* You will now have joined the already running scenario
+* In the terminal running the **scenario.py**, hit a key to start motion
+
+
+
+* Observe the link between **n3** and **n4** is shown and then as motion continues the link breaks
+
+
+
+
+## Running the Chat App Software
+
+This section covers using one of the above 2 scenarios to run software within
+the nodes.
+
+* In the GUI double click on **n4**, this will bring up a terminal for this node
+* in the **n4** terminal, run the server
+ ```shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-server
+ ```
+* In the GUI double click on **n2**, this will bring up a terminal for this node
+* In the **n2** terminal, run the client
+ ```shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-client -a 10.0.0.4
+ ```
+* This will result in **n2** connecting to the server
+* In the **n2** terminal, type a message at the client prompt and hit enter
+ ```shell
+ >>hello world
+ ```
+* Observe that text typed at client then appears in the server terminal
+ ```shell
+ chat server listening on: :9001
+ [server] 10.0.0.2:53684 joining
+ [10.0.0.2:53684] hello world
+ ```
+
+## Running Mobility from a Node
+
+This section provides an example for running a script within a node, that
+leverages a control network in CORE for issuing mobility using the gRPC
+API.
+
+* Edit the following line in **/etc/core/core.conf**
+ ```shell
+ grpcaddress = 0.0.0.0
+ ```
+* Start the scenario from the **scenario.xml**
+* From the GUI open **Session -> Options** and set **Control Network** to **172.16.0.0/24**
+* Click to play the scenario
+* Double click on **n2** to get a terminal window
+* From the terminal window for **n2**, run the script
+ ```shell
+ /opt/core/venv/bin/python move-node2.py
+ ```
+* Observe that node 2 moves and continues to move
+
+
+
+
diff --git a/docs/tutorials/tutorial4.md b/docs/tutorials/tutorial4.md
new file mode 100644
index 00000000..77ac1c94
--- /dev/null
+++ b/docs/tutorials/tutorial4.md
@@ -0,0 +1,121 @@
+# Tutorial 4 - Tests
+
+## Overview
+
+A use case for CORE would be to help automate integration tests for running
+software within a network. This tutorial covers using CORE with the python
+pytest testing framework. It will show how you can define tests, for different
+use cases to validate software and outcomes within a defined network. Using
+pytest, you would create tests using all the standard pytest functionality.
+Creating a test file, and then defining test functions to run. For these tests,
+we are leveraging the CORE library directly and the API it provides.
+
+Refer to the [pytest documentation](https://docs.pytest.org) for indepth
+information on how to write tests with pytest.
+
+## Files
+
+A directory is used for containing your tests. Within this directory we need a
+**conftest.py**, which pytest will pick up to help define and provide
+test fixtures, which will be leveraged within our tests.
+
+* tests
+ * conftest.py - file used by pytest to define fixtures, which can be shared across tests
+ * test_ping.py - defines test classes/functions to run
+
+## Test Fixtures
+
+Below are the definitions for fixture you can define to facilitate and make
+creating CORE based tests easier.
+
+The global session fixture creates one **CoreEmu** object for the entire
+test session, yields it for testing, and calls shutdown when everything
+is over.
+
+``` python
+@pytest.fixture(scope="session")
+def global_session():
+ core = CoreEmu()
+ session = core.create_session()
+ session.set_state(EventTypes.CONFIGURATION_STATE)
+ yield session
+ core.shutdown()
+```
+
+The regular session fixture leverages the global session fixture. It
+will set the correct state for each test case, yield the session for a test,
+and then clear the session after a test finishes to prepare for the next
+test.
+
+``` python
+@pytest.fixture
+def session(global_session):
+ global_session.set_state(EventTypes.CONFIGURATION_STATE)
+ yield global_session
+ global_session.clear()
+```
+
+The ip prefixes fixture help provide a preconfigured convenience for
+creating and assigning interfaces to nodes, when creating your network
+within a test. The address subnet can be whatever you desire.
+
+``` python
+@pytest.fixture(scope="session")
+def ip_prefixes():
+ return IpPrefixes(ip4_prefix="10.0.0.0/24")
+```
+
+## Test Functions
+
+Within a pytest test file, you have the freedom to create any kind of
+test you like, but they will all follow a similar formula.
+
+* define a test function that will leverage the session and ip prefixes fixtures
+* then create a network to test, using the session fixture
+* run commands within nodes as desired, to test out your use case
+* validate command result or output for expected behavior to pass or fail
+
+In the test below, we create a simple 2 node wired network and validate
+node1 can ping node2 successfully.
+
+``` python
+def test_success(self, session: Session, ip_prefixes: IpPrefixes):
+ # create nodes
+ node1 = session.add_node(CoreNode)
+ node2 = session.add_node(CoreNode)
+
+ # link nodes together
+ iface1_data = ip_prefixes.create_iface(node1)
+ iface2_data = ip_prefixes.create_iface(node2)
+ session.add_link(node1.id, node2.id, iface1_data, iface2_data)
+
+ # ping node, expect a successful command
+ node1.cmd(f"ping -c 1 {iface2_data.ip4}")
+```
+
+## Install Pytest
+
+Since we are running an automated test within CORE, we will need to install
+pytest within the python interpreter used by CORE.
+
+``` shell
+sudo /opt/core/venv/bin/python -m pip install pytest
+```
+
+## Running Tests
+
+You can run your own or the provided tests, by running the following.
+
+``` shell
+cd
+sudo /opt/core/venv/bin/python -m pytest -v
+```
+
+If you run the provided tests, you would expect to see the two tests
+running and passing.
+
+``` shell
+tests/test_ping.py::TestPing::test_success PASSED [ 50%]
+tests/test_ping.py::TestPing::test_failure PASSED [100%]
+```
+
diff --git a/docs/tutorials/tutorial5.md b/docs/tutorials/tutorial5.md
new file mode 100644
index 00000000..92337717
--- /dev/null
+++ b/docs/tutorials/tutorial5.md
@@ -0,0 +1,168 @@
+# Tutorial 5 - RJ45 Node
+
+## Overview
+
+This tutorial will cover connecting CORE VM to a Windows host machine using a RJ45 node.
+
+## Files
+
+Below is the list of files used for this tutorial.
+
+* scenario.xml - the scenario with RJ45 unassigned
+* scenario.py- grpc script to create the RJ45 in simple CORE scenario
+* client_for_windows.py - chat app client modified for windows
+
+## Running with the Saved XML File
+
+This section covers using the saved **scenario.xml** file to get and up and running.
+
+* Configure the Windows host VM to have a bridged network adapter
+
+
+
+* Make sure the **core-daemon** is running in a terminal
+ ```shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ```shell
+ core-gui
+ ```
+* Open the **scenario.xml** with the unassigned RJ45 node
+
+
+
+* Configure the RJ45 node name to use the bridged interface
+
+
+
+* After configuring the RJ45, run the scenario:
+
+
+
+* Double click node **n1** to open a terminal and add a route to the Windows host
+ ```shell
+ ip route add 192.168.0.0/24 via 10.0.0.20
+ ```
+* On the Windows host using Windows command prompt with administrator privilege, add a route that uses the interface
+ connected to the associated interface assigned to the RJ45 node
+ ```shell
+ # if enp0s3 is ssigned 192.168.0.6/24
+ route add 10.0.0.0 mask 255.255.255.0 192.168.0.6
+ ```
+* Now you should be able to ping from the Windows host to **n1**
+ ```shell
+ C:\WINDOWS\system32>ping 10.0.0.20
+
+ Pinging 10.0.0.20 with 32 bytes of data:
+ Reply from 10.0.0.20: bytes=32 time<1ms TTL=64
+ Reply from 10.0.0.20: bytes=32 time<1ms TTL=64
+ Reply from 10.0.0.20: bytes=32 time<1ms TTL=64
+ Reply from 10.0.0.20: bytes=32 time<1ms TTL=64
+
+ Ping statistics for 10.0.0.20:
+ Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
+ Approximate round trip times in milli-seconds:
+ Minimum = 0ms, Maximum = 0ms, Average = 0ms
+ ```
+* After pinging successfully, run the following in the **n1** terminal to start the chatapp server
+ ```shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-server
+ ```
+* On the Windows host, run the **client_for_windows.py**
+ ```shell
+ python3 client_for_windows.py -a 10.0.0.20
+ connected to server(10.0.0.20:9001) as client(192.168.0.6:49960)
+ >> .Hello WORLD
+ .Hello WORLD Again
+ .
+ ```
+* Observe output on **n1**
+ ```shell
+ chat server listening on: :9001
+ [server] 192.168.0.6:49960 joining
+ [192.168.0.6:49960] Hello WORLD
+ [192.168.0.6:49960] Hello WORLD Again
+ ```
+* When finished, you can stop the CORE scenario and cleanup
+* On the Windows host remove the added route
+ ```shell
+ route delete 10.0.0.0
+ ```
+
+## Running with the gRPC Script
+
+This section covers leveraging the gRPC script to get up and running.
+
+* Configure the Windows host VM to have a bridged network adapter
+
+
+
+* Make sure the **core-daemon** is running in a terminal
+ ```shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ```shell
+ core-gui
+ ```
+* Run the gRPC script in the VM
+ ```shell
+ # use the desired interface name, in this case enp0s3
+ /opt/core/venv/bin/python scenario.py enp0s3
+ ```
+* In the **core-gui** connect to the running session that was created
+
+
+
+* Double click node **n1** to open a terminal and add a route to the Windows host
+ ```shell
+ ip route add 192.168.0.0/24 via 10.0.0.20
+ ```
+* On the Windows host using Windows command prompt with administrator privilege, add a route that uses the interface
+ connected to the associated interface assigned to the RJ45 node
+ ```shell
+ # if enp0s3 is ssigned 192.168.0.6/24
+ route add 10.0.0.0 mask 255.255.255.0 192.168.0.6
+ ```
+* Now you should be able to ping from the Windows host to **n1**
+ ```shell
+ C:\WINDOWS\system32>ping 10.0.0.20
+
+ Pinging 10.0.0.20 with 32 bytes of data:
+ Reply from 10.0.0.20: bytes=32 time<1ms TTL=64
+ Reply from 10.0.0.20: bytes=32 time<1ms TTL=64
+ Reply from 10.0.0.20: bytes=32 time<1ms TTL=64
+ Reply from 10.0.0.20: bytes=32 time<1ms TTL=64
+
+ Ping statistics for 10.0.0.20:
+ Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
+ Approximate round trip times in milli-seconds:
+ Minimum = 0ms, Maximum = 0ms, Average = 0ms
+ ```
+* After pinging successfully, run the following in the **n1** terminal to start the chatapp server
+ ```shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-server
+ ```
+* On the Windows host, run the **client_for_windows.py**
+ ```shell
+ python3 client_for_windows.py -a 10.0.0.20
+ connected to server(10.0.0.20:9001) as client(192.168.0.6:49960)
+ >> .Hello WORLD
+ .Hello WORLD Again
+ .
+ ```
+* Observe output on **n1**
+ ```shell
+ chat server listening on: :9001
+ [server] 192.168.0.6:49960 joining
+ [192.168.0.6:49960] Hello WORLD
+ [192.168.0.6:49960] Hello WORLD Again
+ ```
+* When finished, you can stop the CORE scenario and cleanup
+* On the Windows host remove the added route
+ ```shell
+ route delete 10.0.0.0
+ ```
diff --git a/docs/tutorials/tutorial6.md b/docs/tutorials/tutorial6.md
new file mode 100644
index 00000000..46bb57ac
--- /dev/null
+++ b/docs/tutorials/tutorial6.md
@@ -0,0 +1,97 @@
+# Tutorial 6 - Improved Visuals
+
+## Overview
+
+This tutorial will cover changing the node icons, changing the background, and changing or hiding links.
+
+## Files
+
+Below is the list of files used for this tutorial.
+
+* drone.png - icon for a drone
+* demo.py - a mobility script for a node
+* terrain.png - a background
+* completed-scenario.xml - the scenario after making all changes below
+
+## Running this Tutorial
+
+This section will cover running this sample tutorial that develops a scenario file.
+
+* Ensure that **/etc/core/core.conf** has **grpcaddress** set to **0.0.0.0**
+* Make sure the **core-daemon** is running in a terminal
+ ```shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ```shell
+ core-gui
+ ```
+
+### Changing Node Icons
+
+* Create three MDR nodes
+
+
+
+* Double click on each node for configuration, click the icon and set it to use the **drone.png** image
+
+
+
+* Use **Session -> Options** and set **Control Network 0** to **172.16.0.0./24**
+
+### Linking Nodes to WLAN
+
+* Add a WLAN Node
+* Link the three prior MDR nodes to the WLAN node
+
+
+
+* Click play to start the scenario
+* Observe wireless links being created
+
+
+
+* Click stop to end the scenario
+* Right click the WLAN node and select **Edit -> Hide**
+* Now you can view the nodes in isolation
+
+
+
+
+### Changing Canvas Background
+
+* Click **Canvas -> Wallpaper** to set the background to terrain.png
+
+
+
+* Click play to start the scenario again
+* You now have a scenario with drone icons, terrain background, links displayed and hidden WLAN node
+
+
+
+
+## Adding Mobility
+
+* Open and play the **completed-scenario.xml**
+* Double click on **n1** and run the **demo.py** script
+ ```shell
+ # node id is first parameter, second is total nodes
+ /opt/core/venv/bin/python demo.py 1 3
+ ```
+* Let it run to see the link break as the node 1 drone approches the right side
+
+
+
+* Repeat for other nodes, double click on **n2** and **n3** and run the demo.py script
+ ```shell
+ # n2
+ /opt/core/venv/bin/python demo.py 2 3
+ # n3
+ /opt/core/venv/bin/python demo.py 3 3
+ ```
+* You can turn off wireless links via **View -> Wireless Links**
+* Observe nodes moving in parallel tracks, when the far right is reached, the node will move down
+ and then move to the left. When the far left is reached, the drone will move down and then move to the right.
+
+
+
diff --git a/docs/tutorials/tutorial7.md b/docs/tutorials/tutorial7.md
new file mode 100644
index 00000000..2cc2f812
--- /dev/null
+++ b/docs/tutorials/tutorial7.md
@@ -0,0 +1,236 @@
+# Tutorial 7 - EMANE
+
+## Overview
+
+This tutorial will cover basic usage and some concepts one may want to
+use or leverage when working with and creating EMANE based networks.
+
+
+
+
+
+For more detailed information on EMANE see the following:
+
+* [EMANE in CORE](../emane.md)
+* [EMANE Wiki](https://github.com/adjacentlink/emane/wiki)
+
+## Files
+
+Below is a list of the files used for this tutorial.
+
+* 2 node EMANE ieee80211abg scenario
+ * scenario.xml
+ * scenario.py
+* 2 node EMANE ieee80211abg scenario, with **n2** running the "Chat App Server" service
+ * scenario_service.xml
+ * scenario_service.py
+
+## Running this Tutorial
+
+This section covers interactions that can be carried out for this scenario.
+
+Our scenario has the following nodes and addresses:
+
+* emane1 - no address, this is a representative node for the EMANE network
+* n2 - 10.0.0.1
+* n3 - 10.0.0.2
+
+All usages below assume a clean scenario start.
+
+### Using Ping
+
+Using the command line utility **ping** can be a good way to verify connectivity
+between nodes in CORE.
+
+* Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ``` shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**, then navigate to and select **scenario.xml**
+
+
+
+* You can now click on the **Start Session** button to run the scenario
+
+
+
+* Open a terminal on **n2** by double clicking it in the GUI
+* Run the following in **n2** terminal
+ ``` shell
+ ping -c 3 10.0.0.2
+ ```
+* You should see the following output
+ ``` shell
+ PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
+ 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=7.93 ms
+ 64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=3.07 ms
+ 64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=3.05 ms
+
+ --- 10.0.0.2 ping statistics ---
+ 3 packets transmitted, 3 received, 0% packet loss, time 2000ms
+ rtt min/avg/max/mdev = 3.049/4.685/7.932/2.295 ms
+ ```
+
+### Using Tcpdump
+
+Using **tcpdump** can be very beneficial for examining a network. You can verify
+traffic being sent/received among many other uses.
+
+* Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ``` shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**, then navigate to and select **scenario.xml**
+
+
+
+* You can now click on the **Start Session** button to run the scenario
+
+
+
+* Open a terminal on **n2** by double clicking it in the GUI
+* Open a terminal on **n3** by double clicking it in the GUI
+* Run the following in **n3** terminal
+ ``` shell
+ tcpdump -lenni eth0
+ ```
+* Run the following in **n2** terminal
+ ``` shell
+ ping -c 1 10.0.0.2
+ ```
+* You should see the following in **n2** terminal
+ ``` shell
+ tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
+ listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
+ 14:56:25.414283 02:02:00:00:00:01 > 02:02:00:00:00:02, ethertype IPv4 (0x0800), length 98: 10.0.0.1 > 10.0.0.2: ICMP echo request, id 64832, seq 1, length 64
+ 14:56:25.414303 02:02:00:00:00:02 > 02:02:00:00:00:01, ethertype IPv4 (0x0800), length 98: 10.0.0.2 > 10.0.0.1: ICMP echo reply, id 64832, seq 1, length 64
+ ```
+
+### Running Software
+
+We will now leverage the installed Chat App software to stand up a server and client
+within the nodes of our scenario.
+
+* Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ``` shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**, then navigate to and select **scenario.xml**
+
+
+
+* You can now click on the **Start Session** button to run the scenario
+
+
+
+* Open a terminal on **n2** by double clicking it in the GUI
+* Run the following in **n2** terminal
+ ``` shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-server
+ ```
+* Open a terminal on **n3** by double clicking it in the GUI
+* Run the following in **n3** terminal
+ ``` shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-client -a 10.0.0.1
+ ```
+* You will see the following output in **n1** terminal
+ ``` shell
+ chat server listening on: :9001
+ [server] 10.0.0.1:44362 joining
+ ```
+* Type the following in **n2** terminal and hit enter
+ ``` shell
+ hello world
+ ```
+* You will see the following output in **n1** terminal
+ ``` shell
+ chat server listening on: :9001
+ [server] 10.0.0.2:44362 joining
+ [10.0.0.2:44362] hello world
+ ```
+
+### Tailing a Log
+
+In this case we are using the service based scenario. This will automatically start
+and run the Chat App Server on **n2** and log to a file. This case will demonstrate
+using `tail -f` to observe the output of running software.
+
+* Make sure the CORE daemon is running a terminal, if not already
+ ``` shell
+ sudop core-daemon
+ ```
+* In another terminal run the GUI
+ ``` shell
+ core-gui
+ ```
+* In the GUI menu bar select **File->Open...**, then navigate to and select **scenario_service.xml**
+
+
+
+* You can now click on the **Start Session** button to run the scenario
+
+
+
+* Open a terminal on **n2** by double clicking it in the GUI
+* Run the following in **n2** terminal
+ ``` shell
+ tail -f chatapp.log
+ ```
+* Open a terminal on **n3** by double clicking it in the GUI
+* Run the following in **n3** terminal
+ ``` shell
+ export PATH=$PATH:/usr/local/bin
+ chatapp-client -a 10.0.0.1
+ ```
+* You will see the following output in **n2** terminal
+ ``` shell
+ chat server listening on: :9001
+ [server] 10.0.0.2:44362 joining
+ ```
+* Type the following in **n3** terminal and hit enter
+ ``` shell
+ hello world
+ ```
+* You will see the following output in **n2** terminal
+ ``` shell
+ chat server listening on: :9001
+ [server] 10.0.0.2:44362 joining
+ [10.0.0.2:44362] hello world
+ ```
+
+## Advanced Topics
+
+This section will cover some high level topics and examples for running and
+using EMANE in CORE. You can find more detailed tutorials and examples at
+the [EMANE Tutorial](https://github.com/adjacentlink/emane-tutorial/wiki).
+
+!!! note
+
+ Every topic below assumes CORE, EMANE, and OSPF MDR have been installed.
+
+ Scenario files to support the EMANE topics below will be found in
+ the GUI default directory for opening XML files.
+
+| Topic | Model | Description |
+|-----------------------------------------|---------|-----------------------------------------------------------|
+| [XML Files](../emane/files.md) | RF Pipe | Overview of generated XML files used to drive EMANE |
+| [GPSD](../emane/gpsd.md) | RF Pipe | Overview of running and integrating gpsd with EMANE |
+| [Precomputed](../emane/precomputed.md) | RF Pipe | Overview of using the precomputed propagation model |
+| [EEL](../emane/eel.md) | RF Pipe | Overview of using the Emulation Event Log (EEL) Generator |
+| [Antenna Profiles](../emane/antenna.md) | RF Pipe | Overview of using antenna profiles in EMANE |
+
+--8<-- "tutorials/common/grpc.md"
diff --git a/docs/usage.md b/docs/usage.md
deleted file mode 100644
index 7c070eb1..00000000
--- a/docs/usage.md
+++ /dev/null
@@ -1,1082 +0,0 @@
-# Using the CORE GUI
-
-* Table of Contents
-{:toc}
-
-## Overview
-
-CORE can be used via the GUI or [Python_Scripting](scripting.md). Often the GUI is used to draw nodes and network devices on the canvas. A Python script could also be written, that imports the CORE Python module, to configure and instantiate nodes and networks. This chapter primarily covers usage of the CORE GUI.
-
-
-
-CORE can be customized to perform any action at each phase in the workflow above. See the *Hooks...* entry on the **Session Menu** for details about when these session states are reached.
-
-## Prerequisites
-
-Beyond instaling CORE, you must have the CORE daemon running. This is done on the command line with either Systemd or SysV
-```shell
-# systed
-sudo systemctl daemon-reload
-sudo systemctl start core-daemon
-
-# sysv
-sudo service core-daemon start
-```
-
-## Modes of Operation
-
-The CORE GUI has two primary modes of operation, **Edit** and **Execute** modes. Running the GUI, by typing **core-gui** with no options, starts in Edit mode. Nodes are drawn on a blank canvas using the toolbar on the left and configured from right-click menus or by double-clicking them. The GUI does not need to be run as root.
-
-Once editing is complete, pressing the green **Start** button (or choosing **Execute** from the **Session** menu) instantiates the topology within the Linux kernel and enters Execute mode. In execute mode, the user can interact with the running emulated machines by double-clicking or right-clicking on them. The editing toolbar disappears and is replaced by an execute toolbar, which provides tools while running the emulation. Pressing the red **Stop** button (or choosing **Terminate** from the **Session** menu) will destroy the running emulation and return CORE to Edit mode.
-
-CORE can be started directly in Execute mode by specifying **--start** and a topology file on the command line:
-
-```shell
-core-gui --start ~/.core/configs/myfile.imn
-```
-
-Once the emulation is running, the GUI can be closed, and a prompt will appear asking if the emulation should be terminated. The emulation may be left running and the GUI can reconnect to an existing session at a later time.
-
-The GUI can be run as a normal user on Linux.
-
-The GUI can be connected to a different address or TCP port using the **--address** and/or **--port** options. The defaults are shown below.
-
-```shell
-core-gui --address 127.0.0.1 --port 4038
-```
-
-## Toolbar
-
-The toolbar is a row of buttons that runs vertically along the left side of the CORE GUI window. The toolbar changes depending on the mode of operation.
-
-### Editing Toolbar
-
-When CORE is in Edit mode (the default), the vertical Editing Toolbar exists on the left side of the CORE window. Below are brief descriptions for each toolbar item, starting from the top. Most of the tools are grouped into related sub-menus, which appear when you click on their group icon.
-
-* |select| *Selection Tool* - default tool for selecting, moving, configuring nodes
-* |start| *Start button* - starts Execute mode, instantiates the emulation
-* |link| *Link* - the Link Tool allows network links to be drawn between two nodes by clicking and dragging the mouse
-* |router| *Network-layer virtual nodes*
- * |router| *Router* - runs Quagga OSPFv2 and OSPFv3 routing to forward packets
- * |host| *Host* - emulated server machine having a default route, runs SSH server
- * |pc| *PC* - basic emulated machine having a default route, runs no processes by default
- * |mdr| *MDR* - runs Quagga OSPFv3 MDR routing for MANET-optimized routing
- * |router_green| *PRouter* - physical router represents a real testbed machine
- * |document_properties| *Edit* - edit node types button invokes the CORE Node Types dialog. New types of nodes may be created having different icons and names. The default services that are started with each node type can be changed here.
-* |hub| *Link-layer nodes*
- * |hub| *Hub* - the Ethernet hub forwards incoming packets to every connected node
- * |lanswitch| *Switch* - the Ethernet switch intelligently forwards incoming packets to attached hosts using an Ethernet address hash table
- * |wlan| *Wireless LAN* - when routers are connected to this WLAN node, they join a wireless network and an antenna is drawn instead of a connecting line; the WLAN node typically controls connectivity between attached wireless nodes based on the distance between them
- * |rj45| *RJ45* - with the RJ45 Physical Interface Tool, emulated nodes can be linked to real physical interfaces; using this tool, real networks and devices can be physically connected to the live-running emulation
- * |tunnel| *Tunnel* - the Tunnel Tool allows connecting together more than one CORE emulation using GRE tunnels
-* *Annotation Tools*
- * |marker| *Marker* - for drawing marks on the canvas
- * |oval| *Oval* - for drawing circles on the canvas that appear in the background
- * |rectangle| *Rectangle* - for drawing rectangles on the canvas that appear in the background
- * |text| *Text* - for placing text captions on the canvas
-
-### Execution Toolbar
-
-When the Start button is pressed, CORE switches to Execute mode, and the Edit toolbar on the left of the CORE window is replaced with the Execution toolbar Below are the items on this toolbar, starting from the top.
-
-* |select| *Selection Tool* - in Execute mode, the Selection Tool can be used for moving nodes around the canvas, and double-clicking on a node will open a shell window for that node; right-clicking on a node invokes a pop-up menu of run-time options for that node
-* |stop| *Stop button* - stops Execute mode, terminates the emulation, returns CORE to edit mode.
-* |observe| *Observer Widgets Tool* - clicking on this magnifying glass icon
- invokes a menu for easily selecting an Observer Widget. The icon has a darker
- gray background when an Observer Widget is active, during which time moving
- the mouse over a node will pop up an information display for that node.
-* |plot| *Plot Tool* - with this tool enabled, clicking on any link will
- activate the Throughput Widget and draw a small, scrolling throughput plot
- on the canvas. The plot shows the real-time kbps traffic for that link.
- The plots may be dragged around the canvas; right-click on a
- plot to remove it.
-* |marker| *Marker* - for drawing freehand lines on the canvas, useful during
- demonstrations; markings are not saved
-* |twonode| *Two-node Tool* - click to choose a starting and ending node, and
- run a one-time *traceroute* between those nodes or a continuous *ping -R*
- between nodes. The output is displayed in real time in a results box, while
- the IP addresses are parsed and the complete network path is highlighted on
- the CORE display.
-* |run| *Run Tool* - this tool allows easily running a command on all or a
- subset of all nodes. A list box allows selecting any of the nodes. A text
- entry box allows entering any command. The command should return immediately,
- otherwise the display will block awaiting response. The *ping* command, for
- example, with no parameters, is not a good idea. The result of each command
- is displayed in a results box. The first occurrence of the special text
- "NODE" will be replaced with the node name. The command will not be attempted
- to run on nodes that are not routers, PCs, or hosts, even if they are
- selected.
-
-## Menubar
-
-The menubar runs along the top of the CORE GUI window and provides access to a
-variety of features. Some of the menus are detachable, such as the *Widgets*
-menu, by clicking the dashed line at the top.
-
-### File Menu
-
-The File menu contains options for manipulating the **.imn** Configuration Files. Generally, these menu items should not be used in
-Execute mode.
-
-* *New* - this starts a new file with an empty canvas.
-* *Open* - invokes the File Open dialog box for selecting a new **.imn**
- or XML file to open. You can change the default path used for this dialog
- in the Preferences Dialog.
-* *Save* - saves the current topology. If you have not yet specified a file
- name, the Save As dialog box is invoked.
-* *Save As XML* - invokes the Save As dialog box for selecting a new
- **.xml** file for saving the current configuration in the XML file.
-* *Save As imn* - invokes the Save As dialog box for selecting a new
- **.imn** topology file for saving the current configuration. Files are saved in the
- *IMUNES network configuration* file
-* *Export Python script* - prints Python snippets to the console, for inclusion
- in a CORE Python script.
-* *Execute XML or Python script* - invokes a File Open dialog box for selecting an XML file to run or a
- Python script to run and automatically connect to. If a Python script, the script must create
- a new CORE Session and add this session to the daemon's list of sessions
- in order for this to work
-* *Execute Python script with options* - invokes a File Open dialog box for selecting a
- Python script to run and automatically connect to. After a selection is made,
- a Python Script Options dialog box is invoked to allow for command-line options to be added.
- The Python script must create a new CORE Session and add this session to the daemon's list of sessions
- in order for this to work
-* *Open current file in editor* - this opens the current topology file in the
- **vim** text editor. First you need to save the file. Once the file has been
- edited with a text editor, you will need to reload the file to see your
- changes. The text editor can be changed from the Preferences Dialog.
-* *Print* - this uses the Tcl/Tk postscript command to print the current canvas
- to a printer. A dialog is invoked where you can specify a printing command,
- the default being **lpr**. The postscript output is piped to the print
- command.
-* *Save screenshot* - saves the current canvas as a postscript graphic file.
-* Recently used files - above the Quit menu command is a list of recently use
- files, if any have been opened. You can clear this list in the
- Preferences dialog box. You can specify the number of files to keep in
- this list from the Preferences dialog. Click on one of the file names
- listed to open that configuration file.
-* *Quit* - the Quit command should be used to exit the CORE GUI. CORE may
- prompt for termination if you are currently in Execute mode. Preferences and
- the recently-used files list are saved.
-
-### Edit Menu
-
-* *Undo* - attempts to undo the last edit in edit mode.
-* *Redo* - attempts to redo an edit that has been undone.
-* *Cut*, *Copy*, *Paste* - used to cut, copy, and paste a selection. When nodes
- are pasted, their node numbers are automatically incremented, and existing
- links are preserved with new IP addresses assigned. Services and their
- customizations are copied to the new node, but care should be taken as
- node IP addresses have changed with possibly old addresses remaining in any
- custom service configurations. Annotations may also be copied and pasted.
-* *Select All* - selects all items on the canvas. Selected items can be moved
- as a group.
-* *Select Adjacent* - select all nodes that are linked to the already selected
- node(s). For wireless nodes this simply selects the WLAN node(s) that the
- wireless node belongs to. You can use this by clicking on a node and pressing
- CTRL+N to select the adjacent nodes.
-* *Find...* - invokes the *Find* dialog box. The Find dialog can be used to
- search for nodes by name or number. Results are listed in a table that
- includes the node or link location and details such as IP addresses or
- link parameters. Clicking on a result will focus the canvas on that node
- or link, switching canvases if necessary.
-* *Clear marker* - clears any annotations drawn with the marker tool. Also
- clears any markings used to indicate a node's status.
-* *Preferences...* - invokes the Preferences dialog box.
-
-### Canvas Menu
-
-The canvas menu provides commands for adding, removing, changing, and switching to different editing canvases.
-
-* *New* - creates a new empty canvas at the right of all existing canvases.
-* *Manage...* - invokes the *Manage Canvases* dialog box, where canvases may be
- renamed and reordered, and you can easily switch to one of the canvases by
- selecting it.
-* *Delete* - deletes the current canvas and all items that it contains.
-* *Size/scale...* - invokes a Canvas Size and Scale dialog that allows
- configuring the canvas size, scale, and geographic reference point. The size
- controls allow changing the width and height of the current canvas, in pixels
- or meters. The scale allows specifying how many meters are equivalent to 100
- pixels. The reference point controls specify the latitude, longitude, and
- altitude reference point used to convert between geographic and Cartesian
- coordinate systems. By clicking the *Save as default* option, all new
- canvases will be created with these properties. The default canvas size can
- also be changed in the Preferences dialog box.
-* *Wallpaper...* - used for setting the canvas background image,
-* *Previous*, *Next*, *First*, *Last* - used for switching the active canvas to
- the first, last, or adjacent canvas.
-
-### View Menu
-
-The View menu features items for controlling what is displayed on the drawing
-canvas.
-
-* *Show* - opens a submenu of items that can be displayed or hidden, such as
- interface names, addresses, and labels. Use these options to help declutter
- the display. These options are generally saved in the topology
- files, so scenarios have a more consistent look when copied from one computer
- to another.
-* *Show hidden nodes* - reveal nodes that have been hidden. Nodes are hidden by
- selecting one or more nodes, right-clicking one and choosing *hide*.
-* *Locked* - toggles locked view; when the view is locked, nodes cannot be
- moved around on the canvas with the mouse. This could be useful when
- sharing the topology with someone and you do not expect them to change
- things.
-* *3D GUI...* - launches a 3D GUI by running the command defined under
- Preferences, *3D GUI command*. This is typically a script that runs
- the SDT3D display. SDT is the Scripted Display Tool from NRL that is based on
- NASA's Java-based WorldWind virtual globe software.
-* *Zoom In* - magnifies the display. You can also zoom in by clicking *zoom
- 100%* label in the status bar, or by pressing the **+** (plus) key.
-* *Zoom Out* - reduces the size of the display. You can also zoom out by
- right-clicking *zoom 100%* label in the status bar or by pressing the **-**
- (minus) key.
-
-### Tools Menu
-
-The tools menu lists different utility functions.
-
-* *Autorearrange all* - automatically arranges all nodes on the canvas. Nodes
- having a greater number of links are moved to the center. This mode can
- continue to run while placing nodes. To turn off this autorearrange mode,
- click on a blank area of the canvas with the select tool, or choose this menu
- option again.
-* *Autorearrange selected* - automatically arranges the selected nodes on the
- canvas.
-* *Align to grid* - moves nodes into a grid formation, starting with the
- smallest-numbered node in the upper-left corner of the canvas, arranging
- nodes in vertical columns.
-* *Traffic...* - invokes the CORE Traffic Flows dialog box, which allows
- configuring, starting, and stopping MGEN traffic flows for the emulation.
-* *IP addresses...* - invokes the IP Addresses dialog box for configuring which
- IPv4/IPv6 prefixes are used when automatically addressing new interfaces.
-* *MAC addresses...* - invokes the MAC Addresses dialog box for configuring the
- starting number used as the lowest byte when generating each interface MAC
- address. This value should be changed when tunneling between CORE emulations
- to prevent MAC address conflicts.
-* *Build hosts file...* - invokes the Build hosts File dialog box for
- generating **/etc/hosts** file entries based on IP addresses used in the
- emulation.
-* *Renumber nodes...* - invokes the Renumber Nodes dialog box, which allows
- swapping one node number with another in a few clicks.
-* *Experimental...* - menu of experimental options, such as a tool to convert
- ns-2 scripts to IMUNES imn topologies, supporting only basic ns-2
- functionality, and a tool for automatically dividing up a topology into
- partitions.
-* *Topology generator* - opens a submenu of topologies to generate. You can
- first select the type of node that the topology should consist of, or routers
- will be chosen by default. Nodes may be randomly placed, aligned in grids, or
- various other topology patterns.
- * *Random* - nodes are randomly placed about the canvas, but are not linked
- together. This can be used in conjunction with a WLAN node to quickly create a wireless network.
- * *Grid* - nodes are placed in horizontal rows starting in the upper-left
- corner, evenly spaced to the right; nodes are not linked to each other.
- * *Connected Grid* - nodes are placed in an N x M (width and height)
- rectangular grid, and each node is linked to the node above, below, left
- and right of itself.
- * *Chain* - nodes are linked together one after the other in a chain.
- * *Star* - one node is placed in the center with N nodes surrounding it in a
- circular pattern, with each node linked to the center node
- * *Cycle* - nodes are arranged in a circular pattern with every node
- connected to its neighbor to form a closed circular path.
- * *Wheel* - the wheel pattern links nodes in a combination of both Star and
- Cycle patterns.
- * *Cube* - generate a cube graph of nodes
- * *Clique* - creates a clique graph of nodes, where every node is connected
- to every other node
- * *Bipartite* - creates a bipartite graph of nodes, having two disjoint sets
- of vertices.
-* *Debugger...* - opens the CORE Debugger window for executing arbitrary Tcl/Tk
- commands.
-
-### Widgets Menu
-
-*Widgets* are GUI elements that allow interaction with a running emulation.
-Widgets typically automate the running of commands on emulated nodes to report
-status information of some type and display this on screen.
-
-#### Periodic Widgets
-
-These Widgets are those available from the main *Widgets* menu. More than one
-of these Widgets may be run concurrently. An event loop fires once every second
-that the emulation is running. If one of these Widgets is enabled, its periodic
-routine will be invoked at this time. Each Widget may have a configuration
-dialog box which is also accessible from the *Widgets* menu.
-
-Here are some standard widgets:
-
-* *Adjacency* - displays router adjacency states for Quagga's OSPFv2 and OSPFv3
- routing protocols. A line is drawn from each router halfway to the router ID
- of an adjacent router. The color of the line is based on the OSPF adjacency
- state such as Two-way or Full. To learn about the different colors, see the
- *Configure Adjacency...* menu item. The **vtysh** command is used to
- dump OSPF neighbor information.
- Only half of the line is drawn because each
- router may be in a different adjacency state with respect to the other.
-* *Throughput* - displays the kilobits-per-second throughput above each link,
- using statistics gathered from the ng_pipe Netgraph node that implements each
- link. If the throughput exceeds a certain threshold, the link will become
- highlighted. For wireless nodes which broadcast data to all nodes in range,
- the throughput rate is displayed next to the node and the node will become
- circled if the threshold is exceeded.
-
-#### Observer Widgets
-
-These Widgets are available from the *Observer Widgets* submenu of the
-*Widgets* menu, and from the Widgets Tool on the toolbar. Only one Observer Widget may
-be used at a time. Mouse over a node while the session is running to pop up
-an informational display about that node.
-
-Available Observer Widgets include IPv4 and IPv6 routing tables, socket
-information, list of running processes, and OSPFv2/v3 neighbor information.
-
-Observer Widgets may be edited by the user and rearranged. Choosing *Edit...*
-from the Observer Widget menu will invoke the Observer Widgets dialog. A list
-of Observer Widgets is displayed along with up and down arrows for rearranging
-the list. Controls are available for renaming each widget, for changing the
-command that is run during mouse over, and for adding and deleting items from
-the list. Note that specified commands should return immediately to avoid
-delays in the GUI display. Changes are saved to a **widgets.conf** file in
-the CORE configuration directory.
-
-### Session Menu
-
-The Session Menu has entries for starting, stopping, and managing sessions,
-in addition to global options such as node types, comments, hooks, servers,
-and options.
-
-* *Start* or *Stop* - this starts or stops the emulation, performing the same
- function as the green Start or red Stop button.
-* *Change sessions...* - invokes the CORE Sessions dialog box containing a list
- of active CORE sessions in the daemon. Basic session information such as
- name, node count, start time, and a thumbnail are displayed. This dialog
- allows connecting to different sessions, shutting them down, or starting
- a new session.
-* *Node types...* - invokes the CORE Node Types dialog, performing the same
- function as the Edit button on the Network-Layer Nodes toolbar.
-* *Comments...* - invokes the CORE Session Comments window where optional
- text comments may be specified. These comments are saved at the top of the
- configuration file, and can be useful for describing the topology or how
- to use the network.
-* *Hooks...* - invokes the CORE Session Hooks window where scripts may be
- configured for a particular session state. The top of the window has a list
- of configured hooks, and buttons on the bottom left allow adding, editing,
- and removing hook scripts. The new or edit button will open a hook script
- editing window. A hook script is a shell script invoked on the host (not
- within a virtual node).
- * *definition* - used by the GUI to tell the backend to clear any state.
- * *configuration* - when the user presses the *Start* button, node, link, and
- other configuration data is sent to the backend. This state is also
- reached when the user customizes a service.
- * *instantiation* - after configuration data has been sent, just before the nodes are created.
- * *runtime* - all nodes and networks have been
- built and are running. (This is the same state at which
- the previously-named *global experiment script* was run.)
- * *datacollect* - the user has pressed the
- *Stop* button, but before services have been stopped and nodes have been
- shut down. This is a good time to collect log files and other data from the
- nodes.
- * *shutdown* - all nodes and networks have been shut down and destroyed.
-* *Reset node positions* - if you have moved nodes around
- using the mouse or by using a mobility module, choosing this item will reset
- all nodes to their original position on the canvas. The node locations are
- remembered when you first press the Start button.
-* *Emulation servers...* - invokes the CORE emulation
- servers dialog for configuring.
-* *Change Sessions...* - invokes the Sessions dialog for switching between different
- running sessions. This dialog is presented during startup when one or
- more sessions are already running.
-* *Options...* - presents per-session options, such as the IPv4 prefix to be
- used, if any, for a control network the ability to preserve
- the session directory; and an on/off switch for SDT3D support.
-
-### Help Menu
-
-* *Online manual (www)*, *CORE website (www)*, *Mailing list (www)* - these
- options attempt to open a web browser with the link to the specified web
- resource.
-* *About* - invokes the About dialog box for viewing version information
-
-## Connecting with Physical Networks
-
-CORE's emulated networks run in real time, so they can be connected to live
-physical networks. The RJ45 tool and the Tunnel tool help with connecting to
-the real world. These tools are available from the *Link-layer nodes* menu.
-
-When connecting two or more CORE emulations together, MAC address collisions
-should be avoided. CORE automatically assigns MAC addresses to interfaces when
-the emulation is started, starting with **00:00:00:aa:00:00** and incrementing
-the bottom byte. The starting byte should be changed on the second CORE machine
-using the *MAC addresses...* option from the *Tools* menu.
-
-### RJ45 Tool
-
-The RJ45 node in CORE represents a physical interface on the real CORE machine.
-Any real-world network device can be connected to the interface and communicate
-with the CORE nodes in real time.
-
-The main drawback is that one physical interface is required for each
-connection. When the physical interface is assigned to CORE, it may not be used
-for anything else. Another consideration is that the computer or network that
-you are connecting to must be co-located with the CORE machine.
-
-To place an RJ45 connection, click on the *Link-layer nodes* toolbar and select
-the *RJ45 Tool* from the submenu. Click on the canvas near the node you want to
-connect to. This could be a router, hub, switch, or WLAN, for example. Now
-click on the *Link Tool* and draw a link between the RJ45 and the other node.
-The RJ45 node will display "UNASSIGNED". Double-click the RJ45 node to assign a
-physical interface. A list of available interfaces will be shown, and one may
-be selected by double-clicking its name in the list, or an interface name may
-be entered into the text box.
-
-**NOTE:**
- When you press the Start button to instantiate your topology, the
- interface assigned to the RJ45 will be connected to the CORE topology. The
- interface can no longer be used by the system. For example, if there was an
- IP address assigned to the physical interface before execution, the address
- will be removed and control given over to CORE. No IP address is needed; the
- interface is put into promiscuous mode so it will receive all packets and
- send them into the emulated world.
-
-Multiple RJ45 nodes can be used within CORE and assigned to the same physical
-interface if 802.1x VLANs are used. This allows for more RJ45 nodes than
-physical ports are available, but the (e.g. switching) hardware connected to
-the physical port must support the VLAN tagging, and the available bandwidth
-will be shared.
-
-You need to create separate VLAN virtual devices on the Linux host,
-and then assign these devices to RJ45 nodes inside of CORE. The VLANning is
-actually performed outside of CORE, so when the CORE emulated node receives a
-packet, the VLAN tag will already be removed.
-
-Here are example commands for creating VLAN devices under Linux:
-
-```shell
-ip link add link eth0 name eth0.1 type vlan id 1
-ip link add link eth0 name eth0.2 type vlan id 2
-ip link add link eth0 name eth0.3 type vlan id 3
-```
-
-### Tunnel Tool
-
-The tunnel tool builds GRE tunnels between CORE emulations or other hosts.
-Tunneling can be helpful when the number of physical interfaces is limited or
-when the peer is located on a different network. Also a physical interface does
-not need to be dedicated to CORE as with the RJ45 tool.
-
-The peer GRE tunnel endpoint may be another CORE machine or another
-host that supports GRE tunneling. When placing a Tunnel node, initially
-the node will display "UNASSIGNED". This text should be replaced with the IP
-address of the tunnel peer. This is the IP address of the other CORE machine or
-physical machine, not an IP address of another virtual node.
-
-**NOTE:**
- Be aware of possible MTU issues with GRE devices. The *gretap* device
- has an interface MTU of 1,458 bytes; when joined to a Linux bridge, the
- bridge's MTU
- becomes 1,458 bytes. The Linux bridge will not perform fragmentation for
- large packets if other bridge ports have a higher MTU such as 1,500 bytes.
-
-The GRE key is used to identify flows with GRE tunneling. This allows multiple
-GRE tunnels to exist between that same pair of tunnel peers. A unique number
-should be used when multiple tunnels are used with the same peer. When
-configuring the peer side of the tunnel, ensure that the matching keys are
-used.
-
-Here are example commands for building the other end of a tunnel on a Linux
-machine. In this example, a router in CORE has the virtual address
-**10.0.0.1/24** and the CORE host machine has the (real) address
-**198.51.100.34/24**. The Linux box
-that will connect with the CORE machine is reachable over the (real) network
-at **198.51.100.76/24**.
-The emulated router is linked with the Tunnel Node. In the
-Tunnel Node configuration dialog, the address **198.51.100.76** is entered, with
-the key set to **1**. The gretap interface on the Linux box will be assigned
-an address from the subnet of the virtual router node,
-**10.0.0.2/24**.
-```shell
-# these commands are run on the tunnel peer
-sudo ip link add gt0 type gretap remote 198.51.100.34 local 198.51.100.76 key 1
-sudo ip addr add 10.0.0.2/24 dev gt0
-sudo ip link set dev gt0 up
-```
-
-
-Now the virtual router should be able to ping the Linux machine:
-
-```shell
-# from the CORE router node
-ping 10.0.0.2
-```
-
-And the Linux machine should be able to ping inside the CORE emulation:
-
-```shell
-# from the tunnel peer
-ping 10.0.0.1
-```
-
-To debug this configuration, **tcpdump** can be run on the gretap devices, or
-on the physical interfaces on the CORE or Linux machines. Make sure that a
-firewall is not blocking the GRE traffic.
-
-### Communicating with the Host Machine
-
-The host machine that runs the CORE GUI and/or daemon is not necessarily
-accessible from a node. Running an X11 application on a node, for example,
-requires some channel of communication for the application to connect with
-the X server for graphical display. There are several different ways to
-connect from the node to the host and vice versa.
-
-
-#### Control Network
-
-The quickest way to connect with the host machine through the primary control network.
-
-With a control network, the host can launch an X11 application on a node.
-To run an X11 application on the node, the **SSH** service can be enabled on
-the node, and SSH with X11 forwarding can be used from the host to the node:
-
-```shell
-# SSH from host to node n5 to run an X11 app
-ssh -X 172.16.0.5 xclock
-```
-
-Note that the **coresendmsg** utility can be used for a node to send
-messages to the CORE daemon running on the host (if the **listenaddr = 0.0.0.0**
-is set in the **/etc/core/core.conf** file) to interact with the running
-emulation. For example, a node may move itself or other nodes, or change
-its icon based on some node state.
-
-#### Other Methods
-
-There are still other ways to connect a host with a node. The RJ45 Tool
-can be used in conjunction with a dummy interface to access a node:
-
-```shell
-sudo modprobe dummy numdummies=1
-```
-
-A **dummy0** interface should appear on the host. Use the RJ45 tool assigned
-to **dummy0**, and link this to a node in your scenario. After starting the
-session, configure an address on the host.
-
-```shell
-sudo brctl show
-# determine bridge name from the above command
-# assign an IP address on the same network as the linked node
-sudo ip addr add 10.0.1.2/24 dev b.48304.34658
-```
-
-In the example shown above, the host will have the address **10.0.1.2** and
-the node linked to the RJ45 may have the address **10.0.1.1**.
-
-## Building Sample Networks
-
-### Wired Networks
-
-Wired networks are created using the *Link Tool* to draw a link between two
-nodes. This automatically draws a red line representing an Ethernet link and
-creates new interfaces on network-layer nodes.
-
-Double-click on the link to invoke the *link configuration* dialog box. Here
-you can change the Bandwidth, Delay, Loss, and Duplicate
-rate parameters for that link. You can also modify the color and width of the
-link, affecting its display.
-
-Link-layer nodes are provided for modeling wired networks. These do not create
-a separate network stack when instantiated, but are implemented using Linux bridging.
-These are the hub, switch, and wireless LAN nodes. The hub copies each packet from
-the incoming link to every connected link, while the switch behaves more like an
-Ethernet switch and keeps track of the Ethernet address of the connected peer,
-forwarding unicast traffic only to the appropriate ports.
-
-The wireless LAN (WLAN) is covered in the next section.
-
-### Wireless Networks
-
-The wireless LAN node allows you to build wireless networks where moving nodes
-around affects the connectivity between them. The wireless LAN, or WLAN, node
-appears as a small cloud. The WLAN offers several levels of wireless emulation
-fidelity, depending on your modeling needs.
-
-The WLAN tool can be extended with plug-ins for different levels of wireless
-fidelity. The basic on/off range is the default setting available on all
-platforms. Other plug-ins offer higher fidelity at the expense of greater
-complexity and CPU usage. The availability of certain plug-ins varies depending
-on platform. See the table below for a brief overview of wireless model types.
-
-
-Model|Type|Supported Platform(s)|Fidelity|Description
------|----|---------------------|--------|-----------
-|Basic|on/off|Linux|Low|Ethernet bridging with ebtables
-|EMANE|Plug-in|Linux|High|TAP device connected to EMANE emulator with pluggable MAC and PHY radio types
-
-To quickly build a wireless network, you can first place several router nodes
-onto the canvas. If you have the
-Quagga MDR software installed, it is
-recommended that you use the *mdr* node type for reduced routing overhead. Next
-choose the *wireless LAN* from the *Link-layer nodes* submenu. First set the
-desired WLAN parameters by double-clicking the cloud icon. Then you can link
-all of the routers by right-clicking on the WLAN and choosing *Link to all
-routers*.
-
-Linking a router to the WLAN causes a small antenna to appear, but no red link
-line is drawn. Routers can have multiple wireless links and both wireless and
-wired links (however, you will need to manually configure route
-redistribution.) The mdr node type will generate a routing configuration that
-enables OSPFv3 with MANET extensions. This is a Boeing-developed extension to
-Quagga's OSPFv3 that reduces flooding overhead and optimizes the flooding
-procedure for mobile ad-hoc (MANET) networks.
-
-The default configuration of the WLAN is set to use the basic range model,
-using the *Basic* tab in the WLAN configuration dialog. Having this model
-selected causes **core-daemon** to calculate the distance between nodes based
-on screen pixels. A numeric range in screen pixels is set for the wireless
-network using the *Range* slider. When two wireless nodes are within range of
-each other, a green line is drawn between them and they are linked. Two
-wireless nodes that are farther than the range pixels apart are not linked.
-During Execute mode, users may move wireless nodes around by clicking and
-dragging them, and wireless links will be dynamically made or broken.
-
-The *EMANE* tab lists available EMANE models to use for wireless networking.
-See the [EMANE](emane.md) chapter for details on using EMANE.
-
-### Mobility Scripting
-
-CORE has a few ways to script mobility.
-
-* ns-2 script - the script specifies either absolute positions
- or waypoints with a velocity. Locations are given with Cartesian coordinates.
-* CORE API - an external entity can move nodes by sending CORE API Node
- messages with updated X,Y coordinates; the **coresendmsg** utility
- allows a shell script to generate these messages.
-* EMANE events - see [EMANE](emane.md) for details on using EMANE scripts to move
- nodes around. Location information is typically given as latitude, longitude,
- and altitude.
-
-For the first method, you can create a mobility script using a text
-editor, or using a tool such as [BonnMotion](http://net.cs.uni-bonn.de/wg/cs/applications/bonnmotion/), and associate the script with one of the wireless
-using the WLAN configuration dialog box. Click the *ns-2 mobility script...*
-button, and set the *mobility script file* field in the resulting *ns2script*
-configuration dialog.
-
-Here is an example for creating a BonnMotion script for 10 nodes:
-
-```shell
-bm -f sample RandomWaypoint -n 10 -d 60 -x 1000 -y 750
-bm NSFile -f sample
-# use the resulting 'sample.ns_movements' file in CORE
-```
-
-When the Execute mode is started and one of the WLAN nodes has a mobility
-script, a mobility script window will appear. This window contains controls for
-starting, stopping, and resetting the running time for the mobility script. The
-*loop* checkbox causes the script to play continuously. The *resolution* text
-box contains the number of milliseconds between each timer event; lower values
-cause the mobility to appear smoother but consumes greater CPU time.
-
-The format of an ns-2 mobility script looks like:
-
-```shell
-# nodes: 3, max time: 35.000000, max x: 600.00, max y: 600.00
-$node_(2) set X_ 144.0
-$node_(2) set Y_ 240.0
-$node_(2) set Z_ 0.00
-$ns_ at 1.00 "$node_(2) setdest 130.0 280.0 15.0"
-```
-
-The first three lines set an initial position for node 2. The last line in the
-above example causes node 2 to move towards the destination **(130, 280)** at
-speed **15**. All units are screen coordinates, with speed in units per second.
-The total script time is learned after all nodes have reached their waypoints.
-Initially, the time slider in the mobility script dialog will not be
-accurate.
-
-Examples mobility scripts (and their associated topology files) can be found in the **configs/** directory.
-
-## Multiple Canvases
-
-CORE supports multiple canvases for organizing emulated nodes. Nodes running on
-different canvases may be linked together.
-
-To create a new canvas, choose *New* from the *Canvas* menu. A new canvas tab
-appears in the bottom left corner. Clicking on a canvas tab switches to that
-canvas. Double-click on one of the tabs to invoke the *Manage Canvases* dialog
-box. Here, canvases may be renamed and reordered, and you can easily switch to
-one of the canvases by selecting it.
-
-Each canvas maintains its own set of nodes and annotations. To link between
-canvases, select a node and right-click on it, choose *Create link to*, choose
-the target canvas from the list, and from that submenu the desired node. A
-pseudo-link will be drawn, representing the link between the two nodes on
-different canvases. Double-clicking on the label at the end of the arrow will
-jump to the canvas that it links.
-
-Distributed Emulation
----------------------
-
-A large emulation scenario can be deployed on multiple emulation servers and
-controlled by a single GUI. The GUI, representing the entire topology, can be
-run on one of the emulation servers or on a separate machine. Emulations can be
-distributed on Linux.
-
-Each machine that will act as an emulation server needs to have CORE installed.
-It is not important to have the GUI component but the CORE Python daemon
-**core-daemon** needs to be installed. Set the **listenaddr** line in the
-**/etc/core/core.conf** configuration file so that the CORE Python
-daemon will respond to commands from other servers:
-
-```shell
-### core-daemon configuration options ###
-[core-daemon]
-pidfile = /var/run/core-daemon.pid
-logfile = /var/log/core-daemon.log
-listenaddr = 0.0.0.0
-```
-
-
-The **listenaddr** should be set to the address of the interface that should
-receive CORE API control commands from the other servers; setting **listenaddr
-= 0.0.0.0** causes the Python daemon to listen on all interfaces. CORE uses TCP
-port 4038 by default to communicate from the controlling machine (with GUI) to
-the emulation servers. Make sure that firewall rules are configured as
-necessary to allow this traffic.
-
-In order to easily open shells on the emulation servers, the servers should be
-running an SSH server, and public key login should be enabled. This is
-accomplished by generating an SSH key for your user if you do not already have
-one (use **ssh-keygen -t rsa**), and then copying your public key to the
-authorized_keys file on the server (for example, **ssh-copy-id user@server** or
-**scp ~/.ssh/id_rsa.pub server:.ssh/authorized_keys**.) When double-clicking on
-a node during runtime, instead of opening a local shell, the GUI will attempt
-to SSH to the emulation server to run an interactive shell. The user name used
-for these remote shells is the same user that is running the CORE GUI.
-
-**HINT: Here is a quick distributed emulation checklist.**
-
-1. Install the CORE daemon on all servers.
-2. Configure public-key SSH access to all servers (if you want to use
-double-click shells or Widgets.)
-3. Set **listenaddr=0.0.0.0** in all of the server's core.conf files,
-then start (or restart) the daemon.
-4. Select nodes, right-click them, and choose *Assign to* to assign
-the servers (add servers through *Session*, *Emulation Servers...*)
-5. Press the *Start* button to launch the distributed emulation.
-
-Servers are configured by choosing *Emulation servers...* from the *Session*
-menu. Servers parameters are configured in the list below and stored in a
-*servers.conf* file for use in different scenarios. The IP address and port of
-the server must be specified. The name of each server will be saved in the
-topology file as each node's location.
-
-**NOTE:**
- The server that the GUI connects with
- is referred to as the master server.
-
-The user needs to assign nodes to emulation servers in the scenario. Making no
-assignment means the node will be emulated on the master server
-In the configuration window of every node, a drop-down box located between
-the *Node name* and the *Image* button will select the name of the emulation
-server. By default, this menu shows *(none)*, indicating that the node will
-be emulated locally on the master. When entering Execute mode, the CORE GUI
-will deploy the node on its assigned emulation server.
-
-Another way to assign emulation servers is to select one or more nodes using
-the select tool (shift-click to select multiple), and right-click one of the
-nodes and choose *Assign to...*.
-
-The *CORE emulation servers* dialog box may also be used to assign nodes to
-servers. The assigned server name appears in parenthesis next to the node name.
-To assign all nodes to one of the servers, click on the server name and then
-the *all nodes* button. Servers that have assigned nodes are shown in blue in
-the server list. Another option is to first select a subset of nodes, then open
-the *CORE emulation servers* box and use the *selected nodes* button.
-
-**IMPORTANT:**
- Leave the nodes unassigned if they are to be run on the master server.
- Do not explicitly assign the nodes to the master server.
-
-The emulation server machines should be reachable on the specified port and via
-SSH. SSH is used when double-clicking a node to open a shell, the GUI will open
-an SSH prompt to that node's emulation server. Public-key authentication should
-be configured so that SSH passwords are not needed.
-
-If there is a link between two nodes residing on different servers, the GUI
-will draw the link with a dashed line, and automatically create necessary
-tunnels between the nodes when executed. Care should be taken to arrange the
-topology such that the number of tunnels is minimized. The tunnels carry data
-between servers to connect nodes as specified in the topology.
-These tunnels are created using GRE tunneling, similar to the Tunnel Tool.
-
-Wireless nodes, i.e. those connected to a WLAN node, can be assigned to
-different emulation servers and participate in the same wireless network
-only if an
-EMANE model is used for the WLAN. The basic range model does not work across multiple servers due
-to the Linux bridging and ebtables rules that are used.
-
-**NOTE:**
- The basic range wireless model does not support distributed emulation,
- but EMANE does.
-
-## Services
-
-CORE uses the concept of services to specify what processes or scripts run on a
-node when it is started. Layer-3 nodes such as routers and PCs are defined by
-the services that they run.
-
-Services may be customized for each node, or new custom services can be
-created. New node types can be created each having a different name, icon, and
-set of default services. Each service defines the per-node directories,
-configuration files, startup index, starting commands, validation commands,
-shutdown commands, and meta-data associated with a node.
-
-**NOTE:**
- Network namespace nodes do not undergo the normal Linux boot process
- using the **init**, **upstart**, or **systemd** frameworks. These
- lightweight nodes use configured CORE *services*.
-
-### Default Services and Node Types
-
-Here are the default node types and their services:
-
-* *router* - zebra, OSFPv2, OSPFv3, and IPForward services for IGP
- link-state routing.
-* *host* - DefaultRoute and SSH services, representing an SSH server having a
- default route when connected directly to a router.
-* *PC* - DefaultRoute service for having a default route when connected
- directly to a router.
-* *mdr* - zebra, OSPFv3MDR, and IPForward services for
- wireless-optimized MANET Designated Router routing.
-* *prouter* - a physical router, having the same default services as the
- *router* node type; for incorporating Linux testbed machines into an
- emulation.
-
-Configuration files can be automatically generated by each service. For
-example, CORE automatically generates routing protocol configuration for the
-router nodes in order to simplify the creation of virtual networks.
-
-To change the services associated with a node, double-click on the node to
-invoke its configuration dialog and click on the *Services...* button,
-or right-click a node a choose *Services...* from the menu.
-Services are enabled or disabled by clicking on their names. The button next to
-each service name allows you to customize all aspects of this service for this
-node. For example, special route redistribution commands could be inserted in
-to the Quagga routing configuration associated with the zebra service.
-
-To change the default services associated with a node type, use the Node Types
-dialog available from the *Edit* button at the end of the Layer-3 nodes
-toolbar, or choose *Node types...* from the *Session* menu. Note that
-any new services selected are not applied to existing nodes if the nodes have
-been customized.
-
-The node types are saved in a **~/.core/nodes.conf** file, not with the
-**.imn** file. Keep this in mind when changing the default services for
-existing node types; it may be better to simply create a new node type. It is
-recommended that you do not change the default built-in node types. The
-**nodes.conf** file can be copied between CORE machines to save your custom
-types.
-
-### Customizing a Service
-
-A service can be fully customized for a particular node. From the node's
-configuration dialog, click on the button next to the service name to invoke
-the service customization dialog for that service.
-The dialog has three tabs for configuring the different aspects of the service:
-files, directories, and startup/shutdown.
-
-**NOTE:**
- A **yellow** customize icon next to a service indicates that service
- requires customization (e.g. the *Firewall* service).
- A **green** customize icon indicates that a custom configuration exists.
- Click the *Defaults* button when customizing a service to remove any
- customizations.
-
-The Files tab is used to display or edit the configuration files or scripts that
-are used for this service. Files can be selected from a drop-down list, and
-their contents are displayed in a text entry below. The file contents are
-generated by the CORE daemon based on the network topology that exists at
-the time the customization dialog is invoked.
-
-The Directories tab shows the per-node directories for this service. For the
-default types, CORE nodes share the same filesystem tree, except for these
-per-node directories that are defined by the services. For example, the
-**/var/run/quagga** directory needs to be unique for each node running
-the Zebra service, because Quagga running on each node needs to write separate
-PID files to that directory.
-
-**NOTE:**
- The **/var/log** and **/var/run** directories are
- mounted uniquely per-node by default.
- Per-node mount targets can be found in **/tmp/pycore.nnnnn/nN.conf/**
- (where *nnnnn* is the session number and *N* is the node number.)
-
-The Startup/shutdown tab lists commands that are used to start and stop this
-service. The startup index allows configuring when this service starts relative
-to the other services enabled for this node; a service with a lower startup
-index value is started before those with higher values. Because shell scripts
-generated by the Files tab will not have execute permissions set, the startup
-commands should include the shell name, with
-something like ```sh script.sh```.
-
-Shutdown commands optionally terminate the process(es) associated with this
-service. Generally they send a kill signal to the running process using the
-*kill* or *killall* commands. If the service does not terminate
-the running processes using a shutdown command, the processes will be killed
-when the *vnoded* daemon is terminated (with *kill -9*) and
-the namespace destroyed. It is a good practice to
-specify shutdown commands, which will allow for proper process termination, and
-for run-time control of stopping and restarting services.
-
-Validate commands are executed following the startup commands. A validate
-command can execute a process or script that should return zero if the service
-has started successfully, and have a non-zero return value for services that
-have had a problem starting. For example, the *pidof* command will check
-if a process is running and return zero when found. When a validate command
-produces a non-zero return value, an exception is generated, which will cause
-an error to be displayed in the Check Emulation Light.
-
-**TIP:**
- To start, stop, and restart services during run-time, right-click a
- node and use the *Services...* menu.
-
-### Creating new Services
-
-Services can save time required to configure nodes, especially if a number
-of nodes require similar configuration procedures. New services can be
-introduced to automate tasks.
-
-The easiest way to capture the configuration of a new process into a service
-is by using the **UserDefined** service. This is a blank service where any
-aspect may be customized. The UserDefined service is convenient for testing
-ideas for a service before adding a new service type.
-
-To introduce new service types, a **myservices/** directory exists in the
-user's CORE configuration directory, at **~/.core/myservices/**. A detailed
-**README.txt** file exists in that directory to outline the steps necessary
-for adding a new service. First, you need to create a small Python file that
-defines the service; then the **custom_services_dir** entry must be set
-in the **/etc/core/core.conf** configuration file. A sample is provided in
-the **myservices/** directory.
-
-**NOTE:**
- The directory name used in **custom_services_dir** should be unique and
- should not correspond to
- any existing Python module name. For example, don't use the name **subprocess**
- or **services**.
-
-If you have created a new service type that may be useful to others, please
-consider contributing it to the CORE project.
-
-## Check Emulation Light
-
-The |cel| Check Emulation Light, or CEL, is located in the bottom right-hand corner
-of the status bar in the CORE GUI. This is a yellow icon that indicates one or
-more problems with the running emulation. Clicking on the CEL will invoke the
-CEL dialog.
-
-The Check Emulation Light dialog contains a list of exceptions received from
-the CORE daemon. An exception has a time, severity level, optional node number,
-and source. When the CEL is blinking, this indicates one or more fatal
-exceptions. An exception with a fatal severity level indicates that one or more
-of the basic pieces of emulation could not be created, such as failure to
-create a bridge or namespace, or the failure to launch EMANE processes for an
-EMANE-based network.
-
-Clicking on an exception displays details for that
-exception. If a node number is specified, that node is highlighted on the
-canvas when the exception is selected. The exception source is a text string
-to help trace where the exception occurred; "service:UserDefined" for example,
-would appear for a failed validation command with the UserDefined service.
-
-Buttons are available at the bottom of the dialog for clearing the exception
-list and for viewing the CORE daemon and node log files.
-
-**NOTE:**
- In batch mode, exceptions received from the CORE daemon are displayed on
- the console.
-
-## Configuration Files
-
-Configurations are saved to **xml** or **.imn** topology files using
-the *File* menu. You
-can easily edit these files with a text editor.
-Any time you edit the topology
-file, you will need to stop the emulation if it were running and reload the
-file.
-
-The **.xml** [file schema is specified by NRL](http://www.nrl.navy.mil/itd/ncs/products/mnmtools) and there are two versions to date:
-version 0.0 and version 1.0,
-with 1.0 as the current default. CORE can open either XML version. However, the
-xmlfilever line in **/etc/core/core.conf** controls the version of the XML file
-that CORE will create.
-
-In version 1.0, the XML file is also referred to as the Scenario Plan. The Scenario Plan will be logically
-made up of the following:
-
-* **Network Plan** - describes nodes, hosts, interfaces, and the networks to
- which they belong.
-* **Motion Plan** - describes position and motion patterns for nodes in an
- emulation.
-* **Services Plan** - describes services (protocols, applications) and traffic
- flows that are associated with certain nodes.
-* **Visualization Plan** - meta-data that is not part of the NRL XML schema but
- used only by CORE. For example, GUI options, canvas and annotation info, etc.
- are contained here.
-* **Test Bed Mappings** - describes mappings of nodes, interfaces and EMANE modules in the scenario to
- test bed hardware.
- CORE includes Test Bed Mappings in XML files that are saved while the scenario is running.
-
-
-The **.imn** file format comes from IMUNES, and is
-basically Tcl lists of nodes, links, etc.
-Tabs and spacing in the topology files are important. The file starts by
-listing every node, then links, annotations, canvases, and options. Each entity
-has a block contained in braces. The first block is indented by four spaces.
-Within the **network-config** block (and any *custom-*-config* block), the
-indentation is one tab character.
-
-**TIP:**
- There are several topology examples included with CORE in
- the **configs/** directory.
- This directory can be found in **~/.core/configs**, or
- installed to the filesystem
- under **/usr[/local]/share/examples/configs**.
-
-**TIP:**
- When using the **.imn** file format, file paths for things like custom
- icons may contain the special variables **$CORE_DATA_DIR** or **$CONFDIR** which
- will be substituted with **/usr/share/core** or **~/.core/configs**.
-
-**TIP:**
- Feel free to edit the files directly using your favorite text editor.
-
-## Customizing your Topology's Look
-
-Several annotation tools are provided for changing the way your topology is
-presented. Captions may be added with the Text tool. Ovals and rectangles may
-be drawn in the background, helpful for visually grouping nodes together.
-
-During live demonstrations the marker tool may be helpful for drawing temporary
-annotations on the canvas that may be quickly erased. A size and color palette
-appears at the bottom of the toolbar when the marker tool is selected. Markings
-are only temporary and are not saved in the topology file.
-
-The basic node icons can be replaced with a custom image of your choice. Icons
-appear best when they use the GIF or PNG format with a transparent background.
-To change a node's icon, double-click the node to invoke its configuration
-dialog and click on the button to the right of the node name that shows the
-node's current icon.
-
-A background image for the canvas may be set using the *Wallpaper...* option
-from the *Canvas* menu. The image may be centered, tiled, or scaled to fit the
-canvas size. An existing terrain, map, or network diagram could be used as a
-background, for example, with CORE nodes drawn on top.
-
-## Preferences
-
-The *Preferences* Dialog can be accessed from the **Edit_Menu**. There are
-numerous defaults that can be set with this dialog, which are stored in the
-**~/.core/prefs.conf** preferences file.
-
-
-
diff --git a/gui/.gitignore b/gui/.gitignore
deleted file mode 100644
index 682be43e..00000000
--- a/gui/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-core-gui
-version.tcl
diff --git a/gui/Makefile.am b/gui/Makefile.am
deleted file mode 100644
index 0d0d2b47..00000000
--- a/gui/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-# CORE
-# (c)2010-2013 the Boeing Company.
-# See the LICENSE file included in this distribution.
-#
-# author: Jeff Ahrenholz
-#
-# Makefile for installing the CORE GUI. Since it is a Tcl/Tk script, we do not
-# build anything here.
-#
-
-SUBDIRS = icons
-
-TCL_FILES := $(wildcard *.tcl)
-ADDONS_FILES := $(wildcard addons/*)
-CONFIG_FILES := $(wildcard configs/*)
-
-# CORE GUI script (/usr/local/bin/core-gui)
-dist_bin_SCRIPTS = core-gui
-
-# Tcl/Tk scripts (/usr/local/lib/core)
-coredir = $(CORE_LIB_DIR)
-dist_core_DATA = $(TCL_FILES)
-dist_core_SCRIPTS = $(OTHER_FILES)
-
-# Addon files
-coreaddonsdir = $(coredir)/addons
-dist_coreaddons_DATA = $(ADDONS_FILES)
-
-# Sample configs (/usr/local/share/core/examples/configs)
-coreconfigsdir = $(datadir)/core/examples/configs
-dist_coreconfigs_DATA = $(CONFIG_FILES)
-
-# remove generated file from dist
-dist-hook:
- -rm -f $(distdir)/version.tcl
-
-# extra cruft to remove
-DISTCLEANFILES = Makefile.in
-
-# files to include in source tarball not included elsewhere
-EXTRA_DIST = core-gui.in
diff --git a/gui/addons/ipsecservice.tcl b/gui/addons/ipsecservice.tcl
deleted file mode 100644
index c859852a..00000000
--- a/gui/addons/ipsecservice.tcl
+++ /dev/null
@@ -1,329 +0,0 @@
-#
-# This is a separate "addons" file because it is closely tied to Python
-# service definition for the IPsec service.
-#
-
-#
-# Helper dialog for configuring the IPsec service
-#
-proc popupServiceConfig_IPsec { parent w node service btn } {
- global plugin_img_add plugin_img_del plugin_img_edit
-
- set f $w.note.ipsec
- ttk::frame $f
- set h "This IPsec service helper will assist with building an ipsec.sh file"
- set h "$h (located on the Files tab).\nThe IPsec service builds ESP"
- set h "$h tunnels between the specified peers using the racoon IKEv2"
- set h "$h\nkeying daemon. You need to provide keys and the addresses of"
- set h "$h peers, along with the\nsubnets to tunnel."
- ttk::label $f.help -text $h
- pack $f.help -side top -anchor w -padx 4 -pady 4
- $w.note add $f -text "IPsec" -underline 0
-
- global g_ipsec_key_dir g_ipsec_key_name
- set g_ipsec_key_dir "/etc/core/keys"
- set g_ipsec_key_name "ipsec1"
- ttk::labelframe $f.keys -text "Keys"
-
- ttk::frame $f.keys.dir
- ttk::label $f.keys.dir.lab -text "Key directory:"
- ttk::entry $f.keys.dir.ent -width 40 -textvariable g_ipsec_key_dir
- ttk::button $f.keys.dir.btn -width 5 -text "..." -command {
- set f .popupServicesCustomize.note.ipsec
- set d [$f.keys.dir.ent get]
- set d [tk_chooseDirectory -initialdir $d -title "Key directory"]
- if { $d != "" } {
- $f.keys.dir.ent delete 0 end
- $f.keys.dir.ent insert 0 $d
- }
- }
- pack $f.keys.dir.lab $f.keys.dir.ent $f.keys.dir.btn \
- -side left -padx 4 -pady 4
- pack $f.keys.dir -side top -anchor w
-
- ttk::frame $f.keys.name
- ttk::label $f.keys.name.lab -text "Key base name:"
- ttk::entry $f.keys.name.ent -width 10 -textvariable g_ipsec_key_name
- pack $f.keys.name.lab $f.keys.name.ent -side left -padx 4 -pady 4
- pack $f.keys.name -side top -anchor w
-
- set h "The (name).pem x509 certificate and (name).key RSA private key need"
- set h "$h to exist in the\nspecified directory. These can be generated"
- set h "$h using the openssl tool. Also, a ca-cert.pem\nfile should exist"
- set h "$h in the key directory for the CA that issued the certs."
- ttk::label $f.keys.help -text $h
- pack $f.keys.help -side top -anchor w -padx 4 -pady 4
-
- pack $f.keys -side top -pady 4 -pady 4 -expand true -fill x
-
- ttk::labelframe $f.t -text "IPsec Tunnel Endpoints"
- set h "(1) Define tunnel endpoints (select peer node using the button"
- set h "$h, then select address from the list)"
- ttk::label $f.t.lab1 -text $h
- pack $f.t.lab1 -side top -anchor w -padx 4 -pady 4
- ttk::frame $f.t.ep
- ttk::label $f.t.ep.lab1 -text "Local:"
- ttk::combobox $f.t.ep.combo1 -width 12
- pack $f.t.ep.lab1 $f.t.ep.combo1 -side left -padx 4 -pady 4
- populateComboWithIPs $f.t.ep.combo1 $node
-
- global g_twoNodeSelect g_twoNodeSelectCallback
- set g_twoNodeSelect ""
- set g_twoNodeSelectCallback selectTwoNodeIPsecCallback
-
- set h "Choose a node by clicking it on the canvas"
- set h "$h or\nby selecting it from the list below."
- ttk::label $f.t.ep.lab2 -text "Peer node:"
- ttk::checkbutton $f.t.ep.node -text " (none) " -variable g_twoNodeSelect \
- -onvalue "$f.t.ep.node" -style Toolbutton \
- -command "popupSelectNodes {$h} {} selectNodesIPsecCallback"
-
- ttk::label $f.t.ep.lab3 -text "Peer:"
- ttk::combobox $f.t.ep.combo2 -width 12
- ttk::button $f.t.ep.add -text "Add Endpoint" -image $plugin_img_add \
- -compound left -command "ipsecTreeHelper $f ep"
- pack $f.t.ep.lab2 $f.t.ep.node $f.t.ep.lab3 $f.t.ep.combo2 \
- $f.t.ep.add -side left -padx 4 -pady 4
- pack $f.t.ep -side top -anchor w
-
- set h "(2) Select endpoints below and add the subnets to be encrypted"
- ttk::label $f.t.lab2 -text $h
- pack $f.t.lab2 -side top -anchor w -padx 4 -pady 4
-
- ttk::frame $f.t.sub
- ttk::label $f.t.sub.lab1 -text "Local subnet:"
- ttk::combobox $f.t.sub.combo1 -width 12
- ttk::label $f.t.sub.lab2 -text "Remote subnet:"
- ttk::combobox $f.t.sub.combo2 -width 12
- ttk::button $f.t.sub.add -text "Add Subnet" -image $plugin_img_add \
- -compound left -command "ipsecTreeHelper $f sub"
- pack $f.t.sub.lab1 $f.t.sub.combo1 $f.t.sub.lab2 $f.t.sub.combo2 \
- $f.t.sub.add -side left -padx 5 -pady 4
- pack $f.t.sub -side top -anchor w
-
- global node_list
- set net_list [ipv4SubnetList $node_list]
- $f.t.sub.combo1 configure -values $net_list
- $f.t.sub.combo2 configure -values $net_list
-
- ttk::treeview $f.t.tree -height 5 -selectmode browse -show tree
-
- pack $f.t.tree -side top -padx 4 -pady 4 -fill both
- pack $f.t -side top -expand true -fill both
-
- ttk::frame $f.bottom
- ttk::button $f.bottom.del -image $plugin_img_del \
- -command "ipsecTreeHelper $f del"
- ttk::button $f.bottom.gen -text "Generate ipsec.sh" \
- -image $plugin_img_edit -compound left -command "generateIPsecScript $w"
- pack $f.bottom.del $f.bottom.gen -side left -padx 4 -pady 4
- pack $f.bottom -side top
-}
-
-#
-# Callback invoked when receiving configuration values
-# from a Configuration Message; this service helper depends on the ipsec.sh
-# file, not the other configuration values.
-#
-#proc popupServiceConfig_IPsec_vals { node values services w } {
-#}
-
-#
-# Callback invoked when receiving service file data from a File Message
-proc popupServiceConfig_IPsec_file { node name data w } {
- if { $name == "ipsec.sh" } {
- readIPsecScript $w
- }
-}
-
-# helper to insert all of a node's IP addresses into a combo
-proc populateComboWithIPs { combo node } {
- set ip_list [ipv4List $node 0]
- $combo configure -values $ip_list
- $combo delete 0 end
- $combo insert 0 [lindex $ip_list 0]
-}
-
-# called from editor.tcl:button1 when user clicks on a node
-# search for IP address and populate
-proc selectTwoNodeIPsecCallback {} {
- set w .popupServicesCustomize
- set f $w.note.ipsec
-
- if { ![winfo exists $w] } { return }; # user has closed window
- catch {destroy .nodeselect}
-
- set node [string trim [$f.t.ep.node cget -text]]
- if { [set node] == "(none)" } { set node "" }
-
- # populate peer interface combo with list of IPs
- populateComboWithIPs $f.t.ep.combo2 $node
-}
-
-# called from popupSelectNodes dialog when a node selection has been made
-proc selectNodesIPsecCallback { nodes } {
- global g_twoNodeSelect
- set w .popupServicesCustomize
- set f $w.note.ipsec
-
- set g_twoNodeSelect ""
- set node [lindex $nodes 0]
- if { $node == "" } {
- $f.t.ep.node configure -text "(none)"
- return
- }
- $f.t.ep.node configure -text " $node "
-
- # populate peer interface combo with list of IPs
- populateComboWithIPs $f.t.ep.combo2 $node
-}
-
-# helper to manipulate tree; cmd is "del", "ep" or "sub"
-proc ipsecTreeHelper { f cmd } {
-
- if { $cmd == "del" } {
- set sel [$f.t.tree selection]
- $f.t.tree delete $sel
- return
- }
-
- # add endpoint (ep) or subnet (sub)
- set l [string trim [$f.t.$cmd.combo1 get]]
- set p [string trim [$f.t.$cmd.combo2 get]]
- if { $l == "" || $p == "" } {
- if { $cmd == "ep" } {
- set h "tunnel interface addresses"
- } else {
- set h "subnet addresses"
- }
- tk_messageBox -type ok -icon warning -message \
- "You need to select local and peer $h."
- return
- }
-
- if { $cmd == "ep" } {
- set item [$f.t.tree insert {} end -text "$l <--> $p" -open true]
- $f.t.tree selection set $item
- } elseif { $cmd == "sub" } {
- set parent [$f.t.tree selection]
- if { $parent == "" } {
- tk_messageBox -type ok -icon warning -message \
- "You need to first select endpoints, then configure their subnets."
- return
- }
- if { [$f.t.tree parent $parent] != {} } {
- set parent [$f.t.tree parent $parent]
- }
- $f.t.tree insert $parent end -text "$l <===> $p"
- }
-}
-
-# update an ipsec.sh file that was generated by the IPsec service
-proc generateIPsecScript { w } {
- #puts "generateIPsecScript $w..."
- set cfg [$w.note.files.txt get 0.0 end-1c]
- set newcfg ""
-
- #
- # Gather data for a new config
- #
- set f $w.note.ipsec
- set keydir [$f.keys.dir.ent get]
- set keyname [$f.keys.name.ent get]
-
- set tunnelhosts ""
- set subnet_list ""
- set ti 0
- set th_items [$f.t.tree children {}]
- foreach th $th_items {
- set ep [$f.t.tree item $th -text]
- set i [string first " " $ep]
- # replace " <--> " with "AND"
- set ep [string replace $ep $i $i+5 "AND"]
- # build a list e.g.:
- # tunnelhosts="172.16.0.1AND172.16.0.2 172.16.0.1AND172.16.2.1"
- lappend tunnelhosts $ep
-
- set subnets ""
- foreach subnet_item [$f.t.tree children $th] {
- set sn [$f.t.tree item $subnet_item -text]
- set i [string first " " $sn]
- # replace " <===> " with "AND"
- set sn [string replace $sn $i $i+6 "AND"]
- lappend subnets $sn
- }
- incr ti
- set subnetstxt [join $subnets " "]
- # build a list e.g.:
- # T2="172.16.4.0/24AND172.16.5.0/24 172.16.4.0/24AND172.16.6.0/24"
- set subnets "T$ti=\"$subnetstxt\""
- lappend subnet_list $subnets
- }
-
- #
- # Perform replacements in existing ipsec.sh file.
- #
- set have_subnets 0
- foreach line [split $cfg "\n"] {
- if { [string range $line 0 6] == "keydir=" } {
- set line "keydir=$keydir"
- } elseif { [string range $line 0 8] == "certname=" } {
- set line "certname=$keyname"
- } elseif { [string range $line 0 11] == "tunnelhosts=" } {
- set tunnelhosts [join $tunnelhosts " "]
- set line "tunnelhosts=\"$tunnelhosts\""
- } elseif { [string range $line 0 0] == "T" && \
- [string is digit [string range $line 1 1]] } {
- if { $have_subnets } {
- continue ;# skip this line
- } else {
- set line [join $subnet_list "\n"]
- set have_subnets 1
- }
- }
- lappend newcfg $line
- }
- $w.note.files.txt delete 0.0 end
- $w.note.files.txt insert 0.0 [join $newcfg "\n"]
- $w.note select $w.note.files
- $w.btn.apply configure -state normal
-}
-
-proc readIPsecScript { w } {
- set cfg [$w.note.files.txt get 0.0 end-1c]
-
- set f $w.note.ipsec
- $f.keys.dir.ent delete 0 end
- $f.keys.name.ent delete 0 end
- $f.t.tree delete [$f.t.tree children {}]
-
- set ti 1
- foreach line [split $cfg "\n"] {
- if { [string range $line 0 6] == "keydir=" } {
- $f.keys.dir.ent insert 0 [string range $line 7 end]
- } elseif { [string range $line 0 8] == "certname=" } {
- $f.keys.name.ent insert 0 [string range $line 9 end]
- } elseif { [string range $line 0 11] == "tunnelhosts=" } {
- set tunnelhosts [string range $line 13 end-1]
- set ti 0
- foreach ep [split $tunnelhosts " "] {
- incr ti
- set i [string first "AND" $ep]
- set ep [string replace $ep $i $i+2 " <--> "]
- $f.t.tree insert {} end -id "T$ti" -text "$ep" -open true
- }
- } elseif { [string range $line 0 0] == "T" && \
- [string is digit [string range $line 1 1]] } {
- set i [string first "=" $line]
- set ti [string range $line 0 $i-1]
- set subnets [split [string range $line $i+2 end-1] " "]
- foreach sn $subnets {
- set i [string first "AND" $sn]
- set sn [string replace $sn $i $i+2 " <===> "]
- if { [catch {$f.t.tree insert $ti end -text "$sn"} e] } {
- puts "IPsec service ignoring line '$ti='"
- }
- }
- }
- }
-}
diff --git a/gui/annotations.tcl b/gui/annotations.tcl
deleted file mode 100644
index 8a2184d3..00000000
--- a/gui/annotations.tcl
+++ /dev/null
@@ -1,837 +0,0 @@
-#
-# Copyright 2007-2008 University of Zagreb, Croatia.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-
-#****h* imunes/annotations.tcl
-# NAME
-# annotations.tcl -- oval, rectangle, text, background, ...
-# FUNCTION
-# This module is used for configuration/image annotations, such as oval,
-# rectangle, text, background or some other.
-#****
-
-#****f* annotations.tcl/annotationConfig
-# NAME
-# annotationConfig --
-# SYNOPSIS
-# annotationConfig $canvas $target
-# FUNCTION
-# . . .
-# INPUTS
-# * canvas --
-# * target -- oval or rectangle object
-#****
-
-proc annotationConfig { c target } {
- switch -exact -- [nodeType $target] {
- oval {
- popupAnnotationDialog $c $target "true"
- }
- rectangle {
- popupAnnotationDialog $c $target "true"
- }
- text {
- popupAnnotationDialog $c $target "true"
- }
- default {
- puts "Unknown type [nodeType $target] for target $target"
- }
- }
- redrawAll
-}
-
-
-#****f* annotations.tcl/popupOvalDialog
-# NAME
-# popupOvalDialog -- creates a new oval or modifies existing oval
-# SYNOPSIS
-# popupOvalDialog $canvas $modify $color $label $lcolor
-# FUNCTION
-# Called from:
-# - editor.tcl/button1-release when new oval is drawn
-# - annotationConfig which is called from popupConfigDialog bound to
-# Double-1 on various objects
-# - configureOval called from button3annotation procedure which creates
-# a menu for configuration and deletion (bound to 3 on oval,
-# rectangle and text)
-# INPUTS
-# * canvas --
-# * modify -- create new oval "newoval" if modify=false or
-# modify an existing oval "newoval" if modify=true
-# * color -- oval color
-# * label -- label text
-# * lcolor -- label (text) color
-#****
-
-
-#****f* annotations.tcl/destroyNewoval
-# NAME
-# destroyNewoval -- helper for popupOvalDialog and popupOvalApply
-# SYNOPSIS
-# destroyNewoval $canvas
-# FUNCTION
-# . . .
-# INPUTS
-# * canvas --
-#****
-
-proc destroyNewoval { c } {
- global newoval
- $c delete -withtags newoval
- set newoval ""
-}
-
-
-# oval/rectangle/text right-click menu
-
-proc button3annotation { type c x y } {
-
- if { $type == "oval" } {
- set procname "Oval"
- set item [lindex [$c gettags {oval && current}] 1]
- } elseif { $type == "rectangle" } {
- set procname "Rectangle"
- set item [lindex [$c gettags {rectangle && current}] 1]
- } elseif { $type == "label" } {
- set procname "Label"
- set item [lindex [$c gettags {label && current}] 1]
- } elseif { $type == "text" } {
- set procname "Text"
- set item [lindex [$c gettags {text && current}] 1]
- } elseif { $type == "marker" } {
- # erase markings
- $c delete -withtags {marker && current}
- return
- } else {
- # ???
- return
- }
- if { $item == "" } {
- return
- }
- set menutext "$type $item"
-
- .button3menu delete 0 end
-
- .button3menu add command -label "Configure $menutext" \
- -command "annotationConfig $c $item"
- .button3menu add command -label "Delete $menutext" \
- -command "deleteAnnotation $c $type $item"
-
- set x [winfo pointerx .]
- set y [winfo pointery .]
- tk_popup .button3menu $x $y
-}
-
-
-proc deleteAnnotation { c type target } {
- global changed annotation_list
-
- $c delete -withtags "$type && $target"
- $c delete -withtags "new$type"
- set i [lsearch -exact $annotation_list $target]
- set annotation_list [lreplace $annotation_list $i $i]
- set changed 1
- updateUndoLog
-}
-
-
-proc drawOval {oval} {
- global $oval defOvalColor zoom curcanvas
- global defTextFontFamily defTextFontSize
-
- set coords [getNodeCoords $oval]
- if { [llength $coords] < 4 } {
- puts "Bad coordinates for oval $oval"
- return
- }
- set x1 [expr {[lindex $coords 0] * $zoom}]
- set y1 [expr {[lindex $coords 1] * $zoom}]
- set x2 [expr {[lindex $coords 2] * $zoom}]
- set y2 [expr {[lindex $coords 3] * $zoom}]
- set color [lindex [lsearch -inline [set $oval] "color *"] 1]
- set label [lindex [lsearch -inline [set $oval] "label *"] 1]
- set lcolor [lindex [lsearch -inline [set $oval] "labelcolor *"] 1]
- set bordercolor [lindex [lsearch -inline [set $oval] "border *"] 1]
- set width [lindex [lsearch -inline [set $oval] "width *"] 1]
- set lx [expr $x1 + (($x2 - $x1) / 2)]
- set ly [expr ($y1 + 20)]
-
- if { $color == "" } { set color $defOvalColor }
- if { $lcolor == "" } { set lcolor black }
- if { $width == "" } { set width 0 }
- if { $bordercolor == "" } { set bordercolor black }
-
- # -outline red -stipple gray50
- set newoval [.c create oval $x1 $y1 $x2 $y2 \
- -fill $color -width $width -outline $bordercolor \
- -tags "oval $oval annotation"]
- .c raise $newoval background
-
- set fontfamily [lindex [lsearch -inline [set $oval] "fontfamily *"] 1]
- set fontsize [lindex [lsearch -inline [set $oval] "fontsize *"] 1]
- if { $fontfamily == "" } {
- set fontfamily $defTextFontFamily
- }
- if { $fontsize == "" } {
- set fontsize $defTextFontSize
- }
- set newfontsize $fontsize
- set font [list "$fontfamily" $fontsize]
- set effects [lindex [lsearch -inline [set $oval] "effects *"] 1]
-
- .c create text $lx $ly -tags "oval $oval annotation" -text $label \
- -justify center -font "$font $effects" -fill $lcolor
-
- setNodeCanvas $oval $curcanvas
- setType $oval "oval"
-}
-
-
-# Color helper for popupOvalDialog and popupLabelDialog
-proc popupColor { type l settext } {
- # popup color selection dialog with current color
- if { $type == "fg" } {
- set initcolor [$l cget -fg]
- } else {
- set initcolor [$l cget -bg]
- }
- set newcolor [tk_chooseColor -initialcolor $initcolor]
-
- # set fg or bg of the "l" label control
- if { $newcolor == "" } {
- return
- }
- if { $settext == "true" } {
- $l configure -text $newcolor -$type $newcolor
- } else {
- $l configure -$type $newcolor
- }
-}
-
-
-#****f* annotations.tcl/roundRect
-# NAME
-# roundRect -- Draw a rounded rectangle in the canvas.
-# Called from drawRect procedure
-# SYNOPSIS
-# roundRect $w $x0 $y0 $x3 $y3 $radius $args
-# FUNCTION
-# Creates a rounded rectangle as a smooth polygon in the canvas
-# and returns the canvas item number of the rounded rectangle.
-# INPUTS
-# * w -- Path name of the canvas
-# * x0, y0 -- Coordinates of the upper left corner, in pixels
-# * x3, y3 -- Coordinates of the lower right corner, in pixels
-# * radius -- Radius of the bend at the corners, in any form
-# acceptable to Tk_GetPixels
-# * args -- Other args suitable to a 'polygon' item on the canvas
-# Example:
-# roundRect .c 100 50 500 250 $rad -fill white -outline black -tags rectangle
-#****
-
-proc roundRect { w x0 y0 x3 y3 radius args } {
-
- set r [winfo pixels $w $radius]
- set d [expr { 2 * $r }]
-
- # Make sure that the radius of the curve is less than 3/8 size of the box
-
- set maxr 0.75
-
- if { $d > $maxr * ( $x3 - $x0 ) } {
- set d [expr { $maxr * ( $x3 - $x0 ) }]
- }
- if { $d > $maxr * ( $y3 - $y0 ) } {
- set d [expr { $maxr * ( $y3 - $y0 ) }]
- }
-
- set x1 [expr { $x0 + $d }]
- set x2 [expr { $x3 - $d }]
- set y1 [expr { $y0 + $d }]
- set y2 [expr { $y3 - $d }]
-
- set cmd [list $w create polygon]
- lappend cmd $x0 $y0 $x1 $y0 $x2 $y0 $x3 $y0 $x3 $y1 $x3 $y2
- lappend cmd $x3 $y3 $x2 $y3 $x1 $y3 $x0 $y3 $x0 $y2 $x0 $y1
- lappend cmd -smooth 1
- return [eval $cmd $args]
- }
-
-proc drawRect {rectangle} {
- global $rectangle defRectColor zoom curcanvas
- global defTextFontFamily defTextFontSize
-
- set coords [getNodeCoords $rectangle]
- if {$coords == "" || [llength $coords] != 4 } {
- puts "Bad coordinates for rectangle $rectangle"
- return
- }
-
- set x1 [expr {[lindex $coords 0] * $zoom}]
- set y1 [expr {[lindex $coords 1] * $zoom}]
- set x2 [expr {[lindex $coords 2] * $zoom}]
- set y2 [expr {[lindex $coords 3] * $zoom}]
- set color [lindex [lsearch -inline [set $rectangle] "color *"] 1]
- set label [lindex [lsearch -inline [set $rectangle] "label *"] 1]
- set lcolor [lindex [lsearch -inline [set $rectangle] "labelcolor *"] 1]
- set bordercolor [lindex [lsearch -inline [set $rectangle] "border *"] 1]
- set width [lindex [lsearch -inline [set $rectangle] "width *"] 1]
- set rad [lindex [lsearch -inline [set $rectangle] "rad *"] 1]
- set lx [expr $x1 + (($x2 - $x1) / 2)]
- set ly [expr ($y1 + 20)]
-
- if { $color == "" } { set color $defRectColor }
- if { $lcolor == "" } { set lcolor black }
- if { $bordercolor == "" } { set bordercolor black }
- if { $width == "" } { set width 0 }
- # rounded-rectangle radius
- if { $rad == "" } { set rad 25 }
-
- # Boeing: allow borderless rectangles
- if { $width == 0 } {
- set newrect [roundRect .c $x1 $y1 $x2 $y2 $rad \
- -fill $color -tags "rectangle $rectangle annotation"]
- } else {
- # end Boeing
- set newrect [roundRect .c $x1 $y1 $x2 $y2 $rad \
- -fill $color -outline $bordercolor -width $width \
- -tags "rectangle $rectangle annotation"]
- .c raise $newrect background
- # Boeing
- }
- # end Boeing
-
- set fontfamily [lindex [lsearch -inline [set $rectangle] "fontfamily *"] 1]
- set fontsize [lindex [lsearch -inline [set $rectangle] "fontsize *"] 1]
- if { $fontfamily == "" } {
- set fontfamily $defTextFontFamily
- }
- if { $fontsize == "" } {
- set fontsize $defTextFontSize
- }
- set newfontsize $fontsize
- set font [list "$fontfamily" $fontsize]
- set effects [lindex [lsearch -inline [set $rectangle] "effects *"] 1]
-
- .c create text $lx $ly -tags "rectangle $rectangle annotation" \
- -text $label -justify center -font "$font $effects" -fill $lcolor
-
- setNodeCanvas $rectangle $curcanvas
- setType $rectangle "rectangle"
-}
-
-
-proc popupAnnotationDialog { c target modify } {
- global $target newrect newoval
- global width rad fontfamily fontsize
- global defFillColor defTextColor defTextFontFamily defTextFontSize
-
- # do nothing, return, if coords are empty
- if { $target == 0 \
- && [$c coords "$newrect"] == "" \
- && [$c coords "$newoval"] == "" } {
- return
- }
- if { $target == 0 } {
- set width 0
- set rad 25
- set coords [$c bbox "$newrect"]
- if { [$c coords "$newrect"] == "" } {
- set coords [$c bbox "$newoval"]
- set annotationType "oval"
- } else {
- set annotationType "rectangle"
- }
- set fontfamily ""
- set fontsize ""
- set effects ""
- set color ""
- set label ""
- set lcolor ""
- set bordercolor ""
- } else {
- set width [lindex [lsearch -inline [set $target] "width *"] 1]
- set rad [lindex [lsearch -inline [set $target] "rad *"] 1]
- set coords [$c bbox "$target"]
- set color [lindex [lsearch -inline [set $target] "color *"] 1]
- set fontfamily [lindex [lsearch -inline [set $target] "fontfamily *"] 1]
- set fontsize [lindex [lsearch -inline [set $target] "fontsize *"] 1]
- set effects [lindex [lsearch -inline [set $target] "effects *"] 1]
-
- set label [lindex [lsearch -inline [set $target] "label *"] 1]
- set lcolor [lindex [lsearch -inline [set $target] "labelcolor *"] 1]
- set bordercolor [lindex [lsearch -inline [set $target] "border *"] 1]
- set annotationType [nodeType $target]
- }
-
- if { $color == "" } {
- # Boeing: use default shape colors
- if { $annotationType == "oval" } {
- global defOvalColor
- set color $defOvalColor
- } elseif { $annotationType == "rectangle" } {
- global defRectColor
- set color $defRectColor
- } else {
- set color $defFillColor
- }
- }
- if { $lcolor == "" } { set lcolor black }
- if { $bordercolor == "" } { set bordercolor black }
- if { $width == "" } { set width 0 }
- if { $rad == "" } { set rad 25 }
- if { $fontfamily == "" } { set fontfamily $defTextFontFamily }
- if { $fontsize == "" } { set fontsize $defTextFontSize }
-
- set textBold 0
- set textItalic 0
- set textUnderline 0
- if { [lsearch $effects bold ] != -1} {set textBold 1}
- if { [lsearch $effects italic ] != -1} {set textItalic 1}
- if { [lsearch $effects underline ] != -1} {set textUnderline 1}
-
- set x1 [lindex $coords 0]
- set y1 [lindex $coords 1]
- set x2 [lindex $coords 2]
- set y2 [lindex $coords 3]
- set xx [expr {abs($x2 - $x1)}]
- set yy [expr {abs($y2 - $y1)}]
- if { $xx > $yy } {
- set maxrad [expr $yy * 3.0 / 8.0]
- } else {
- set maxrad [expr $xx * 3.0 / 8.0]
- }
-
- set wi .popup
- catch {destroy $wi}
- toplevel $wi
-
- wm transient $wi .
- wm resizable $wi 0 0
-
- if { $modify == "true" } {
- set windowtitle "Configure $annotationType $target"
- } else {
- set windowtitle "Add a new $annotationType"
- }
- wm title $wi $windowtitle
-
- frame $wi.text -relief groove -bd 2
- frame $wi.text.lab
- label $wi.text.lab.name_label -text "Text for top of $annotationType:"
- entry $wi.text.lab.name -bg white -fg $lcolor -width 32 \
- -validate focus -invcmd "focusAndFlash %W"
- $wi.text.lab.name insert 0 $label
- pack $wi.text.lab.name_label $wi.text.lab.name -side left -anchor w \
- -padx 2 -pady 2 -fill x
- pack $wi.text.lab -side top -fill x
-
- frame $wi.text.format
-
- set fontmenu [tk_optionMenu $wi.text.format.fontmenu fontfamily "$fontfamily"]
- set sizemenu [tk_optionMenu $wi.text.format.fontsize fontsize "$fontsize"]
-
-
- # color selection
- if { $color == "" } {
- set color $defTextColor
- }
- button $wi.text.format.fg -text "Text color" -command \
- "popupColor fg $wi.text.lab.name false"
- checkbutton $wi.text.format.bold -text "Bold" -variable textBold \
- -command [list fontupdate $wi.text.lab.name bold]
- checkbutton $wi.text.format.italic -text "Italic" -variable textItalic \
- -command [list fontupdate $wi.text.lab.name italic]
- checkbutton $wi.text.format.underline -text "Underline" \
- -variable textUnderline \
- -command [list fontupdate $wi.text.lab.name underline]
-
- if {$textBold == 1} { $wi.text.format.bold select
- } else { $wi.text.format.bold deselect }
- if {$textItalic == 1} { $wi.text.format.italic select
- } else { $wi.text.format.italic deselect }
- if {$textUnderline == 1} { $wi.text.format.underline select
- } else { $wi.text.format.underline deselect }
-
- pack $wi.text.format.fontmenu \
- $wi.text.format.fontsize \
- $wi.text.format.fg \
- $wi.text.format.bold \
- $wi.text.format.italic \
- $wi.text.format.underline \
- -side left -pady 2
-
- pack $wi.text.format -side top -fill x
-
- pack $wi.text -side top -fill x
-
- fontupdate $wi.text.lab.name fontfamily $fontfamily
- fontupdate $wi.text.lab.name fontsize $fontsize
-
- $fontmenu delete 0
- foreach f [lsort -dictionary [font families]] {
- $fontmenu add radiobutton -value "$f" -label $f \
- -variable fontfamily \
- -command [list fontupdate $wi.text.lab.name fontfamily $f]
- }
-
- $sizemenu delete 0
- foreach f {8 9 10 11 12 14 16 18 20 22 24 26 28 36 48 72} {
- $sizemenu add radiobutton -value "$f" -label $f \
- -variable fontsize \
- -command [list fontupdate $wi.text.lab.name fontsize $f]
- }
-
-if { "$annotationType" == "rectangle" || "$annotationType" == "oval" } {
-
- # fill color, border color
- frame $wi.colors -relief groove -bd 2
- # color selection controls
- label $wi.colors.label -text "Fill color:"
-
- label $wi.colors.color -text $color -width 8 \
- -bg $color -fg $lcolor
- button $wi.colors.bg -text "Color" -command \
- "popupColor bg $wi.colors.color true"
- pack $wi.colors.label $wi.colors.color $wi.colors.bg \
- -side left -padx 2 -pady 2 -anchor w -fill x
- pack $wi.colors -side top -fill x
-
- # border selection controls
- frame $wi.border -relief groove -bd 2
- label $wi.border.label -text "Border color:"
- label $wi.border.color -text $bordercolor -width 8 \
- -bg $color -fg $bordercolor
- label $wi.border.width_label -text "Border width:"
- set widthMenu [tk_optionMenu $wi.border.width width "$width"]
- $widthMenu delete 0
- foreach f {0 1 2 3 4 5 6 7 8 9 10} {
- $widthMenu add radiobutton -value $f -label $f \
- -variable width
- }
- button $wi.border.fg -text "Color" -command \
- "popupColor fg $wi.border.color true"
- pack $wi.border.label $wi.border.color $wi.border.fg \
- $wi.border.width_label $wi.border.width \
- $wi.border.fg $wi.border.color $wi.border.label \
- -side left -padx 2 -pady 2 -anchor w -fill x
- pack $wi.border -side top -fill x
-
-}
-
-if { $annotationType == "rectangle" } {
- frame $wi.radius -relief groove -bd 2
- scale $wi.radius.rad -from 0 -to [expr int($maxrad)] \
- -length 400 -variable rad \
- -orient horizontal -label "Radius of the bend at the corners: " \
- -tickinterval [expr int($maxrad / 15) + 1] -showvalue true
- pack $wi.radius.rad -side left -padx 2 -pady 2 -anchor w -fill x
- pack $wi.radius -side top -fill x
-}
-
- # Add new oval or modify old one?
- if { $modify == "true" } {
- set cancelcmd "destroy $wi"
- set applytext "Modify $annotationType"
- } else {
- set cancelcmd "destroy $wi; destroyNewRect $c"
- set applytext "Add $annotationType"
- }
-
- frame $wi.butt -borderwidth 6
- button $wi.butt.apply -text $applytext -command "popupAnnotationApply $c $wi $target $annotationType"
-
- button $wi.butt.cancel -text "Cancel" -command $cancelcmd
- bind $wi "$cancelcmd"
- bind $wi "popupAnnotationApply $c $wi $target $annotationType"
- pack $wi.butt.cancel $wi.butt.apply -side right
- pack $wi.butt -side bottom
-
- after 100 {
- grab .popup
- }
- return
-}
-
-# helper for popupOvalDialog and popupOvalApply
-proc destroyNewRect { c } {
- global newrect
- $c delete -withtags newrect
- set newrect ""
-}
-
-
-proc popupAnnotationApply { c wi target type } {
- global newrect newoval annotation_list
- global $target
- global changed
- global width rad
- global fontfamily fontsize textBold textItalic textUnderline
-
- # attributes
- set caption [string trim [$wi.text.lab.name get]]
- set labelcolor [$wi.text.lab.name cget -fg]
- set coords [$c coords "$target"]
- set iconcoords "iconcoords"
-
- if {"$type" == "rectangle" || "$type" == "oval" } {
- set color [$wi.colors.color cget -text]
- set bordercolor [$wi.border.color cget -text]
- }
-
- if { $target == 0 } {
- # Create a new annotation object
- set target [newObjectId annotation]
- global $target
- lappend annotation_list $target
- if {"$type" == "rectangle" } {
- set coords [$c coords $newrect]
- } elseif { "$type" == "oval" } {
- set coords [$c coords $newoval]
- }
- } else {
- set coords [getNodeCoords $target]
- }
- set $target {}
- lappend $iconcoords $coords
- lappend $target $iconcoords "label {$caption}" "labelcolor $labelcolor" \
- "fontfamily {$fontfamily}" "fontsize $fontsize"
- if {"$type" == "rectangle" || "$type" == "oval" } {
- lappend $target "color $color" "width $width" "border $bordercolor"
- }
- if {"$type" == "rectangle" } {
- lappend $target "rad $rad"
- }
-
- set ef {}
- if {"$textBold" == 1} { lappend ef bold}
- if {"$textItalic" == 1} { lappend ef italic}
- if {"$textUnderline" == 1} { lappend ef underline}
- if {"$ef" != ""} { lappend $target "effects {$ef}"}
-
- # draw it
- if { $type == "rectangle" } {
- drawRect $target
- destroyNewRect $c
- } elseif { $type == "oval" } {
- drawOval $target
- destroyNewoval $c
- } elseif { $type == "text" } {
- drawText $target
- }
-
- set changed 1
- updateUndoLog
- redrawAll
- destroy $wi
-}
-
-proc selectmarkEnter {c x y} {
- set isThruplot false
-
- if {$c == ".c"} {
- set obj [lindex [$c gettags current] 1]
- set type [nodeType $obj]
- if {$type != "oval" && $type != "rectangle"} { return }
- } else {
- set obj $c
- set c .c
- set isThruplot true
- }
- set bbox [$c bbox $obj]
-
- set x1 [lindex $bbox 0]
- set y1 [lindex $bbox 1]
- set x2 [lindex $bbox 2]
- set y2 [lindex $bbox 3]
-
- if {$isThruplot == true} {
- set x [expr $x+$x1]
- set y [expr $y+$y1]
-
- }
- set l 0 ;# left
- set r 0 ;# right
- set u 0 ;# up
- set d 0 ;# down
-
- set x [$c canvasx $x]
- set y [$c canvasy $y]
-
- if { $x < [expr $x1+($x2-$x1)/8.0]} { set l 1 }
- if { $x > [expr $x2-($x2-$x1)/8.0]} { set r 1 }
- if { $y < [expr $y1+($y2-$y1)/8.0]} { set u 1 }
- if { $y > [expr $y2-($y2-$y1)/8.0]} { set d 1 }
-
- if {$l==1} {
- if {$u==1} {
- $c config -cursor top_left_corner
- } elseif {$d==1} {
- $c config -cursor bottom_left_corner
- } else {
- $c config -cursor left_side
- }
- } elseif {$r==1} {
- if {$u==1} {
- $c config -cursor top_right_corner
- } elseif {$d==1} {
- $c config -cursor bottom_right_corner
- } else {
- $c config -cursor right_side
- }
- } elseif {$u==1} {
- $c config -cursor top_side
- } elseif {$d==1} {
- $c config -cursor bottom_side
- } else {
- $c config -cursor left_ptr
- }
-}
-
-proc selectmarkLeave {c x y} {
- global thruplotResize
- .bottom.textbox config -text {}
-
- # cursor options for thruplot resize
- if {$thruplotResize == true} {
-
- } else {
- # no resize update cursor
- $c config -cursor left_ptr
- }
-}
-
-
-proc textEnter { c x y } {
- global annotation_list
- global curcanvas
-
- set object [newObjectId annotation]
- set newtext [$c create text $x $y -text "" \
- -anchor w -justify left -tags "text $object annotation"]
-
- set coords [$c coords "text && $object"]
- set iconcoords "iconcoords"
-
- global $object
- set $object {}
- setType $object "text"
- lappend $iconcoords $coords
- lappend $object $iconcoords
- lappend $object "label {}"
- setNodeCanvas $object $curcanvas
-
- lappend annotation_list $object
- popupAnnotationDialog $c $object "false"
-}
-
-
-proc drawText {text} {
- global $text defTextColor defTextFont defTextFontFamily defTextFontSize
- global zoom curcanvas newfontsize
-
- set coords [getNodeCoords $text]
- if { [llength $coords] < 2 } {
- puts "Bad coordinates for text $text"
- return
- }
- set x [expr {[lindex $coords 0] * $zoom}]
- set y [expr {[lindex $coords 1] * $zoom}]
- set color [lindex [lsearch -inline [set $text] "labelcolor *"] 1]
- if { $color == "" } {
- set color $defTextColor
- }
- set label [lindex [lsearch -inline [set $text] "label *"] 1]
- set fontfamily [lindex [lsearch -inline [set $text] "fontfamily *"] 1]
- set fontsize [lindex [lsearch -inline [set $text] "fontsize *"] 1]
- if { $fontfamily == "" } {
- set fontfamily $defTextFontFamily
- }
- if { $fontsize == "" } {
- set fontsize $defTextFontSize
- }
- set newfontsize $fontsize
- set font [list "$fontfamily" $fontsize]
- set effects [lindex [lsearch -inline [set $text] "effects *"] 1]
- set newtext [.c create text $x $y -text $label -anchor w \
- -font "$font $effects" -justify left -fill $color \
- -tags "text $text annotation"]
-
- .c addtag text withtag $newtext
- .c raise $text background
- setNodeCanvas $text $curcanvas
- setType $text "text"
-}
-
-
-proc fontupdate { label type args} {
- global fontfamily fontsize
- global textBold textItalic textUnderline
-
- if {"$textBold" == 1} {set bold "bold"} else {set bold {} }
- if {"$textItalic"} {set italic "italic"} else {set italic {} }
- if {"$textUnderline"} {set underline "underline"} else {set underline {} }
- switch $type {
- fontsize {
- set fontsize $args
- }
- fontfamily {
- set fontfamily "$args"
- }
- }
- set f [list "$fontfamily" $fontsize]
- lappend f "$bold $italic $underline"
- $label configure -font "$f"
-}
-
-
-proc drawAnnotation { obj } {
- switch -exact -- [nodeType $obj] {
- oval {
- drawOval $obj
- }
- rectangle {
- drawRect $obj
- }
- text {
- drawText $obj
- }
- }
-}
-
-# shift annotation coordinates by dx, dy; does not redraw the annotation
-proc moveAnnotation { obj dx dy } {
- set coords [getNodeCoords $obj]
- lassign $coords x1 y1 x2 y2
- set pt1 "[expr {$x1 + $dx}] [expr {$y1 + $dy}]"
- if { [nodeType $obj] == "text" } {
- # shift one point
- setNodeCoords $obj $pt1
- } else { ;# oval/rectangle
- # shift two points
- set pt2 "[expr {$x2 + $dx}] [expr {$y2 + $dy}]"
- setNodeCoords $obj "$pt1 $pt2"
- }
-}
diff --git a/gui/api.tcl b/gui/api.tcl
deleted file mode 100644
index 310e5ddc..00000000
--- a/gui/api.tcl
+++ /dev/null
@@ -1,3297 +0,0 @@
-# version of the API document that is used
-set CORE_API_VERSION 1.23
-
-set DEFAULT_API_PORT 4038
-set g_api_exec_num 100; # starting execution number
-
-# set scale for X/Y coordinate translation
-set XSCALE 1.0
-set YSCALE 1.0
-set XOFFSET 0
-set YOFFSET 0
-
-# current session; 0 is a new session
-set g_current_session 0
-set g_session_dialog_hint 1
-
-# this is an array of lists, with one array entry for each widget or callback,
-# and the entry is a list of execution numbers (for matching replies with
-# requests)
-array set g_execRequests { shell "" observer "" }
-
-# for a simulator, uncomment this line or cut/paste into debugger:
-# set XSCALE 4.0; set YSCALE 4.0; set XOFFSET 1800; set YOFFSET 300
-
-array set nodetypes { 0 def 1 phys 2 tbd 3 tbd 4 lanswitch 5 hub \
- 6 wlan 7 rj45 8 tunnel 9 ktunnel 10 emane }
-
-array set regtypes { wl 1 mob 2 util 3 exec 4 gui 5 emul 6 }
-array set regntypes { 1 wl 2 mob 3 util 4 exec 5 gui 6 emul 7 relay 10 session }
-array set regtxttypes { wl "Wireless Module" mob "Mobility Module" \
- util "Utility Module" exec "Execution Server" \
- gui "Graphical User Interface" emul "Emulation Server" \
- relay "Relay" }
-set DEFAULT_GUI_REG "gui core_2d_gui"
-array set eventtypes { definition_state 1 configuration_state 2 \
- instantiation_state 3 runtime_state 4 \
- datacollect_state 5 shutdown_state 6 \
- event_start 7 event_stop 8 event_pause 9 \
- event_restart 10 file_open 11 file_save 12 \
- event_scheduled 31 }
-
-set CORE_STATES \
- "NONE DEFINITION CONFIGURATION INSTANTIATION RUNTIME DATACOLLECT SHUTDOWN"
-
-set EXCEPTION_LEVELS \
- "NONE FATAL ERROR WARNING NOTICE"
-
-# Event handler invoked for each message received by peer
-proc receiveMessage { channel } {
- global curcanvas showAPI
- set prmsg $showAPI
- set type 0
- set flags 0
- set len 0
- set seq 0
-
- #puts "API receive data."
- # disable the fileevent here, then reinstall the handler at the end
- fileevent $channel readable ""
- # channel closed
- if { [eof $channel] } {
- resetChannel channel 1
- return
- }
-
- #
- # read first four bytes of message header
- set more_data 1
- while { $more_data == 1 } {
- if { [catch { set bytes [read $channel 4] } e] } {
- # in tcl8.6 this occurs during shutdown
- #puts "channel closed: $e"
- break;
- }
- if { [fblocked $channel] == 1} {
- # 4 bytes not available yet
- break;
- } elseif { [eof $channel] } {
- resetChannel channel 1
- break;
- } elseif { [string bytelength $bytes] == 0 } {
- # zero bytes read - parseMessageHeader would fail
- break;
- }
- # parse type/flags/length
- if { [parseMessageHeader $bytes type flags len] < 0 } {
- # Message header error
- break;
- }
- # read message data of specified length
- set bytes [read $channel $len]
- #if { $prmsg== 1} {
- # puts "read $len bytes (type=$type, flags=$flags, len=$len)..."
- #}
- # handle each message type
- switch -exact -- "$type" {
- 1 { parseNodeMessage $bytes $len $flags }
- 2 { parseLinkMessage $bytes $len $flags }
- 3 { parseExecMessage $bytes $len $flags $channel }
- 4 { parseRegMessage $bytes $len $flags $channel }
- 5 { parseConfMessage $bytes $len $flags $channel }
- 6 { parseFileMessage $bytes $len $flags $channel }
- 8 { parseEventMessage $bytes $len $flags $channel }
- 9 { parseSessionMessage $bytes $len $flags $channel }
- 10 { parseExceptionMessage $bytes $len $flags $channel;
- #7 { parseIfaceMessage $bytes $len $flags $channel }
- #
- }
- default { puts "Unknown Message = $type" }
- }
- # end switch
- }
- # end while
-
- # update the canvas
- catch {
- # this messes up widgets
- #raiseAll .c
- .c config -cursor left_ptr ;# otherwise we have hourglass/pirate
- update
- }
-
- if {$channel != -1 } {
- resetChannel channel 0
- }
-}
-
-#
-# Open an API socket to the specified server:port, prompt user for retry
-# if specified; set the readable file event and parameters;
-# returns the channel name or -1 on error.
-#
-proc openAPIChannel { server port retry } {
- # use default values (localhost:4038) when none specified
- if { $server == "" || $server == 0 } {
- set server "localhost"
- }
- if { $port == 0 } {
- global DEFAULT_API_PORT
- set port $DEFAULT_API_PORT
- }
-
- # loop when retry is true
- set s -1
- while { $s < 0 } {
- # TODO: fix this to remove lengthy timeout periods...
- # (need to convert all channel I/O to use async channel)
- # vwait doesn't work here, blocks on socket call
- #puts "Connecting to $server:$port..."; # verbose
- set svcstart [getServiceStartString]
- set e "This feature requires a connection to the CORE daemon.\n"
- set e "$e\nFailed to connect to $server:$port!\n"
- set e "$e\nHave you started the CORE daemon with"
- set e "$e '$svcstart'?"
- if { [catch {set s [socket $server $port]} ex] } {
- puts "\n$e\n (Error: $ex)"
- set s -1
- if { ! $retry } { return $s; }; # error, don't retry
- }
- if { $s > 0 } { puts "connected." }; # verbose
- if { $retry } {; # prompt user with retry dialog
- if { $s < 0 } {
- set choice [tk_dialog .connect "Error" $e \
- error 0 Retry "Start daemon..." Cancel]
- if { $choice == 2 } { return $s } ;# cancel
- if { $choice == 1 } {
- set sudocmd "gksudo"
- set cmd "core-daemon -d"
- if { [catch {exec $sudocmd $cmd & } e] } {
- puts "Error running '$sudocmd $cmd'!"
- }
- after 300 ;# allow time for daemon to start
- }
- # fall through for retry...
- }
- }
- }; # end while
-
- # now we have a valid socket, set up encoding and receive event
- fconfigure $s -blocking 0 -encoding binary -translation { binary binary } \
- -buffering full -buffersize 4096
- fileevent $s readable [list receiveMessage $s]
- return $s
-}
-
-#
-# Reinstall the receiveMessage event handler
-#
-proc resetChannel { channel_ptr close } {
- upvar 1 $channel_ptr channel
- if {$close == 1} {
- close $channel
- pluginChannelClosed $channel
- set $channel -1
- }
- if { [catch { fileevent $channel readable \
- [list receiveMessage $channel] } ] } {
- # may print error here
- }
-}
-
-#
-# Catch errors when flushing sockets
-#
-proc flushChannel { channel_ptr msg } {
- upvar 1 $channel_ptr channel
- if { [catch { flush $channel } err] } {
- puts "*** $msg: $err"
- set channel -1
- return -1
- }
- return 0
-}
-
-
-#
-# CORE message header
-#
-proc parseMessageHeader { bytes type flags len } {
- # variables are passed by reference
- upvar 1 $type mytype
- upvar 1 $flags myflags
- upvar 1 $len mylen
-
- #
- # read the four-byte message header
- #
- if { [binary scan $bytes ccS mytype myflags mylen] != 3 } {
- puts "*** warning: message header error"
- return -1
- } else {
- set mytype [expr {$mytype & 0xFF}]; # convert signed to unsigned
- set myflags [expr {$myflags & 0xFF}]
- if { $mylen == 0 } {
- puts "*** warning: zero length message header!"
- # empty the channel
- #set bytes [read $channel]
- return -1
- }
- }
- return 0
-}
-
-
-#
-# CORE API Node message TLVs
-#
-proc parseNodeMessage { data len flags } {
- global node_list curcanvas c router eid showAPI nodetypes CORE_DATA_DIR
- global XSCALE YSCALE XOFFSET YOFFSET deployCfgAPI_lock
- #puts "Parsing node message of length=$len, flags=$flags"
- set prmsg $showAPI
- set current 0
-
- array set typenames { 1 num 2 type 3 name 4 ipv4_addr 5 mac_addr \
- 6 ipv6_addr 7 model 8 emulsrv 10 session \
- 32 xpos 33 ypos 34 canv \
- 35 emuid 36 netid 37 services \
- 48 lat 49 long 50 alt \
- 66 icon 80 opaque }
- array set typesizes { num 4 type 4 name -1 ipv4_addr 4 ipv6_addr 16 \
- mac_addr 8 model -1 emulsrv -1 session -1 \
- xpos 2 ypos 2 canv 2 emuid 4 \
- netid 4 services -1 lat 4 long 4 alt 4 \
- icon -1 opaque -1 }
- array set vals { num 0 type 0 name "" ipv4_addr -1 ipv6_addr -1 \
- mac_addr -1 model "" emulsrv "" session "" \
- xpos 0 ypos 0 canv "" \
- emuid -1 netid -1 services "" \
- lat 0 long 0 alt 0 \
- icon "" opaque "" }
-
- if { $prmsg==1 } { puts -nonewline "NODE(flags=$flags," }
-
- #
- # TLV parsing
- #
- while { $current < $len } {
- # TLV header
- if { [binary scan $data @${current}cc type length] != 2 } {
- puts "TLV header error"
- break
- }
- set length [expr {$length & 0xFF}]; # convert signed to unsigned
- if { $length == 0 } {; # prevent endless looping
- if { $type == 0 } { puts -nonewline "(extra padding)"; break
- } else { puts "Found zero-length TLV for type=$type, dropping.";
- break }
- }
- set pad [pad_32bit $length]
- # verbose debugging
- #puts "tlv type=$type length=$length pad=$pad current=$current"
- incr current 2
-
- if {![info exists typenames($type)] } { ;# unknown TLV type
- if { $prmsg } { puts -nonewline "unknown=$type," }
- incr current $length
- continue
- }
- set typename $typenames($type)
- set size $typesizes($typename)
- # 32-bit and 64-bit vals pre-padded
- if { $size == 4 || $size == 8 } { incr current $pad }
- # read TLV data depending on size
- switch -exact -- "$size" {
- 2 { binary scan $data @${current}S vals($typename) }
- 4 { binary scan $data @${current}I vals($typename) }
- 8 { binary scan $data @${current}W vals($typename) }
- 16 { binary scan $data @${current}c16 vals($typename) }
- -1 { binary scan $data @${current}a${length} vals($typename) }
- }
- if { $size == -1 } { incr current $pad } ;# string vals post-padded
- if { $type == 6 } { incr current $pad } ;# 128-bit vals post-padded
- incr current $length
- # special handling of data here
- switch -exact -- "$typename" {
- ipv4_addr { array set vals [list $typename \
- [ipv4ToString $vals($typename)] ] }
- mac_addr { array set vals [list $typename \
- [macToString $vals($typename)] ] }
- ipv6_addr { array set vals [list $typename \
- [ipv6ToString $vals($typename)] ] }
- xpos { array set vals [list $typename \
- [expr { ($vals($typename) * $XSCALE) - $XOFFSET }] ] }
- ypos { array set vals [list $typename \
- [expr { ($vals($typename) * $YSCALE) - $YOFFSET }] ] }
- }
- if { $prmsg } { puts -nonewline "$typename=$vals($typename)," }
- }
-
- if { $prmsg } { puts ") "}
-
- #
- # Execution
- #
- # TODO: enforce message parameters here
- if { ![info exists nodetypes($vals(type))] } {
- puts "NODE: invalid node type ($vals(type)), dropping"; return
- }
- set node "n$vals(num)"
- set node_id "$eid\_$node"
- if { [lsearch $node_list $node] == -1 } {; # check for node existance
- set exists false
- } else {
- set exists true
- }
-
- if { $vals(name) == "" } {; # make sure there is a node name
- set name $node
- if { $exists } { set name [getNodeName $node] }
- array set vals [list name $name]
- }
- if { $exists } {
- if { $flags == 1 } {
- puts "Node add msg but node ($node) already exists, dropping."
- return
- }
- } elseif { $flags != 1 } {
- puts -nonewline "Node modify/delete message but node ($node) does "
- puts "not exist dropping."
- return
- }
- if { $vals(icon) != "" } {
- set icon $vals(icon)
- if { [file pathtype $icon] == "relative" } {
- set icon "$CORE_DATA_DIR/icons/normal/$icon"
- }
- if { ![file exists $icon ] } {
- puts "Node icon '$vals(icon)' does not exist."
- array set vals [list icon ""]
- } else {
- array set vals [list icon $icon]
- }
- }
- global $node
-
- set wlans_needing_update { }
- if { $vals(emuid) != -1 } {
- # For Linux populate ngnodeidmap for later use with wireless; it is treated as
- # a hex value string (without the leading "0x")
- global ngnodeidmap
- foreach wlan [findWlanNodes $node] {
- if { ![info exists ngnodeidmap($eid\_$wlan)] } {
- set netid [string range $wlan 1 end]
- set emulation_type [lindex [getEmulPlugin $node] 1]
- # TODO: verify that this incr 1000 is for OpenVZ
- if { $emulation_type == "openvz" } { incr netid 1000 }
- set ngnodeidmap($eid\_$wlan) [format "%x" $netid]
- }
- if { ![info exists ngnodeidmap($eid\_$wlan-$node)] } {
- set ngnodeidmap($eid\_$wlan-$node) [format "%x" $vals(emuid)]
- lappend wlans_needing_update $wlan
- }
- } ;# end foreach wlan
- }
-
- # local flags: informational message that node was added or deleted
- if {[expr {$flags & 0x8}]} {
- if { ![info exists c] } { return }
- if {[expr {$flags & 0x1}] } { ;# add flag
- nodeHighlights $c $node on green
- after 3000 "nodeHighlights .c $node off green"
- } elseif {[expr {$flags & 0x2}] } { ;# delete flag
- nodeHighlights $c $node on black
- after 3000 "nodeHighlights .c $node off black"
- }
- # note: we may want to save other data passed in this message here
- # rather than just returning...
- return
- }
- # now we have all the information about this node
- switch -exact -- "$flags" {
- 0 { apiNodeModify $node vals }
- 1 { apiNodeCreate $node vals }
- 2 { apiNodeDelete $node }
- default { puts "NODE: unsupported flags ($flags)"; return }
- }
-}
-
-#
-# modify a node
-#
-proc apiNodeModify { node vals_ref } {
- global c eid zoom curcanvas
- upvar $vals_ref vals
- if { ![info exists c] } { return } ;# batch mode
- set draw 0
- if { $vals(icon) != "" } {
- setCustomImage $node $vals(icon)
- set draw 1
- }
- # move the node and its links
- if {$vals(xpos) != 0 && $vals(ypos) != 0} {
- moveNodeAbs $c $node [expr {$zoom * $vals(xpos)}] \
- [expr {$zoom * $vals(ypos)}]
- }
- if { $vals(name) != "" } {
- setNodeName $node $vals(name)
- set draw 1
- }
- if { $vals(services) != "" } {
- set services [split $vals(services) |]
- setNodeServices $node $services
- }
- # TODO: handle other optional on-screen data
- # lat, long, alt, heading, platform type, platform id
- if { $draw && [getNodeCanvas $node] == $curcanvas } {
- .c delete withtag "node && $node"
- .c delete withtag "nodelabel && $node"
- drawNode .c $node
- }
-}
-
-#
-# add a node
-#
-proc apiNodeCreate { node vals_ref } {
- global $node nodetypes node_list canvas_list curcanvas eid
- upvar $vals_ref vals
-
- # create GUI object
- set nodetype $nodetypes($vals(type))
- set nodename $vals(name)
- if { $nodetype == "emane" } { set nodetype "wlan" } ;# special case - EMANE
- if { $nodetype == "def" } { set nodetype "router" }
- newNode [list $nodetype $node] ;# use node number supplied from API message
- setNodeName $node $nodename
- if { $vals(canv) == "" } {
- setNodeCanvas $node $curcanvas
- } else {
- set canv $vals(canv)
- if { ![string is integer $canv] || $canv < 0 || $canv > 100} {
- puts "warning: invalid canvas '$canv' in Node message!"
- return
- }
- set canv "c$canv"
- if { [lsearch $canvas_list $canv] < 0 && $canv == "c0" } {
- # special case -- support old imn files with Canvas0
- global $canv
- lappend canvas_list $canv
- set $canv {}
- setCanvasName $canv "Canvas0"
- set curcanvas $canv
- switchCanvas none
- } else {
- while { [lsearch $canvas_list $canv] < 0 } {
- set canvnew [newCanvas ""]
- switchCanvas none ;# redraw canvas tabs
- }
- }
- setNodeCanvas $node $canv
- }
- setNodeCoords $node "$vals(xpos) $vals(ypos)"
- lassign [getDefaultLabelOffsets [nodeType $node]] dx dy
- setNodeLabelCoords $node "[expr $vals(xpos) + $dx] [expr $vals(ypos) + $dy]"
- setNodeLocation $node $vals(emulsrv)
- if { $vals(icon) != "" } {
- setCustomImage $node $vals(icon)
- }
- drawNode .c $node
-
- set model $vals(model)
- if { $model != "" && $vals(type) < 4} {
- # set model only for (0 def 1 phys 2 tbd 3 tbd) 4 lanswitch
- setNodeModel $node $model
- if { [lsearch -exact [getNodeTypeNames] $model] == -1 } {
- puts "warning: unknown node type '$model' in Node message!"
- }
- }
- if { $vals(services) != "" } {
- set services [split $vals(services) |]
- setNodeServices $node $services
- }
-
- if { $vals(type) == 7 } { ;# RJ45 node - used later to control linking
- netconfInsertSection $node [list model $vals(model)]
- } elseif { $vals(type) == 10 } { ;# EMANE node
- set section [list mobmodel coreapi ""]
- netconfInsertSection $node $section
- #set sock [lindex [getEmulPlugin $node] 2]
- #sendConfRequestMessage $sock $node "all" 0x1 -1 ""
- } elseif { $vals(type) == 6 } { ;# WLAN node
- if { $vals(opaque) != "" } {
- # treat opaque as a list to accomodate other data
- set i [lsearch $vals(opaque) "range=*"]
- if { $i != -1 } {
- set range [lindex $vals(opaque) $i]
- setNodeRange $node [lindex [split $range =] 1]
- }
- }
- }
-}
-
-#
-# delete a node
-#
-proc apiNodeDelete { node } {
- removeGUINode $node
-}
-
-#
-# CORE API Link message TLVs
-#
-proc parseLinkMessage { data len flags } {
- global router def_router_model eid
- global link_list node_list ngnodeidmap ngnodeidrmap showAPI execMode
- set prmsg $showAPI
- set current 0
- set c .c
- #puts "Parsing link message of length=$len, flags=$flags"
-
- array set typenames { 1 node1num 2 node2num 3 delay 4 bw 5 per \
- 6 dup 7 jitter 8 mer 9 burst 10 session \
- 16 mburst 32 ltype 33 guiattr 34 uni \
- 35 emuid1 36 netid 37 key \
- 48 if1num 49 if1ipv4 50 if1ipv4mask 51 if1mac \
- 52 if1ipv6 53 if1ipv6mask \
- 54 if2num 55 if2ipv4 56 if2ipv4mask 57 if2mac \
- 64 if2ipv6 65 if2ipv6mask }
- array set typesizes { node1num 4 node2num 4 delay 8 bw 8 per -1 \
- dup -1 jitter 8 mer 2 burst 2 session -1 \
- mburst 2 ltype 4 guiattr -1 uni 2 \
- emuid1 4 netid 4 key 4 \
- if1num 2 if1ipv4 4 if1ipv4mask 2 if1mac 8 \
- if1ipv6 16 if1ipv6mask 2 \
- if2num 2 if2ipv4 4 if2ipv4mask 2 if2mac 8 \
- if2ipv6 16 if2ipv6mask 2 }
- array set vals { node1num -1 node2num -1 delay 0 bw 0 per "" \
- dup "" jitter 0 mer 0 burst 0 session "" \
- mburst 0 ltype 0 guiattr "" uni 0 \
- emuid1 -1 netid -1 key -1 \
- if1num -1 if1ipv4 -1 if1ipv4mask 24 if1mac -1 \
- if1ipv6 -1 if1ipv6mask 64 \
- if2num -1 if2ipv4 -1 if2ipv4mask 24 if2mac -1 \
- if2ipv6 -1 if2ipv6mask 64 }
- set emuid1 -1
-
- if { $prmsg==1 } { puts -nonewline "LINK(flags=$flags," }
-
- #
- # TLV parsing
- #
- while { $current < $len } {
- # TLV header
- if { [binary scan $data @${current}cc type length] != 2 } {
- puts "TLV header error"
- break
- }
- set length [expr {$length & 0xFF}]; # convert signed to unsigned
- if { $length == 0 } {; # prevent endless looping
- if { $type == 0 } { puts -nonewline "(extra padding)"; break
- } else { puts "Found zero-length TLV for type=$type, dropping.";
- break }
- }
- set pad [pad_32bit $length]
- # verbose debugging
- #puts "tlv type=$type length=$length pad=$pad current=$current"
- incr current 2
-
- if {![info exists typenames($type)] } { ;# unknown TLV type
- if { $prmsg } { puts -nonewline "unknown=$type," }
- incr current $length
- continue
- }
- set typename $typenames($type)
- set size $typesizes($typename)
- # 32-bit and 64-bit vals pre-padded
- if { $size == 4 || $size == 8} { incr current $pad }
- # read TLV data depending on size
- switch -exact -- "$size" {
- 2 { binary scan $data @${current}S vals($typename) }
- 4 { binary scan $data @${current}I vals($typename) }
- 8 { binary scan $data @${current}W vals($typename) }
- 16 { binary scan $data @${current}c16 vals($typename) }
- -1 { binary scan $data @${current}a${length} vals($typename) }
- }
- incr current $length
- # special handling of data here
- switch -exact -- "$typename" {
- delay -
- jitter { if { $vals($typename) > 2000000 } {
- array set vals [list $typename 2000000] } }
- bw { if { $vals($typename) > 1000000000 } {
- array set vals [list $typename 0] } }
- per { if { $vals($typename) > 100 } {
- array set vals [list $typename 100] } }
- dup { if { $vals($typename) > 50 } {
- array set vals [list $typename 50] } }
- emuid1 { if { $emuid1 == -1 } {
- set emuid $vals($typename)
- } else { ;# this sets emuid2 if we already have emuid1
- array set vals [list emuid2 $vals($typename) ]
- array set vals [list emuid1 $emuid1 ]
- }
- }
- if1ipv4 -
- if2ipv4 { array set vals [list $typename \
- [ipv4ToString $vals($typename)] ] }
- if1mac -
- if2mac { array set vals [list $typename \
- [macToString $vals($typename)] ] }
- if1ipv6 -
- if2ipv6 { array set vals [list $typename \
- [ipv6ToString $vals($typename)] ] }
- }
- if { $prmsg } { puts -nonewline "$typename=$vals($typename)," }
- if { $size == 16 } { incr current $pad } ;# 128-bit vals post-padded
- if { $size == -1 } { incr current $pad } ;# string vals post-padded
- }
-
- if { $prmsg == 1 } { puts ") " }
-
- # perform some sanity checking of the link message
- if { $vals(node1num) == $vals(node2num) || \
- $vals(node1num) < 0 || $vals(node2num) < 0 } {
- puts -nonewline "link message error - node1=$vals(node1num), "
- puts "node2=$vals(node2num)"
- return
- }
-
- # convert node number to node and check for node existance
- set node1 "n$vals(node1num)"
- set node2 "n$vals(node2num)"
- if { [lsearch $node_list $node1] == -1 || \
- [lsearch $node_list $node2] == -1 } {
- puts "Node ($node1/$node2) in link message not found, dropping"
- return
- }
-
- # set IPv4 and IPv6 address if specified, otherwise may be automatic
- set prefix1 [chooseIfName $node1 $node2]
- set prefix2 [chooseIfName $node2 $node1]
- foreach i "1 2" {
- # set interface name/number
- if { $vals(if${i}num) == -1 } {
- set ifname [newIfc [set prefix${i}] [set node${i}]]
- set prefixlen [string length [set prefix${i}]]
- set if${i}num [string range $ifname $prefixlen end]
- array set vals [list if${i}num [set if${i}num]]
- }
- set ifname [set prefix${i}]$vals(if${i}num)
- array set vals [list if${i}name $ifname]
- # record IPv4/IPv6 addresses for newGUILink
- foreach j "4 6" {
- if { $vals(if${i}ipv${j}) != -1 } {
- setIfcIPv${j}addr [set node${i}] $ifname \
- $vals(if${i}ipv${j})/$vals(if${i}ipv${j}mask)
- }
- }
- if { $vals(if${i}mac) != -1 } {
- setIfcMacaddr [set node${i}] $ifname $vals(if${i}mac)
- }
- }
- # adopt network address for WLAN (WLAN must be node 1)
- if { [nodeType $node1] == "wlan" } {
- set v4addr $vals(if2ipv4)
- if { $v4addr != -1 } {
- set v4net [ipv4ToNet $v4addr $vals(if2ipv4mask)]
- setIfcIPv4addr $node1 wireless "$v4net/$vals(if2ipv4mask)"
- }
- set v6addr $vals(if2ipv6)
- if { $v6addr != -1 } {
- set v6net [ipv6ToNet $v6addr $vals(if2ipv6mask)]
- setIfcIPv6addr $node1 wireless "${v6net}::0/$vals(if2ipv6mask)"
- }
- }
-
- if { $execMode == "batch" } {
- return ;# no GUI to update in batch mode
- }
- # treat 100% loss as link delete
- if { $flags == 0 && $vals(per) == 100 } {
- apiLinkDelete $node1 $node2 vals
- return
- }
-
- # now we have all the information about this node
- switch -exact -- "$flags" {
- 0 { apiLinkAddModify $node1 $node2 vals 0 }
- 1 { apiLinkAddModify $node1 $node2 vals 1 }
- 2 { apiLinkDelete $node1 $node2 vals }
- default { puts "LINK: unsupported flags ($flags)"; return }
- }
-}
-
-#
-# add or modify a link
-# if add flag is set, check if two nodes are part of same wlan, and do wlan
-# linkage, or add a wired link; otherwise modify wired/wireless link with
-# supplied parameters
-proc apiLinkAddModify { node1 node2 vals_ref add } {
- global eid defLinkWidth
- set c .c
- upvar $vals_ref vals
-
- if {$vals(key) > -1} {
- if { [nodeType $node1] == "tunnel" } {
- netconfInsertSection $node1 [list "tunnel-key" $vals(key)]
- }
- if { [nodeType $node2] == "tunnel" } {
- netconfInsertSection $node2 [list "tunnel-key" $vals(key)]
- }
- }
-
- # look for a wired link in the link list
- set wired_link [linkByPeers $node1 $node2]
- if { $wired_link != "" && $add == 0 } { ;# wired link exists, modify it
- #puts "modify wired link"
- if { $vals(uni) == 1 } { ;# unidirectional link effects message
- set peers [linkPeers $wired_link]
- if { $node1 == [lindex $peers 0] } { ;# downstream n1 <-- n2
- set bw [list $vals(bw) [getLinkBandwidth $wired_link up]]
- set delay [list $vals(delay) [getLinkDelay $wired_link up]]
- set per [list $vals(per) [getLinkBER $wired_link up]]
- set dup [list $vals(dup) [getLinkBER $wired_link up]]
- set jitter [list $vals(jitter) [getLinkJitter $wired_link up]]
- } else { ;# upstream n1 --> n2
- set bw [list [getLinkBandwidth $wired_link] $vals(bw)]
- set delay [list [getLinkDelay $wired_link] $vals(delay)]
- set per [list [getLinkBER $wired_link] $vals(per)]
- set dup [list [getLinkBER $wired_link] $vals(dup)]
- set jitter [list $vals(jitter) [getLinkJitter $wired_link]]
- }
- setLinkBandwidth $wired_link $bw
- setLinkDelay $wired_link $delay
- setLinkBER $wired_link $per
- setLinkDup $wired_link $dup
- setLinkJitter $wired_link $jitter
- } else {
- setLinkBandwidth $wired_link $vals(bw)
- setLinkDelay $wired_link $vals(delay)
- setLinkBER $wired_link $vals(per)
- setLinkDup $wired_link $vals(dup)
- setLinkJitter $wired_link $vals(jitter)
- }
- updateLinkLabel $wired_link
- updateLinkGuiAttr $wired_link $vals(guiattr)
- return
- # if add flag is set and a wired link already exists, assume wlan linkage
- # special case: rj45 model=1 means link via wireless
- } elseif {[nodeType $node1] == "rj45" || [nodeType $node2] == "rj45"} {
- if { [nodeType $node1] == "rj45" } {
- set rj45node $node1; set othernode $node2;
- } else { set rj45node $node2; set othernode $node1; }
- if { [netconfFetchSection $rj45node model] == 1 } {
- set wlan [findWlanNodes $othernode]
- if {$wlan != ""} {newGUILink $wlan $rj45node};# link rj4node to wlan
- }
- }
-
- # no wired link; determine if both nodes belong to the same wlan, and
- # link them; otherwise add a wired link if add flag is set
- set wlan $vals(netid)
- if { $wlan < 0 } {
- # WLAN not specified with netid, search for common WLAN
- set wlans1 [findWlanNodes $node1]
- set wlans2 [findWlanNodes $node2]
- foreach w $wlans1 {
- if { [lsearch -exact $wlans2 $w] < 0 } { continue }
- set wlan $w
- break
- }
- }
-
- if { $wlan < 0 } { ;# no common wlan
- if {$add == 1} { ;# add flag was set - add a wired link
- global g_newLink_ifhints
- set g_newLink_ifhints [list $vals(if1name) $vals(if2name)]
- newGUILink $node1 $node2
- if { [getNodeCanvas $node1] != [getNodeCanvas $node2] } {
- set wired_link [linkByPeersMirror $node1 $node2]
- } else {
- set wired_link [linkByPeers $node1 $node2]
- }
- setLinkBandwidth $wired_link $vals(bw)
- setLinkDelay $wired_link $vals(delay)
- setLinkBER $wired_link $vals(per)
- setLinkDup $wired_link $vals(dup)
- setLinkJitter $wired_link $vals(jitter)
- updateLinkLabel $wired_link
- updateLinkGuiAttr $wired_link $vals(guiattr)
- # adopt link effects for WLAN (WLAN must be node 1)
- if { [nodeType $node1] == "wlan" } {
- setLinkBandwidth $node1 $vals(bw)
- setLinkDelay $node1 $vals(delay)
- setLinkBER $node1 $vals(per)
- }
- return
- } else { ;# modify link, but no wired link or common wlan!
- puts -nonewline "link modify message received, but no wired link"
- puts " or wlan for nodes $node1-$node2, dropping"
- return
- }
- }
-
- set wlan "n$wlan"
- drawWlanLink $node1 $node2 $wlan
-}
-
-#
-# delete a link
-#
-proc apiLinkDelete { node1 node2 vals_ref } {
- global eid
- upvar $vals_ref vals
- set c .c
-
- # look for a wired link in the link list
- set wired_link [linkByPeers $node1 $node2]
- if { $wired_link != "" } {
- removeGUILink $wired_link non-atomic
- return
- }
-
- set wlan $vals(netid)
- if { $wlan < 0 } {
- # WLAN not specified with netid, search for common WLAN
- set wlans1 [findWlanNodes $node1]
- set wlans2 [findWlanNodes $node2]
- foreach w $wlans1 {
- if { [lsearch -exact $wlans2 $w] < 0 } { continue }
- set wlan $w
- break
- }
- }
- if { $wlan < 0 } {
- puts "apiLinkDelete: no common WLAN!"
- return
- }
- set wlan "n$wlan"
-
- # look for wireless link on the canvas, remove GUI object
- $c delete -withtags "wlanlink && $node2 && $node1 && $wlan"
- $c delete -withtags "linklabel && $node2 && $node1 && $wlan"
-}
-
-#
-# CORE API Execute message TLVs
-#
-proc parseExecMessage { data len flags channel } {
- global node_list curcanvas c router eid showAPI
- global XSCALE YSCALE XOFFSET YOFFSET
- set prmsg $showAPI
- set current 0
-
- # set default values
- set nodenum 0
- set execnum 0
- set exectime 0
- set execcmd ""
- set execres ""
- set execstatus 0
- set session ""
-
- if { $prmsg==1 } { puts -nonewline "EXEC(flags=$flags," }
-
- # parse each TLV
- while { $current < $len } {
- # TLV header
- set typelength [parseTLVHeader $data current]
- set type [lindex $typelength 0]
- set length [lindex $typelength 1]
- if { $length == 0 || $length == "" } { break }
- set pad [pad_32bit $length]
- # verbose debugging
- #puts "exec tlv type=$type length=$length pad=$pad current=$current"
- if { [expr {$current + $length + $pad}] > $len } {
- puts "error with EXEC message length (len=$len, TLV length=$length)"
- break
- }
- # TLV data
- switch -exact -- "$type" {
- 1 {
- incr current $pad
- binary scan $data @${current}I nodenum
- if { $prmsg==1 } { puts -nonewline "node=$nodenum/" }
- }
- 2 {
- incr current $pad
- binary scan $data @${current}I execnum
- if { $prmsg == 1} { puts -nonewline "exec=$execnum," }
- }
- 3 {
- incr current $pad
- binary scan $data @${current}I exectime
- if { $prmsg == 1} { puts -nonewline "time=$exectime," }
- }
- 4 {
- binary scan $data @${current}a${length} execcmd
- if { $prmsg == 1} { puts -nonewline "cmd=$execcmd," }
- incr current $pad
- }
- 5 {
- binary scan $data @${current}a${length} execres
- if { $prmsg == 1} { puts -nonewline "res=($length bytes)," }
- incr current $pad
- }
- 6 {
- incr current $pad
- binary scan $data @${current}I execstatus
- if { $prmsg == 1} { puts -nonewline "status=$execstatus," }
- }
- 10 {
- binary scan $data @${current}a${length} session
- if { $prmsg == 1} { puts -nonewline "session=$session," }
- incr current $pad
- }
- default {
- if { $prmsg == 1} { puts -nonewline "unknown=" }
- if { $prmsg == 1} { puts -nonewline "$type," }
- }
- }
- # end switch
-
- # advance current pointer
- incr current $length
- }
- if { $prmsg == 1 } { puts ") "}
-
- set node "n$nodenum"
- set node_id "$eid\_$node"
- # check for node existance
- if { [lsearch $node_list $node] == -1 } {
- puts "Execute message but node ($node) does not exist, dropping."
- return
- }
- global $node
-
- # Callback support - match execnum from response with original request, and
- # invoke type-specific callback
- global g_execRequests
- foreach type [array names g_execRequests] {
- set idx [lsearch $g_execRequests($type) $execnum]
- if { $idx > -1 } {
- set g_execRequests($type) \
- [lreplace $g_execRequests($type) $idx $idx]
- exec_${type}_callback $node $execnum $execcmd $execres $execstatus
- return
- }
- }
-}
-
-# spawn interactive terminal
-proc exec_shell_callback { node execnum execcmd execres execstatus } {
- #puts "opening terminal for $node by running '$execres'"
- set title "CORE: [getNodeName $node] (console)"
- set term [get_term_prog false]
- set xi [string first "xterm -e" $execres]
-
- # shell callback already has xterm command, launch it using user-defined
- # term program (e.g. remote nodes 'ssh -X -f a.b.c.d xterm -e ...'
- if { $xi > -1 } {
- set execres [string replace $execres $xi [expr $xi+7] $term]
- if { [catch {exec sh -c "$execres" & } ] } {
- puts "Warning: failed to open terminal for $node"
- }
- return
- # no xterm command; execute shell callback in a terminal (e.g. local nodes)
- } elseif { \
- [catch {eval exec $term "$execres" & } ] } {
- puts "Warning: failed to open terminal for $node: ($term $execres)"
- }
-}
-
-
-#
-# CORE API Register message TLVs
-# parse register message into plugin capabilities
-#
-proc parseRegMessage { data len flags channel } {
- global regntypes showAPI
- set prmsg $showAPI
- set current 0
- set str 0
- set session ""
- set fnhint ""
-
- set plugin_cap_list {} ;# plugin capabilities list
-
- if { $prmsg==1 } { puts -nonewline "REG(flags=$flags," }
-
- # parse each TLV
- while { $current < $len } {
- # TLV header
- if { [binary scan $data @${current}cc type length] != 2 } {
- puts "TLV header error"
- break
- }
- set length [expr {$length & 0xFF}]; # convert signed to unsigned
- if { $length == 0 } {
- # prevent endless looping
- if { $type == 0 } {
- puts -nonewline "(extra padding)"
- break
- } else {
- puts "Found zero-length TLV for type=$type, dropping."
- break
- }
- }
- set pad [pad_32bit $length]
- # verbose debugging
- #puts "tlv type=$type length=$length pad=$pad current=$current"
- incr current 2
- # TLV data
- if { [info exists regntypes($type)] } {
- set plugin_type $regntypes($type)
- binary scan $data @${current}a${length} str
- if { $prmsg == 1} { puts -nonewline "$plugin_type=$str," }
- if { $type == 10 } { ;# session number
- set session $str
- } else {
- lappend plugin_cap_list "$plugin_type=$str"
- if { $plugin_type == "exec" } { set fnhint $str }
- }
- } else {
- if { $prmsg == 1} { puts -nonewline "unknown($type)," }
- }
- incr current $pad
- # end switch
-
- # advance current pointer
- incr current $length
- }
- if { $prmsg == 1 } { puts ") "}
-
- # reg message with session number indicates the sid of a session that
- # was just started from XML or Python script (via reg exec=scriptfile.py)
- if { $session != "" } {
- # The channel passed to here is soon after discarded for
- # sessions that are started from XML or Python scripts. This causes
- # an exception in the GUI when responding back to daemon if the
- # response is sent after the channel has been destroyed. Setting
- # the channel to -1 basically disables the GUI response to the daemon,
- # but it turns out the daemon does not need the response anyway.
- set channel -1
- # assume session string only contains one session number
- connectShutdownSession connect $channel $session $fnhint
- return
- }
-
- set plugin [pluginByChannel $channel]
- if { [setPluginCapList $plugin $plugin_cap_list] < 0 } {
- return
- }
-
- # callback to refresh any open dialogs this message may refresh
- pluginsConfigRefreshCallback
-}
-
-proc parseConfMessage { data len flags channel } {
- global showAPI node_list MACHINE_TYPES
- set prmsg $showAPI
- set current 0
- set str 0
- set nodenum -1
- set obj ""
- set tflags 0
- set types {}
- set values {}
- set captions {}
- set bitmap {}
- set possible_values {}
- set groups {}
- set opaque {}
- set session ""
- set netid -1
-
- if { $prmsg==1 } { puts -nonewline "CONF(flags=$flags," }
-
- # parse each TLV
- while { $current < $len } {
- set typelength [parseTLVHeader $data current]
- set type [lindex $typelength 0]
- set length [lindex $typelength 1]
- set pad [pad_32bit $length]
- if { $length == 0 || $length == "" } {
- # allow some zero-length string TLVs
- if { $type < 5 || $type > 9 } { break }
- }
- # verbose debugging
- #puts "tlv type=$type length=$length pad=$pad current=$current"
- # TLV data
- switch -exact -- "$type" {
- 1 {
- incr current $pad
- binary scan $data @${current}I nodenum
- if { $prmsg == 1} { puts -nonewline "node=$nodenum/" }
- }
- 2 {
- binary scan $data @${current}a${length} obj
- if { $prmsg == 1} { puts -nonewline "obj=$obj," }
- incr current $pad
- }
- 3 {
- binary scan $data @${current}S tflags
- if { $prmsg == 1} { puts -nonewline "cflags=$tflags," }
- }
- 4 {
- set type 0
- set types {}
- if { $prmsg == 1} { puts -nonewline "types=" }
- # number of 16-bit values
- set types_len $length
- # get each 16-bit type value, add to list
- while {$types_len > 0} {
- binary scan $data @${current}S type
- if {$type > 0 && $type < 12} {
- lappend types $type
- if { $prmsg == 1} { puts -nonewline "$type/" }
- }
- incr current 2
- incr types_len -2
- }
- if { $prmsg == 1} { puts -nonewline "," }
- incr current -$length; # length incremented below
- incr current $pad
- }
- 5 {
- set values {}
- binary scan $data @${current}a${length} vals
- if { $prmsg == 1} { puts -nonewline "vals=$vals," }
- set values [split $vals |]
- incr current $pad
- }
- 6 {
- set captions {}
- binary scan $data @${current}a${length} capt
- if { $prmsg == 1} { puts -nonewline "capt=$capt," }
- set captions [split $capt |]
- incr current $pad
- }
- 7 {
- set bitmap {}
- binary scan $data @${current}a${length} bitmap
- if { $prmsg == 1} { puts -nonewline "bitmap," }
- incr current $pad
- }
- 8 {
- set possible_values {}
- binary scan $data @${current}a${length} pvals
- if { $prmsg == 1} { puts -nonewline "pvals=$pvals," }
- set possible_values [split $pvals |]
- incr current $pad
- }
- 9 {
- set groups {}
- binary scan $data @${current}a${length} groupsstr
- if { $prmsg == 1} { puts -nonewline "groups=$groupsstr," }
- set groups [split $groupsstr |]
- incr current $pad
- }
- 10 {
- binary scan $data @${current}a${length} session
- if { $prmsg == 1} { puts -nonewline "session=$session," }
- incr current $pad
- }
- 35 {
- incr current $pad
- binary scan $data @${current}I netid
- if { $prmsg == 1} { puts -nonewline "netid=$netid/" }
- }
- 80 {
- set opaque {}
- binary scan $data @${current}a${length} opaquestr
- if { $prmsg == 1} { puts -nonewline "opaque=$opaquestr," }
- set opaque [split $opaquestr |]
- incr current $pad
- }
- default {
- if { $prmsg == 1} { puts -nonewline "unknown=" }
- if { $prmsg == 1} { puts -nonewline "$type," }
- }
- }
- # end switch
-
- # advance current pointer
- incr current $length
- }
-
- if { $prmsg == 1 } { puts ") "}
-
- set objs_ok [concat "services session metadata emane" $MACHINE_TYPES]
- if { $nodenum > -1 } {
- set node "n$nodenum"
- } else {
- set node ""
- }
- # check for node existance
- if { [lsearch $node_list $node] == -1 } {
- if { [lsearch $objs_ok $obj] < 0 } {
- set msg "Configure message for $obj but node ($node) does"
- set msg "$msg not exist, dropping."
- puts $msg
- return
- }
- } else {
- global $node
- }
-
- # for handling node services
- # this could be improved, instead of checking for the hard-coded object
- # "services" and opaque data for service customization
- if { $obj == "services" } {
- if { $tflags & 0x2 } { ;# update flag
- if { $opaque != "" } {
- set services [lindex [split $opaque ":"] 1]
- set services [split $services ","]
- customizeServiceValues n$nodenum $values $services
- }
- # TODO: save services config with the node
- } elseif { $tflags & 0x1 } { ;# request flag
- # TODO: something else
- } else {
- popupServicesConfig $channel n$nodenum $types $values $captions \
- $possible_values $groups $session
- }
- return
- # metadata received upon XML file load
- } elseif { $obj == "metadata" } {
- parseMetaData $values
- return
- # session options received upon XML file load
- } elseif { $obj == "session" && $tflags & 0x2 } {
- setSessionOptions $types $values
- return
- }
- # handle node machine-type profile
- if { [lsearch $MACHINE_TYPES $obj] != -1 } {
- if { $tflags == 0 } {
- popupNodeProfileConfig $channel n$nodenum $obj $types $values \
- $captions $bitmap $possible_values $groups $session \
- $opaque
- } else {
- puts -nonewline "warning: received Configure message for profile "
- puts "with unexpected flags!"
- }
- return
- }
-
- # update the configuration for a node without displaying dialog box
- if { $tflags & 0x2 } {
- if { $obj == "emane" && $node == "" } {
- set node [lindex [findWlanNodes ""] 0]
- }
- if { $node == "" } {
- puts "ignoring Configure message for $obj with no node"
- return
- }
- # this is similar to popupCapabilityConfigApply
- setCustomConfig $node $obj $types $values 0
- if { $obj != "emane" && [nodeType $node] == "wlan"} {
- set section [list mobmodel coreapi $obj]
- netconfInsertSection $node $section
- }
- # configuration request - unhandled
- } elseif { $tflags & 0x1 } {
- # configuration response data from our request (from GUI plugin configure)
- } else {
- popupCapabilityConfig $channel n$nodenum $obj $types $values \
- $captions $bitmap $possible_values $groups
- }
-}
-
-# process metadata received from Conf Message when loading XML
-proc parseMetaData { values } {
- global canvas_list annotation_list execMode g_comments
-
- foreach value $values {
- # data looks like this: "annotation a1={iconcoords {514.0 132.0...}}"
- lassign [splitKeyValue $value] key object_config
- lassign $key class object
- # metadata with no object name e.g. comments="Comment text"
- if { "$class" == "comments" } {
- set g_comments $object_config
- continue
- } elseif { "$class" == "global_options" } {
- foreach opt $object_config {
- lassign [split $opt =] key value
- setGlobalOption $key $value
- }
- continue
- }
- # metadata having class and object name
- if {"$class" == "" || $object == ""} {
- puts "warning: invalid metadata value '$value'"
- }
- if { "$class" == "canvas" } {
- if { [lsearch $canvas_list $object] < 0 } {
- lappend canvas_list $object
- }
- } elseif { "$class" == "annotation" } {
- if { [lsearch $annotation_list $object] < 0 } {
- lappend annotation_list $object
- }
- } else {
- puts "metadata parsing error: unknown object class $class"
- }
- global $object
- set $object $object_config
- }
-
- if { $execMode == "batch" } { return }
- switchCanvas none
- redrawAll
-}
-
-proc parseFileMessage { data len flags channel } {
- global showAPI node_list
- set prmsg $showAPI
-
- array set tlvnames { 1 num 2 name 3 mode 4 fno 5 type 6 sname \
- 10 session 16 data 17 cdata }
- array set tlvsizes { num 4 name -1 mode -3 fno 2 type -1 sname -1 \
- session -1 data -1 cdata -1 }
- array set defvals { num -1 name "" mode -1 fno -1 type "" sname "" \
- session "" data "" cdata "" }
-
- if { $prmsg==1 } { puts -nonewline "FILE(flags=$flags," }
- array set vals [parseMessage $data $len $flags [array get tlvnames] \
- [array get tlvsizes] [array get defvals]]
- if { $prmsg } { puts ") "}
-
- # hook scripts received in File Message
- if { [string range $vals(type) 0 4] == "hook:" } {
- global g_hook_scripts
- set state [string range $vals(type) 5 end]
- lappend g_hook_scripts [list $vals(name) $state $vals(data)]
- return
- }
-
- # required fields
- foreach t "num name data" {
- if { $vals($t) == $defvals($t) } {
- puts "Received File Message without $t, dropping."; return;
- }
- }
-
- # check for node existance
- set node "n$vals(num)"
- if { [lsearch $node_list $node] == -1 } {
- puts "File message but node ($node) does not exist, dropping."
- return
- } else {
- global $node
- }
-
- # service customization received in File Message
- if { [string range $vals(type) 0 7] == "service:" } {
- customizeServiceFile $node $vals(name) $vals(type) $vals(data) true
- }
-}
-
-proc parseEventMessage { data len flags channel } {
- global showAPI eventtypes g_traffic_start_opt execMode node_list
- set prmsg $showAPI
- set current 0
- set nodenum -1
- set eventtype -1
- set eventname ""
- set eventdata ""
- set eventtime ""
- set session ""
-
- if { $prmsg==1 } { puts -nonewline "EVENT(flags=$flags," }
-
- # parse each TLV
- while { $current < $len } {
- set typelength [parseTLVHeader $data current]
- set type [lindex $typelength 0]
- set length [lindex $typelength 1]
- if { $length == 0 || $length == "" } { break }
- set pad [pad_32bit $length]
- # verbose debugging
- #puts "tlv type=$type length=$length pad=$pad current=$current"
- # TLV data
- switch -exact -- "$type" {
- 1 {
- incr current $pad
- binary scan $data @${current}I nodenum
- if { $prmsg == 1} { puts -nonewline "node=$nodenum," }
- }
- 2 {
- incr current $pad
- binary scan $data @${current}I eventtype
- if { $prmsg == 1} {
- set typestr ""
- foreach t [array names eventtypes] {
- if { $eventtypes($t) == $eventtype } {
- set typestr "-$t"
- break
- }
- }
- puts -nonewline "type=$eventtype$typestr,"
- }
- }
- 3 {
- binary scan $data @${current}a${length} eventname
- if { $prmsg == 1} { puts -nonewline "name=$eventname," }
- incr current $pad
- }
- 4 {
- binary scan $data @${current}a${length} eventdata
- if { $prmsg == 1} { puts -nonewline "data=$eventdata," }
- incr current $pad
- }
- 5 {
- binary scan $data @${current}a${length} eventtime
- if { $prmsg == 1} { puts -nonewline "time=$eventtime," }
- incr current $pad
- }
- 10 {
- binary scan $data @${current}a${length} session
- if { $prmsg == 1} { puts -nonewline "session=$session," }
- incr current $pad
- }
- default {
- if { $prmsg == 1} { puts -nonewline "unknown=" }
- if { $prmsg == 1} { puts -nonewline "$type," }
- }
- }
- # end switch
-
- # advance current pointer
- incr current $length
- }
-
- if { $prmsg == 1 } { puts ") "}
-
- # TODO: take other actions here based on Event Message
- if { $eventtype == 4 } { ;# entered the runtime state
- if { $g_traffic_start_opt == 1 } { startTrafficScripts }
- if { $execMode == "batch" } {
- global g_current_session g_abort_session
- if {$g_abort_session} {
- puts "Current session ($g_current_session) aborted. Disconnecting."
- shutdownSession
- } else {
- puts "Session running. Session id is $g_current_session. Disconnecting."
- }
- exit.real
- }
- } elseif { $eventtype == 6 } { ;# shutdown state
- set name [lindex [getEmulPlugin "*"] 0]
- if { [getAssignedRemoteServers] == "" } {
- # start a new session if not distributed
- # otherwise we need to allow time for node delete messages
- # from other servers
- pluginConnect $name disconnect 1
- pluginConnect $name connect 1
- }
- } elseif { $eventtype >= 7 || $eventtype <= 10 } {
- if { [string range $eventname 0 8] == "mobility:" } {
- set node "n$nodenum"
- if {[lsearch $node_list $node] == -1} {
- puts "Event message with unknown node %nodenum."
- return
- }
- handleMobilityScriptEvent $node $eventtype $eventdata $eventtime
- }
- }
-}
-
-proc parseSessionMessage { data len flags channel } {
- global showAPI g_current_session g_session_dialog_hint execMode
- set prmsg $showAPI
- set current 0
- set sessionids {}
- set sessionnames {}
- set sessionfiles {}
- set nodecounts {}
- set sessiondates {}
- set thumbs {}
- set sessionopaque {}
-
- if { $prmsg==1 } { puts -nonewline "SESSION(flags=$flags," }
-
- # parse each TLV
- while { $current < $len } {
- set typelength [parseTLVHeader $data current]
- set type [lindex $typelength 0]
- set length [lindex $typelength 1]
- if { $length == 0 || $length == "" } {
- puts "warning: zero-length TLV, discarding remainder of message!"
- break
- }
- set pad [pad_32bit $length]
- # verbose debugging
- #puts "tlv type=$type length=$length pad=$pad current=$current"
- # TLV data
- switch -exact -- "$type" {
- 1 {
- set sessionids {}
- binary scan $data @${current}a${length} sids
- if { $prmsg == 1} { puts -nonewline "sids=$sids," }
- set sessionids [split $sids |]
- incr current $pad
- }
- 2 {
- set sessionnames {}
- binary scan $data @${current}a${length} snames
- if { $prmsg == 1} { puts -nonewline "names=$snames," }
- set sessionnames [split $snames |]
- incr current $pad
- }
- 3 {
- set sessionfiles {}
- binary scan $data @${current}a${length} sfiles
- if { $prmsg == 1} { puts -nonewline "files=$sfiles," }
- set sessionfiles [split $sfiles |]
- incr current $pad
- }
- 4 {
- set nodecounts {}
- binary scan $data @${current}a${length} ncs
- if { $prmsg == 1} { puts -nonewline "ncs=$ncs," }
- set nodecounts [split $ncs |]
- incr current $pad
- }
- 5 {
- set sessiondates {}
- binary scan $data @${current}a${length} sdates
- if { $prmsg == 1} { puts -nonewline "dates=$sdates," }
- set sessiondates [split $sdates |]
- incr current $pad
- }
- 6 {
- set thumbs {}
- binary scan $data @${current}a${length} th
- if { $prmsg == 1} { puts -nonewline "thumbs=$th," }
- set thumbs [split $th |]
- incr current $pad
- }
- 10 {
- set sessionopaque {}
- binary scan $data @${current}a${length} sessionopaque
- if { $prmsg == 1} { puts -nonewline "$sessionopaque," }
- incr current $pad
- }
- default {
- if { $prmsg == 1} { puts -nonewline "unknown=" }
- if { $prmsg == 1} { puts -nonewline "$type," }
- }
- }
- # end switch
-
- # advance current pointer
- incr current $length
- }
-
- if { $prmsg == 1 } { puts ") "}
-
- if {$g_current_session == 0} {
- # set the current session to the channel port number
- set current_session [lindex [fconfigure $channel -sockname] 2]
- } else {
- set current_session $g_current_session
- }
-
- if {[lsearch $sessionids $current_session] == -1} {
- puts -nonewline "*** warning: current session ($g_current_session) "
- puts "not found in session list: $sessionids"
- }
-
- set orig_session_choice $g_current_session
- set g_current_session $current_session
- setGuiTitle ""
-
- if {$execMode == "closebatch"} {
- # we're going to close some session, so this is expected
- global g_session_choice
-
- if {[lsearch $sessionids $g_session_choice] == -1} {
- puts -nonewline "*** warning: current session ($g_session_choice) "
- puts "not found in session list: $sessionids"
- } else {
- set flags 0x2 ;# delete flag
- set sid $g_session_choice
- set name ""
- set f ""
- set nodecount ""
- set thumb ""
- set user ""
- sendSessionMessage $channel $flags $sid $name $f $nodecount $thumb $user
-
- puts "Session shutdown message sent."
- }
- exit.real
- }
-
- if {$orig_session_choice == 0 && [llength $sessionids] == 1} {
- # we just started up and only the current session exists
- set g_session_dialog_hint 0
- return
- }
-
- if {$execMode == "batch"} {
- puts "Another session is active."
- exit.real
- }
-
- if { $g_session_dialog_hint } {
- popupSessionConfig $channel $sessionids $sessionnames $sessionfiles \
- $nodecounts $sessiondates $thumbs $sessionopaque
- }
- set g_session_dialog_hint 0
-}
-
-# parse message TLVs given the possible TLV names and sizes
-# default values are supplied in defaultvals, parsed values are returned
-proc parseMessage { data len flags tlvnamesl tlvsizesl defaultvalsl } {
- global showAPI
- set prmsg $showAPI
-
- array set tlvnames $tlvnamesl
- array set tlvsizes $tlvsizesl
- array set vals $defaultvalsl ;# this array is returned
-
- set current 0
-
- while { $current < $len } {
- set typelength [parseTLVHeader $data current]
- set type [lindex $typelength 0]
- set length [lindex $typelength 1]
- if { $length == 0 || $length == "" } { break }
- set pad [pad_32bit $length]
-
- if {![info exists tlvnames($type)] } { ;# unknown TLV type
- if { $prmsg } { puts -nonewline "unknown=$type," }
- incr current $length
- continue
- }
- set tlvname $tlvnames($type)
- set size $tlvsizes($tlvname)
- # 32-bit and 64-bit vals pre-padded
- if { $size == 4 || $size == 8 } { incr current $pad }
- # read TLV data depending on size
- switch -exact -- "$size" {
- 2 { binary scan $data @${current}S vals($tlvname) }
- 4 { binary scan $data @${current}I vals($tlvname) }
- 8 { binary scan $data @${current}W vals($tlvname) }
- 16 { binary scan $data @${current}c16 vals($tlvname) }
- -1 { binary scan $data @${current}a${length} vals($tlvname) }
- }
- if { $size == -1 } { incr current $pad } ;# string vals post-padded
- if { $type == 6 } { incr current $pad } ;# 128-bit vals post-padded
- incr current $length
-
- if { $prmsg } { puts -nonewline "$tlvname=$vals($tlvname)," }
- }
- return [array get vals]
-}
-
-proc parseExceptionMessage { data len flags channel } {
- global showAPI
- set prmsg $showAPI
-
- array set typenames { 1 num 2 sess 3 level 4 src 5 date 6 txt 10 opaque }
- array set typesizes { num 4 sess -1 level 2 src -1 date -1 txt -1 \
- opaque -1 }
- array set defvals { num -1 sess "" level -1 src "" date "" txt "" opaque ""}
-
- if { $prmsg==1 } { puts -nonewline "EXCEPTION(flags=$flags," }
- array set vals [parseMessage $data $len $flags [array get typenames] \
- [array get typesizes] [array get defvals]]
- if { $prmsg == 1 } { puts ") "}
-
- if { $vals(level) == $defvals(level) } {
- puts "Exception Message received without an exception level."; return;
- }
-
- receiveException [array get vals]
-}
-
-proc sendNodePosMessage { channel node nodeid x y wlanid force } {
- global showAPI
- set prmsg $showAPI
-
- if { $channel == -1 } {
- set channel [lindex [getEmulPlugin $node] 2]
- if { $channel == -1 } { return }
- }
- set node_num [string range $node 1 end]
- set x [format "%u" [expr int($x)]]
- set y [format "%u" [expr int($y)]]
- set len [expr 8+4+4] ;# node number, x, y
- if {$nodeid > -1} { incr len 8 }
- if {$wlanid > -1} { incr len 8 }
- if {$force == 1 } { set crit 0x4 } else { set crit 0x0 }
- #puts "sending [expr $len+4] bytes: $nodeid $x $y $wlanid"
- if { $prmsg == 1 } {
- puts -nonewline ">NODE(flags=$crit,$node,x=$x,y=$y" }
- set msg [binary format ccSc2sIc2Sc2S \
- 1 $crit $len \
- {1 4} 0 $node_num \
- {0x20 2} $x \
- {0x21 2} $y
- ]
-
- set msg2 ""
- set msg3 ""
- if { $nodeid > -1 } {
- if { $prmsg == 1 } { puts -nonewline ",emuid=$nodeid" }
- set msg2 [binary format c2sI {0x23 4} 0 $nodeid]
- }
- if { $wlanid > -1 } {
- if { $prmsg == 1 } { puts -nonewline ",netid=$wlanid" }
- set msg3 [binary format c2sI {0x24 4} 0 $wlanid]
- }
-
- if { $prmsg == 1 } { puts ")" }
- puts -nonewline $channel $msg$msg2$msg3
- flushChannel channel "Error sending node position"
-}
-
-# build a new node
-proc sendNodeAddMessage { channel node } {
- global showAPI CORE_DATA_DIR
- set prmsg $showAPI
- set len [expr {8+8+4+4}]; # node number, type, x, y
- set ipv4 0
- set ipv6 0
- set macstr ""
- set wireless 0
-
- # type, name
- set type [getNodeTypeAPI $node]
- set model [getNodeModel $node]
- set model_len [string length $model]
- set model_pad_len [pad_32bit $model_len]
- set model_pad [binary format x$model_pad_len]
- set name [getNodeName $node]
- set name_len [string length $name]
- set name_pad_len [pad_32bit $name_len]
- set name_pad [binary format x$name_pad_len]
- incr len [expr { 2+$name_len+$name_pad_len}]
- if {$model_len > 0} { incr len [expr {2+$model_len+$model_pad_len }] }
- set node_num [string range $node 1 end]
-
- # fixup node type for EMANE-enabled WLAN nodes
- set opaque ""
- if { [isEmane $node] } { set type 0xA }
-
- # emulation server (node location)
- set emusrv [getNodeLocation $node]
- set emusrv_len [string length $emusrv]
- set emusrv_pad_len [pad_32bit $emusrv_len]
- set emusrv_pad [binary format x$emusrv_pad_len]
- if { $emusrv_len > 0 } { incr len [expr {2+$emusrv_len+$emusrv_pad_len } ] }
-
- # canvas
- set canv [getNodeCanvas $node]
- if { $canv != "c1" } {
- set canv [string range $canv 1 end] ;# convert "c2" to "2"
- incr len 4
- } else {
- set canv ""
- }
-
- # services
- set svc [getNodeServices $node false]
- set svc [join $svc "|"]
- set svc_len [string length $svc]
- set svc_pad_len [pad_32bit $svc_len]
- set svc_pad [binary format x$svc_pad_len]
- if { $svc_len > 0 } { incr len [expr {2+$svc_len+$svc_pad_len } ] }
-
- # icon
- set icon [getCustomImage $node]
- if { [file dirname $icon] == "$CORE_DATA_DIR/icons/normal" } {
- set icon [file tail $icon] ;# don't include standard icon path
- }
- set icon_len [string length $icon]
- set icon_pad_len [pad_32bit $icon_len]
- set icon_pad [binary format x$icon_pad_len]
- if { $icon_len > 0 } { incr len [expr {2+$icon_len+$icon_pad_len} ] }
-
- # opaque data
- set opaque_len [string length $opaque]
- set opaque_pad_len [pad_32bit $opaque_len]
- set opaque_pad [binary format x$opaque_pad_len]
- if { $opaque_len > 0 } { incr len [expr {2+$opaque_len+$opaque_pad_len} ] }
-
- # length must be calculated before this
- if { $prmsg == 1 } {
- puts -nonewline ">NODE(flags=add/str,$node,type=$type,$name,"
- }
- set msg [binary format c2Sc2sIc2sIcc \
- {0x1 0x11} $len \
- {0x1 4} 0 $node_num \
- {0x2 4} 0 $type \
- 0x3 $name_len ]
- puts -nonewline $channel $msg$name$name_pad
-
- # IPv4 address
- if { $ipv4 > 0 } {
- if { $prmsg == 1 } { puts -nonewline "$ipv4str," }
- set msg [binary format c2sI {0x4 4} 0 $ipv4]
- puts -nonewline $channel $msg
- }
-
- # MAC address
- if { $macstr != "" } {
- if { $prmsg == 1 } { puts -nonewline "$macstr," }
- set mac [join [split $macstr ":"] ""]
- puts -nonewline $channel [binary format c2x2W {0x5 8} 0x$mac]
- }
-
- # IPv6 address
- if { $ipv6 != 0 } {
- if { $prmsg == 1 } { puts -nonewline "$ipv6str," }
- set msg [binary format c2 {0x6 16} ]
- puts -nonewline $channel $msg
- foreach ipv6w [split $ipv6 ":"] {
- set msg [binary format S 0x$ipv6w]
- puts -nonewline $channel $msg
- }
- puts -nonewline $channel [binary format x2]; # 2 bytes padding
- }
-
- # model type
- if { $model_len > 0 } {
- set mh [binary format cc 0x7 $model_len]
- puts -nonewline $channel $mh$model$model_pad
- if { $prmsg == 1 } { puts -nonewline "m=$model," }
- }
-
- # emulation server
- if { $emusrv_len > 0 } {
- puts -nonewline $channel [binary format cc 0x8 $emusrv_len]
- puts -nonewline $channel $emusrv$emusrv_pad
- if { $prmsg == 1 } { puts -nonewline "srv=$emusrv," }
- }
-
- # X,Y coordinates
- set coords [getNodeCoords $node]
- set x [format "%u" [expr int([lindex $coords 0])]]
- set y [format "%u" [expr int([lindex $coords 1])]]
- set msg [binary format c2Sc2S {0x20 2} $x {0x21 2} $y]
- puts -nonewline $channel $msg
-
- # canvas
- if { $canv != "" } {
- if { $prmsg == 1 } { puts -nonewline "canvas=$canv," }
- set msg [binary format c2S {0x22 2} $canv]
- puts -nonewline $channel $msg
- }
-
- if { $prmsg == 1 } { puts -nonewline "x=$x,y=$y" }
-
- # services
- if { $svc_len > 0 } {
- puts -nonewline $channel [binary format cc 0x25 $svc_len]
- puts -nonewline $channel $svc$svc_pad
- if { $prmsg == 1 } { puts -nonewline ",svc=$svc" }
- }
-
- # icon
- if { $icon_len > 0 } {
- puts -nonewline $channel [binary format cc 0x42 $icon_len]
- puts -nonewline $channel $icon$icon_pad
- if { $prmsg == 1 } { puts -nonewline ",icon=$icon" }
- }
-
- # opaque data
- if { $opaque_len > 0 } {
- puts -nonewline $channel [binary format cc 0x50 $opaque_len]
- puts -nonewline $channel $opaque$opaque_pad
- if { $prmsg == 1 } { puts -nonewline ",opaque=$opaque" }
- }
-
- if { $prmsg == 1 } { puts ")" }
-
- flushChannel channel "Error sending node add"
-}
-
-# delete a node
-proc sendNodeDelMessage { channel node } {
- global showAPI
- set prmsg $showAPI
- set len 8; # node number
- set node_num [string range $node 1 end]
-
- if { $prmsg == 1 } { puts ">NODE(flags=del/str,$node_num)" }
- set msg [binary format c2Sc2sI \
- {0x1 0x12} $len \
- {0x1 4} 0 $node_num ]
- puts -nonewline $channel $msg
- flushChannel channel "Error sending node delete"
-}
-
-# send a message to build, modify, or delete a link
-# type should indicate add/delete/link/unlink
-proc sendLinkMessage { channel link type {sendboth true} } {
- global showAPI
- set prmsg $showAPI
-
- set node1 [lindex [linkPeers $link] 0]
- set node2 [lindex [linkPeers $link] 1]
- set if1 [ifcByPeer $node1 $node2]; set if2 [ifcByPeer $node2 $node1]
- if { [nodeType $node1] == "pseudo" } { return } ;# never seems to occur
- if { [nodeType $node2] == "pseudo" } {
- set mirror2 [getLinkMirror $node2]
- set node2 [getNodeName $node2]
- if { [string range $node1 1 end] > [string range $node2 1 end] } {
- return ;# only send one link message (for two pseudo-links)
- }
- set if2 [ifcByPeer $node2 $mirror2]
- }
- set node1_num [string range $node1 1 end]
- set node2_num [string range $node2 1 end]
-
- # flag for sending unidirectional link messages
- set uni 0
- if { $sendboth && [isLinkUni $link] } {
- set uni 1
- }
-
- # set flags and link message type from supplied type parameter
- set flags 0
- set ltype 1 ;# add/delete a link (not wireless link/unlink)
- set netid -1
- if { $type == "add" || $type == "link" } {
- set flags 1
- } elseif { $type == "delete" || $type == "unlink" } {
- set flags 2
- }
- if { $type == "link" || $type == "unlink" } {
- set ltype 0 ;# a wireless link/unlink event
- set tmp [getLinkOpaque $link net]
- if { $tmp != "" } { set netid [string range $tmp 1 end] }
- }
-
- set key ""
- if { [nodeType $node1] == "tunnel" } {
- set key [netconfFetchSection $node1 "tunnel-key"]
- if { $key == "" } { set key 1 }
- }
- if {[nodeType $node2] == "tunnel" } {
- set key [netconfFetchSection $node2 "tunnel-key"]
- if { $key == "" } { set key 1 }
- }
-
- if { $prmsg == 1 } {
- puts -nonewline ">LINK(flags=$flags,$node1_num-$node2_num,"
- }
-
- # len = node1num, node2num, type
- set len [expr {8+8+8}]
- set delay [getLinkDelay $link]
- if { $delay == "" } { set delay 0 }
- set jitter [getLinkJitter $link]
- if { $jitter == "" } { set jitter 0 }
- set bw [getLinkBandwidth $link]
- if { $bw == "" } { set bw 0 }
- set per [getLinkBER $link]; # PER and BER
- if { $per == "" } { set per 0 }
- set per_len 0
- set per_msg [buildStringTLV 0x5 $per per_len]
- set dup [getLinkDup $link]
- if { $dup == "" } { set dup 0 }
- set dup_len 0
- set dup_msg [buildStringTLV 0x6 $dup dup_len]
- if { $type != "delete" } {
- incr len [expr {12+12+$per_len+$dup_len+12}] ;# delay,bw,per,dup,jitter
- if {$prmsg==1 } {
- puts -nonewline "$delay,$bw,$per,$dup,$jitter,"
- }
- }
- # TODO: mer, burst, mburst
- if { $prmsg == 1 } { puts -nonewline "type=$ltype," }
- if { $uni } {
- incr len 4
- if { $prmsg == 1 } { puts -nonewline "uni=$uni," }
- }
- if { $netid > -1 } {
- incr len 8
- if { $prmsg == 1 } { puts -nonewline "netid=$netid," }
- }
- if { $key != "" } {
- incr len 8
- if { $prmsg == 1 } { puts -nonewline "key=$key," }
- }
-
- set if1num [ifcNameToNum $if1]; set if2num [ifcNameToNum $if2]
- set if1ipv4 0; set if2ipv4 0; set if1ipv6 ""; set if2ipv6 "";
- set if1ipv4mask 0; set if2ipv4mask 0;
- set if1ipv6mask ""; set if2ipv6mask ""; set if1mac ""; set if2mac "";
-
- if { $if1num >= 0 && ([[typemodel $node1].layer] == "NETWORK" || \
- [nodeType $node1] == "tunnel") } {
- incr len 4
- if { $prmsg == 1 } { puts -nonewline "if1n=$if1num," }
- if { $type != "delete" } {
- getIfcAddrs $node1 $if1 if1ipv4 if1ipv6 if1mac if1ipv4mask \
- if1ipv6mask len
- }
- }
- if { $if2num >= 0 && ([[typemodel $node2].layer] == "NETWORK" || \
- [nodeType $node2] == "tunnel") } {
- incr len 4
- if { $prmsg == 1 } { puts -nonewline "if2n=$if2num," }
- if { $type != "delete" } {
- getIfcAddrs $node2 $if2 if2ipv4 if2ipv6 if2mac if2ipv4mask \
- if2ipv6mask len
- }
- }
-
- # start building the binary message on channel
- # length must be calculated before this
- set msg [binary format ccSc2sIc2sI \
- {0x2} $flags $len \
- {0x1 4} 0 $node1_num \
- {0x2 4} 0 $node2_num ]
- puts -nonewline $channel $msg
-
- if { $type != "delete" } {
- puts -nonewline $channel [binary format c2sW {0x3 8} 0 $delay]
- puts -nonewline $channel [binary format c2sW {0x4 8} 0 $bw]
- puts -nonewline $channel $per_msg
- puts -nonewline $channel $dup_msg
- puts -nonewline $channel [binary format c2sW {0x7 8} 0 $jitter]
- }
- # TODO: mer, burst, mburst
-
- # link type
- puts -nonewline $channel [binary format c2sI {0x20 4} 0 $ltype]
-
- # unidirectional flag
- if { $uni } {
- puts -nonewline $channel [binary format c2S {0x22 2} $uni]
- }
-
- # network ID
- if { $netid > -1 } {
- puts -nonewline $channel [binary format c2sI {0x24 4} 0 $netid]
- }
-
- if { $key != "" } {
- puts -nonewline $channel [binary format c2sI {0x25 4} 0 $key]
- }
-
- # interface 1 info
- if { $if1num >= 0 && ([[typemodel $node1].layer] == "NETWORK" || \
- [nodeType $node1] == "tunnel") } {
- puts -nonewline $channel [ binary format c2S {0x30 2} $if1num ]
- }
- if { $if1ipv4 > 0 } { puts -nonewline $channel [binary format c2sIc2S \
- {0x31 4} 0 $if1ipv4 {0x32 2} $if1ipv4mask ] }
- if { $if1mac != "" } {
- set if1mac [join [split $if1mac ":"] ""]
- puts -nonewline $channel [binary format c2x2W {0x33 8} 0x$if1mac]
- }
- if {$if1ipv6 != ""} { puts -nonewline $channel [binary format c2 {0x34 16}]
- foreach ipv6w [split $if1ipv6 ":"] { puts -nonewline $channel \
- [binary format S 0x$ipv6w] }
- puts -nonewline $channel [binary format x2c2S {0x35 2} $if1ipv6mask] }
-
- # interface 2 info
- if { $if2num >= 0 && ([[typemodel $node2].layer] == "NETWORK" || \
- [nodeType $node2] == "tunnel") } {
- puts -nonewline $channel [ binary format c2S {0x36 2} $if2num ]
- }
- if { $if2ipv4 > 0 } { puts -nonewline $channel [binary format c2sIc2S \
- {0x37 4} 0 $if2ipv4 {0x38 2} $if2ipv4mask ] }
- if { $if2mac != "" } {
- set if2mac [join [split $if2mac ":"] ""]
- puts -nonewline $channel [binary format c2x2W {0x39 8} 0x$if2mac]
- }
- if {$if2ipv6 != ""} { puts -nonewline $channel [binary format c2 {0x40 16}]
- foreach ipv6w [split $if2ipv6 ":"] { puts -nonewline $channel \
- [binary format S 0x$ipv6w] }
- puts -nonewline $channel [binary format x2c2S {0x41 2} $if2ipv6mask] }
-
- if { $prmsg==1 } { puts ")" }
- flushChannel channel "Error sending link message"
-
- ##########################################################
- # send a second Link Message for unidirectional link effects
- if { $uni < 1 } {
- return
- }
- # first calculate length and possibly print the message
- set flags 0
- if { $prmsg == 1 } {
- puts -nonewline ">LINK(flags=$flags,$node2_num-$node1_num,"
- }
- set len [expr {8+8+8}] ;# len = node2num, node1num (swapped), type
- set delay [getLinkDelay $link up]
- if { $delay == "" } { set delay 0 }
- set jitter [getLinkJitter $link up]
- if { $jitter == "" } { set jitter 0 }
- set bw [getLinkBandwidth $link up]
- if { $bw == "" } { set bw 0 }
- set per [getLinkBER $link up]; # PER and BER
- if { $per == "" } { set per 0 }
- set per_len 0
- set per_msg [buildStringTLV 0x5 $per per_len]
- set dup [getLinkDup $link up]
- if { $dup == "" } { set dup 0 }
- set dup_len 0
- set dup_msg [buildStringTLV 0x6 $dup dup_len]
- incr len [expr {12+12+$per_len+$dup_len+12}] ;# delay,bw,per,dup,jitter
- if {$prmsg==1 } {
- puts -nonewline "$delay,$bw,$per,$dup,$jitter,"
- }
- if { $prmsg == 1 } { puts -nonewline "type=$ltype," }
- incr len 4 ;# unidirectional flag
- if { $prmsg == 1 } { puts -nonewline "uni=$uni," }
- # note that if1num / if2num are reversed here due to reversed node nums
- if { $if2num >= 0 && ([[typemodel $node2].layer] == "NETWORK" || \
- [nodeType $node2] == "tunnel") } {
- incr len 4
- if { $prmsg == 1 } { puts -nonewline "if1n=$if2num," }
- }
- if { $if1num >= 0 && ([[typemodel $node1].layer] == "NETWORK" || \
- [nodeType $node1] == "tunnel") } {
- incr len 4
- if { $prmsg == 1 } { puts -nonewline "if2n=$if1num," }
- }
- # build and send the link message
- set msg [binary format ccSc2sIc2sI \
- {0x2} $flags $len \
- {0x1 4} 0 $node2_num \
- {0x2 4} 0 $node1_num ]
- puts -nonewline $channel $msg
- puts -nonewline $channel [binary format c2sW {0x3 8} 0 $delay]
- puts -nonewline $channel [binary format c2sW {0x4 8} 0 $bw]
- puts -nonewline $channel $per_msg
- puts -nonewline $channel $dup_msg
- puts -nonewline $channel [binary format c2sW {0x7 8} 0 $jitter]
- puts -nonewline $channel [binary format c2sI {0x20 4} 0 $ltype]
- puts -nonewline $channel [binary format c2S {0x22 2} $uni]
- if { $if2num >= 0 && ([[typemodel $node2].layer] == "NETWORK" || \
- [nodeType $node2] == "tunnel") } {
- puts -nonewline $channel [ binary format c2S {0x30 2} $if2num ]
- }
- if { $if1num >= 0 && ([[typemodel $node1].layer] == "NETWORK" || \
- [nodeType $node1] == "tunnel") } {
- puts -nonewline $channel [ binary format c2S {0x36 2} $if1num ]
- }
- if { $prmsg==1 } { puts ")" }
- flushChannel channel "Error sending link message"
-}
-
-# helper to get IPv4, IPv6, MAC address and increment length
-# also prints TLV-style addresses if showAPI is true
-proc getIfcAddrs { node ifc ipv4p ipv6p macp ipv4maskp ipv6maskp lenp } {
- global showAPI
- upvar $ipv4p ipv4
- upvar $ipv6p ipv6
- upvar $macp mac
- upvar $ipv4maskp ipv4mask
- upvar $ipv6maskp ipv6mask
- upvar $lenp len
-
- if { $ifc == "" || $node == "" } { return }
-
- # IPv4 address
- set ipv4str [getIfcIPv4addr $node $ifc]
- if {$ipv4str != ""} {
- set ipv4 [lindex [split $ipv4str /] 0]
- if { [info exists ipv4mask ] } {
- set ipv4mask [lindex [split $ipv4str / ] 1]
- incr len 12; # 8 addr + 4 mask
- if { $showAPI == 1 } { puts -nonewline "$ipv4str," }
- } else {
- incr len 8; # 8 addr
- if { $showAPI == 1 } { puts -nonewline "$ipv4," }
- }
- set ipv4 [stringToIPv4 $ipv4]; # convert to integer
- }
-
- # IPv6 address
- set ipv6str [getIfcIPv6addr $node $ifc]
- if {$ipv6str != ""} {
- set ipv6 [lindex [split $ipv6str /] 0]
- if { [info exists ipv6mask ] } {
- set ipv6mask [lindex [split $ipv6str / ] 1]
- incr len 24; # 20 addr + 4 mask
- if { $showAPI == 1 } { puts -nonewline "$ipv6str," }
- } else {
- incr len 20; # 20 addr
- if { $showAPI == 1 } { puts -nonewline "$ipv6," }
- }
- set ipv6 [expandIPv6 $ipv6]; # convert to long string
- }
-
- # MAC address (from conf if there, otherwise generated)
- if { [info exists mac] } {
- set mac [lindex [getIfcMacaddr $node $ifc] 0]
- if {$mac == ""} {
- set mac [getNextMac]
- }
- if { $showAPI == 1 } { puts -nonewline "$mac," }
- incr len 12;
- }
-}
-
-#
-# Register Message: (registration types)
-# This is a simple Register Message, types is an array of
-# tuples.
-proc sendRegMessage { channel flags types_list } {
- global showAPI regtypes
- set prmsg $showAPI
-
- if { $channel == -1 || $channel == "" } {
- set plugin [lindex [getEmulPlugin "*"] 0]
- set channel [pluginConnect $plugin connect true]
- if { $channel == -1 } { return }
- }
- set len 0
- array set types $types_list
-
- # array names output is unreliable, sort it
- set type_list [lsort -dict [array names types]]
- foreach type $type_list {
- if { ![info exists regtypes($type)] } {
- puts "sendRegMessage: unknown registration type '$type'"
- return -1
- }
- set str_$type $types($type)
- set str_${type}_len [string length [set str_$type]]
- set str_${type}_pad_len [pad_32bit [set str_${type}_len]]
- set str_${type}_pad [binary format x[set str_${type}_pad_len]]
- incr len [expr { 2 + [set str_${type}_len] + [set str_${type}_pad_len]}]
- }
-
- if { $prmsg == 1 } { puts ">REG($type_list)" }
- # message header
- set msg1 [binary format ccS 4 $flags $len]
- puts -nonewline $channel $msg1
-
- foreach type $type_list {
- set type_num $regtypes($type)
- set tlvh [binary format cc $type_num [set str_${type}_len]]
- puts -nonewline $channel $tlvh[set str_${type}][set str_${type}_pad]
- }
-
- flushChannel channel "Error: API channel was closed"
-}
-
-#
-# Configuration Message: (object, type flags, node)
-# This is a simple Configuration Message containing flags
-proc sendConfRequestMessage { channel node model flags netid opaque } {
- global showAPI
- set prmsg $showAPI
-
- if { $channel == -1 || $channel == "" } {
- set pname [lindex [getEmulPlugin $node] 0]
- set channel [pluginConnect $pname connect true]
- if { $channel == -1 } { return }
- }
-
- set model_len [string length $model]
- set model_pad_len [pad_32bit $model_len]
- set model_pad [binary format x$model_pad_len ]
- set len [expr {4+2+$model_len+$model_pad_len}]
- # optional network ID to provide Netgraph mapping
- if { $netid != -1 } { incr len 8 }
- # convert from node name to number
- if { [string is alpha [string range $node 0 0]] } {
- set node [string range $node 1 end]
- }
-
- if { $node > 0 } { incr len 8 }
- # add a session number when configuring services
- set session ""
- set session_len 0
- set session_pad_len 0
- set session_pad ""
- if { $node <= 0 && $model == "services" } {
- global g_current_session
- set session [format "0x%x" $g_current_session]
- set session_len [string length $session]
- set session_pad_len [pad_32bit $session_len]
- set session_pad [binary format x$session_pad_len]
- incr len [expr {2 + $session_len + $session_pad_len}]
- }
- # opaque data - used when custom configuring services
- set opaque_len 0
- set msgop [buildStringTLV 0x50 $opaque opaque_len]
- if { $opaque_len > 0 } { incr len $opaque_len }
-
- if { $prmsg == 1 } {
- puts -nonewline ">CONF(flags=0,"
- if { $node > 0 } { puts -nonewline "node=$node," }
- puts -nonewline "obj=$model,cflags=$flags"
- if { $session != "" } { puts -nonewline ",session=$session" }
- if { $netid > -1 } { puts -nonewline ",netid=$netid" }
- if { $opaque_len > 0 } { puts -nonewline ",opaque=$opaque" }
- puts ") request"
- }
- # header, node node number, node model header
- set msg1 [binary format c2S {5 0} $len ]
- set msg1b ""
- if { $node > 0 } { set msg1b [binary format c2sI {1 4} 0 $node] }
- set msg1c [binary format cc 2 $model_len]
- # request flag
- set msg2 [binary format c2S {3 2} $flags ]
- # session number
- set msg3 ""
- if { $session != "" } {
- set msg3 [binary format cc 0x0A $session_len]
- set msg3 $msg3$session$session_pad
- }
- # network ID
- set msg4 ""
- if { $netid != -1 } {
- set msg4 [binary format c2sI {0x23 4} 0 0x$netid ]
- }
-
- #catch {puts -nonewline $channel $msg1$model$model_pad$msg2$msg3$msg4$msg5}
- puts -nonewline $channel $msg1$msg1b$msg1c$model$model_pad$msg2$msg3$msg4
- if { $opaque_len > 0 } { puts -nonewline $channel $msgop }
-
- flushChannel channel "Error: API channel was closed"
-}
-
-#
-# Configuration Message: (object, type flags, node, types, values)
-# This message is more complicated to build because of the list of
-# data types and values.
-proc sendConfReplyMessage { channel node model types values opaque } {
- global showAPI
- set prmsg $showAPI
- # convert from node name to number
- if { [string is alpha [string range $node 0 0]] } {
- set node [string range $node 1 end]
- }
- # add a session number when configuring services
- set session ""
- set session_len 0
- set session_pad_len 0
- set session_pad ""
- if { $node <= 0 && $model == "services" && $opaque == "" } {
- global g_current_session
- set session [format "0x%x" $g_current_session]
- set session_len [string length $session]
- set session_pad_len [pad_32bit $session_len]
- set session_pad [binary format x$session_pad_len]
- incr len [expr {$session_len + $session_pad_len}]
- }
-
- if { $prmsg == 1 } {
- puts -nonewline ">CONF(flags=0,"
- if {$node > -1 } { puts -nonewline "node=$node," }
- puts -nonewline "obj=$model,cflags=0"
- if {$session != "" } { puts -nonewline "session=$session," }
- if {$opaque != "" } { puts -nonewline "opaque=$opaque," }
- puts "types=<$types>,values=<$values>) reply"
- }
-
- # types (16-bit values) and values
- set n 0
- set type_len [expr {[llength $types] * 2} ]
- set type_data [binary format cc 4 $type_len]
- set value_data ""
- foreach type $types {
- set t [binary format S $type]
- set type_data $type_data$t
- set val [lindex $values $n]
- if { $val == "" } {
- #puts "warning: empty value $n (type=$type)"
- if { $type != 10 } { set val 0 }
- }
- incr n
- lappend value_data $val
- }; # end foreach
- set value_len 0
- set value_data [join $value_data |]
- set msgval [buildStringTLV 0x5 $value_data value_len]
- set type_pad_len [pad_32bit $type_len]
- set type_pad [binary format x$type_pad_len ]
- set model_len [string length $model]
- set model_pad_len [pad_32bit $model_len]
- set model_pad [binary format x$model_pad_len ]
- # opaque data - used when custom configuring services
- set opaque_len 0
- set msgop [buildStringTLV 0x50 $opaque opaque_len]
-
- # 4 bytes header, model TLV
- set len [expr 4+2+$model_len+$model_pad_len]
- if { $node > -1 } { incr len 8 }
- # session number
- set msg3 ""
- if { $session != "" } {
- incr len [expr {2 + $session_len + $session_pad_len }]
- set msg3 [binary format cc 0x0A $session_len]
- set msg3 $msg3$session$session_pad
- }
- if { $opaque_len > 0 } { incr len $opaque_len }
- # types TLV, values TLV
- incr len [expr {2 + $type_len + $type_pad_len + $value_len}]
-
- # header, node node number, node model header
- set msgh [binary format c2S {5 0} $len ]
- set msgwl ""
- if { $node > -1 } { set msgwl [binary format c2sI {1 4} 0 $node] }
- set model_hdr [binary format cc 2 $model_len]
- # no flags
- set type_hdr [binary format c2S {3 2} 0 ]
- set msg $msgh$msgwl$model_hdr$model$model_pad$type_hdr$type_data$type_pad
- set msg $msg$msgval$msg3
- puts -nonewline $channel $msg
- if { $opaque_len > 0 } { puts -nonewline $channel $msgop }
- flushChannel channel "Error sending conf reply"
-}
-
-# Event Message
-proc sendEventMessage { channel type nodenum name data flags } {
- global showAPI eventtypes
- set prmsg $showAPI
-
- set len [expr 8] ;# event type
- if {$nodenum > -1} { incr len 8 }
- set name_len [string length $name]
- set name_pad_len [pad_32bit $name_len]
- if { $name_len > 0 } { incr len [expr {2 + $name_len + $name_pad_len}] }
- set data_len [string length $data]
- set data_pad_len [pad_32bit $data_len]
- if { $data_len > 0 } { incr len [expr {2 + $data_len + $data_pad_len}] }
-
- if { $prmsg == 1 } {
- puts -nonewline ">EVENT(flags=$flags," }
- set msg [binary format ccS 8 $flags $len ] ;# message header
-
- set msg2 ""
- if { $nodenum > -1 } {
- if { $prmsg == 1 } { puts -nonewline "node=$nodenum," }
- set msg2 [binary format c2sI {0x01 4} 0 $nodenum]
- }
- if { $prmsg == 1} {
- set typestr ""
- foreach t [array names eventtypes] {
- if { $eventtypes($t) == $type } { set typestr "-$t"; break }
- }
- puts -nonewline "type=$type$typestr,"
- }
- set msg3 [binary format c2sI {0x02 4} 0 $type]
- set msg4 ""
- set msg5 ""
- if { $name_len > 0 } {
- if { $prmsg == 1 } { puts -nonewline "name=$name," }
- set msg4 [binary format cc 0x03 $name_len ]
- set name_pad [binary format x$name_pad_len ]
- set msg5 $name$name_pad
- }
- set msg6 ""
- set msg7 ""
- if { $data_len > 0 } {
- if { $prmsg == 1 } { puts -nonewline "data=$data" }
- set msg6 [binary format cc 0x04 $data_len ]
- set data_pad [binary format x$data_pad_len ]
- set msg7 $data$data_pad
- }
-
- if { $prmsg == 1 } { puts ")" }
- puts -nonewline $channel $msg$msg2$msg3$msg4$msg5$msg6$msg7
- flushChannel channel "Error sending Event type=$type"
-}
-
-
-# deploy working configuration using CORE API
-# Deploys a current working configuration. It creates all the
-# nodes and link as defined in configuration file.
-proc deployCfgAPI { sock } {
- global eid
- global node_list link_list annotation_list canvas_list
- global mac_byte4 mac_byte5
- global execMode
- global ngnodemap
- global mac_addr_start
- global deployCfgAPI_lock
- global eventtypes
- global g_comments
-
- if { ![info exists deployCfgAPI_lock] } { set deployCfgAPI_lock 0 }
- if { $deployCfgAPI_lock } {
- puts "***error: deployCfgAPI called while deploying config"
- return
- }
-
- set deployCfgAPI_lock 1 ;# lock
-
- set mac_byte4 0
- set mac_byte5 0
- if { [info exists mac_addr_start] } { set mac_byte5 $mac_addr_start }
- set t_start [clock seconds]
-
- global systype
- set systype [lindex [checkOS] 0]
- statgraph on [expr (2*[llength $node_list]) + [llength $link_list]]
-
-
- sendSessionProperties $sock
-
- # this tells the CORE services that we are starting to send
- # configuration data
- # clear any existing config
- sendEventMessage $sock $eventtypes(definition_state) -1 "" "" 0
- # inform CORE services about emulation servers, hook scripts, canvas info,
- # and services
- sendEventMessage $sock $eventtypes(configuration_state) -1 "" "" 0
- sendEmulationServerInfo $sock 0
- sendSessionOptions $sock
- sendHooks $sock
- sendCanvasInfo $sock
- sendNodeTypeInfo $sock 0
- # send any custom service info before the node messages
- sendNodeCustomServices $sock
-
- # send Node add messages for all emulation nodes
- foreach node $node_list {
- set node_id "$eid\_$node"
- set type [nodeType $node]
- set name [getNodeName $node]
- if { $type == "pseudo" } { continue }
-
- statgraph inc 1
- statline "Creating node $name"
- if { [[typemodel $node].layer] == "NETWORK" } {
- nodeHighlights .c $node on red
- }
- # inform the CORE daemon of the node
- sendNodeAddMessage $sock $node
- pluginCapsInitialize $node "mobmodel"
- writeNodeCoords $node [getNodeCoords $node]
- }
-
- # send Link add messages for all network links
- for { set pending_links $link_list } { $pending_links != "" } {} {
- set link [lindex $pending_links 0]
- set i [lsearch -exact $pending_links $link]
- set pending_links [lreplace $pending_links $i $i]
- statgraph inc 1
-
- set lnode1 [lindex [linkPeers $link] 0]
- set lnode2 [lindex [linkPeers $link] 1]
- if { [nodeType $lnode2] == "router" && \
- [getNodeModel $lnode2] == "remote" } {
- continue; # remote routers are ctrl. by GUI; TODO: move to daemon
- }
- sendLinkMessage $sock $link add
- }
-
- # GUI-specific meta-data send via Configure Messages
- if { [llength $annotation_list] > 0 } {
- sendMetaData $sock $annotation_list "annotation"
- }
- sendMetaData $sock $canvas_list "canvas" ;# assume >= 1 canvas
- # global GUI options - send as meta-data
- set obj "metadata"
- set values [getGlobalOptionList]
- sendConfReplyMessage $sock -1 $obj "10" "{global_options=$values}" ""
- if { [info exists g_comments] && $g_comments != "" } {
- sendConfReplyMessage $sock -1 $obj "10" "{comments=$g_comments}" ""
- }
-
- # status bar graph
- statgraph off 0
- statline "Network topology instantiated in [expr [clock seconds] - $t_start] seconds ([llength $node_list] nodes and [llength $link_list] links)."
-
- # TODO: turn on tcpdump if enabled; customPostConfigCommands;
- # addons 4 deployCfgHook
-
- # draw lines between wlan nodes
- # initialization does not work earlier than this
-
- foreach node $node_list {
- # WLAN handling: draw lines between wireless nodes
- if { [nodeType $node] == "wlan" && $execMode == "interactive" } {
- wlanRunMobilityScript $node
- }
- }
-
- sendTrafficScripts $sock
-
- # tell the CORE services that we are ready to instantiate
- sendEventMessage $sock $eventtypes(instantiation_state) -1 "" "" 0
-
- set deployCfgAPI_lock 0 ;# unlock
-
- statline "Network topology instantiated in [expr [clock seconds] - $t_start] seconds ([llength $node_list] nodes and [llength $link_list] links)."
-}
-
-#
-# emulation shutdown procedure when using the CORE API
-proc shutdownSession {} {
- global link_list node_list eid eventtypes execMode
-
- set nodecount [getNodeCount]
- if { $nodecount == 0 } {
- # This allows switching to edit mode without extra API messages,
- # such as when file new is selected while running an existing session.
- return
- }
-
- # prepare the channel
- set plugin [lindex [getEmulPlugin "*"] 0]
- set sock [pluginConnect $plugin connect true]
-
- sendEventMessage $sock $eventtypes(datacollect_state) -1 "" "" 0
-
- # shut down all links
- foreach link $link_list {
-
- set lnode2 [lindex [linkPeers $link] 1]
- if { [nodeType $lnode2] == "router" && \
- [getNodeModel $lnode2] == "remote" } {
- continue; # remote routers are ctrl. by GUI; TODO: move to daemon
- }
-
- sendLinkMessage $sock $link delete false
- }
- # shut down all nodes
- foreach node $node_list {
- set type [nodeType $node]
- if { [[typemodel $node].layer] == "NETWORK" && $execMode != "batch" } {
- nodeHighlights .c $node on red
- }
- sendNodeDelMessage $sock $node
- pluginCapsDeinitialize $node "mobmodel"
- deleteNodeCoords $node
- }
-
- sendNodeTypeInfo $sock 1
- sendEmulationServerInfo $sock 1
-}
-
-# inform the CORE services about the canvas information to support
-# conversion between X,Y and lat/long coordinates
-proc sendCanvasInfo { sock } {
- global curcanvas
-
- if { ![info exists curcanvas] } { return } ;# batch mode
- set obj "location"
-
- set scale [getCanvasScale $curcanvas]
- set refpt [getCanvasRefPoint $curcanvas]
- set refx [lindex $refpt 0]
- set refy [lindex $refpt 1]
- set latitude [lindex $refpt 2]
- set longitude [lindex $refpt 3]
- set altitude [lindex $refpt 4]
-
- set types [list 2 2 10 10 10 10]
- set values [list $refx $refy $latitude $longitude $altitude $scale]
-
- sendConfReplyMessage $sock -1 $obj $types $values ""
-}
-
-# inform the CORE services about the default services for a node type, which
-# are used when node-specific services have not been configured for a node
-proc sendNodeTypeInfo { sock reset } {
- global node_list
-
- set obj "services"
-
- if { $reset == 1} {
- sendConfRequestMessage $sock -1 "all" 0x3 -1 ""
- return
- }
- # build a list of node types in use
- set typesinuse ""
- foreach node $node_list {
- set type [nodeType $node]
- if { $type != "router" && $type != "OVS" } { continue }
- set model [getNodeModel $node]
- if { [lsearch $typesinuse $model] < 0 } { lappend typesinuse $model }
- }
-
- foreach type $typesinuse {
- # build a list of type + enabled services, all strings
- set values [getNodeTypeServices $type]
- set values [linsert $values 0 $type]
- set types [string repeat "10 " [llength $values]]
- sendConfReplyMessage $sock -1 $obj $types $values ""
- # send any custom profiles for a node type; node type passed in opaque
- set machine_type [getNodeTypeMachineType $type]
- set values [getNodeTypeProfile $type]
- if { $values != "" } {
- set types [string repeat "10 " [llength $values]]
- sendConfReplyMessage $sock -1 $machine_type $types $values \
- "$machine_type:$type"
- }
- }
-
-}
-
-# inform the CORE services about any services that have been customized for
-# a particular node
-proc sendNodeCustomServices { sock } {
- global node_list
- foreach node $node_list {
- set cfgs [getCustomConfig $node]
- set cfgfiles ""
- foreach cfg $cfgs {
- set ids [split [getConfig $cfg "custom-config-id"] :]
- if { [lindex $ids 0] != "service" } { continue }
- if { [llength $ids] == 3 } {
- # customized service config file -- build a list
- lappend cfgfiles $cfg
- continue
- }
- set s [lindex $ids 1]
- set values [getConfig $cfg "config"]
- set t [string repeat "10 " [llength $values]]
- sendConfReplyMessage $sock $node services $t $values "service:$s"
- }
- # send customized service config files after the service info
- foreach cfg $cfgfiles {
- set idstr [getConfig $cfg "custom-config-id"]
- set ids [split $idstr :]
- if { [lindex $ids 0] != "service" } { continue }
- set s [lindex $ids 1]
- set filename [lindex $ids 2]
- set data [join [getConfig $cfg "config"] "\n"]
- sendFileMessage $sock $node "service:$s" $filename "" $data \
- [string length $data]
- }
- }
-}
-
-# publish hooks to the CORE services
-proc sendHooks { sock } {
- global g_hook_scripts
- if { ![info exists g_hook_scripts] } { return }
- foreach hook $g_hook_scripts {
- set name [lindex $hook 0]
- set state [lindex $hook 1]
- set data [lindex $hook 2]
- # TODO: modify sendFileMessage to make node number optional
- sendFileMessage $sock n0 "hook:$state" $name "" $data \
- [string length $data]
- }
-}
-
-# inform the CORE services about the emulation servers that will be used
-proc sendEmulationServerInfo { sock reset } {
- global exec_servers
- set node -1 ;# not used
- set obj "broker"
-
- set servernames [getAssignedRemoteServers]
- if { $servernames == "" } { return } ;# not using emulation servers
-
- if { $reset == 1} {
- sendConfRequestMessage $sock $node $obj 0x3 -1 ""
- return
- }
-
- set servers ""
- foreach servername $servernames {
- set host [lindex $exec_servers($servername) 0]
- set port [lindex $exec_servers($servername) 1]
- lappend servers "$servername:$host:$port"
- }
-
- set serversstring [join $servers ,]
-
- set types [list 10]
- set values [list $serversstring]
-
- sendConfReplyMessage $sock $node $obj $types $values ""
-}
-
-# returns the length of node_list minus any pseudo-nodes (inter-canvas nodes)
-proc getNodeCount {} {
- global node_list
- set nodecount 0
- foreach node $node_list {
- if { [nodeType $node] != "pseudo" } { incr nodecount }
- }
- return $nodecount
-}
-
-# send basic properties of a session
-proc sendSessionProperties { sock } {
- global currentFile CORE_DATA_DIR CORE_USER
- set sessionname [file tail $currentFile]
- set nodecount [getNodeCount]
- if { $sessionname == "" } { set sessionname "untitled" }
- set tf "/tmp/thumb.jpg"
- if { ![writeCanvasThumbnail .c $tf] } {
- set src "$CORE_DATA_DIR/icons/normal/thumb-unknown.gif"
- set tf "/tmp/thumb.gif"
- if [catch { file copy $src $tf } e] {
- puts -nonewline "warning: failed to copy $src to $tf\n($e)"
- set tf ""
- }
- }
- set user $CORE_USER
- sendSessionMessage $sock 0 0 $sessionname $currentFile $nodecount $tf $user
-}
-
-# send session options from global array in Config Message
-proc sendSessionOptions { sock } {
- if { $sock == -1 } {
- set sock [lindex [getEmulPlugin "*"] 2]
- }
- set values [getSessionOptionsList]
- set types [string repeat "10 " [llength $values]]
- sendConfReplyMessage $sock -1 "session" $types $values ""
-}
-
-# send annotations as key=value metadata in Config Message
-proc sendAnnotations { sock } {
- global annotation_list
-
- if { $sock == -1 } {
- set sock [lindex [getEmulPlugin "*"] 2]
- }
- set values ""
- foreach a $annotation_list {
- global $a
- set val [set $a]
- lappend values "annotation $a=$val"
- }
- set types [string repeat "10 " [llength $values]]
- sendConfReplyMessage $sock -1 "metadata" $types $values ""
-}
-
-# send items as key=value metadata in Config Message
-proc sendMetaData { sock items itemtype } {
-
- if { $sock == -1 } {
- set sock [lindex [getEmulPlugin "*"] 2]
- }
- set values ""
- foreach i $items {
- global $i
- set val [set $i]
- lappend values "$itemtype $i=$val"
- }
- set types [string repeat "10 " [llength $values]]
- sendConfReplyMessage $sock -1 "metadata" $types $values ""
-}
-
-# send an Event message for the definition state (this clears any existing
-# state), then send all node and link definitions to the CORE services
-proc sendNodeLinkDefinitions { sock } {
- global node_list link_list annotation_list canvas_list eventtypes
- global g_comments
- #sendEventMessage $sock $eventtypes(definition_state) -1 "" "" 0
- foreach node $node_list {
- sendNodeAddMessage $sock $node
- pluginCapsInitialize $node "mobmodel"
- }
- foreach link $link_list { sendLinkMessage $sock $link add }
- # GUI-specific meta-data send via Configure Messages
- sendMetaData $sock $annotation_list "annotation"
- sendMetaData $sock $canvas_list "canvas"
- set obj "metadata"
- set values [getGlobalOptionList]
- sendConfReplyMessage $sock -1 $obj "10" "{global_options=$values}" ""
- if { [info exists g_comments] && $g_comments != "" } {
- sendConfReplyMessage $sock -1 $obj "10" "{comments=$g_comments}" ""
- }
-}
-
-proc getNodeTypeAPI { node } {
- set type [nodeType $node]
- if { $type == "router" } {
- set model [getNodeModel $node]
- set type [getNodeTypeMachineType $model]
- }
- switch -exact -- "$type" {
- router { return 0x0 }
- netns { return 0x0 }
- jail { return 0x0 }
- OVS { return 0x0 }
- physical { return 0x1 }
- tbd { return 0x3 }
- lanswitch { return 0x4 }
- hub { return 0x5 }
- wlan { return 0x6 }
- rj45 { return 0x7 }
- tunnel { return 0x8 }
- ktunnel { return 0x9 }
- emane { return 0xA }
- default { return 0x0 }
- }
-}
-
-# send an Execute message
-proc sendExecMessage { channel node cmd exec_num flags } {
- global showAPI g_api_exec_num
- set prmsg $showAPI
-
- set node_num [string range $node 1 end]
- set cmd_len [string length $cmd]
- if { $cmd_len > 255 } { puts "sendExecMessage error: cmd too long!"; return}
- set cmd_pad_len [pad_32bit $cmd_len]
- set cmd_pad [binary format x$cmd_pad_len]
-
- if { $exec_num == 0 } {
- incr g_api_exec_num
- set exec_num $g_api_exec_num
- }
-
- # node num + exec num + command string
- set len [expr {8 + 8 + 2 + $cmd_len + $cmd_pad_len}]
-
- if { $prmsg == 1 } {puts ">EXEC(flags=$flags,$node,n=$exec_num,cmd='$cmd')" }
-
- set msg [binary format ccSc2sIc2sIcc \
- 3 $flags $len \
- {1 4} 0 $node_num \
- {2 4} 0 $exec_num \
- 4 $cmd_len \
- ]
- puts -nonewline $channel $msg$cmd$cmd_pad
- flushChannel channel "Error sending file message"
-}
-
-# if source file (sf) is specified, then send a message that the file source
-# file should be copied to the given file name (f); otherwise, include the file
-# data in this message
-proc sendFileMessage { channel node type f sf data data_len } {
- global showAPI
- set prmsg $showAPI
-
- set node_num [string range $node 1 end]
-
- set f_len [string length $f]
- set f_pad_len [pad_32bit $f_len]
- set f_pad [binary format x$f_pad_len]
- set type_len [string length $type]
- set type_pad_len [pad_32bit $type_len]
- set type_pad [binary format x$type_pad_len]
- if { $sf != "" } {
- set sf_len [string length $sf]
- set sf_pad_len [pad_32bit $sf_len]
- set sf_pad [binary format x$sf_pad_len]
- set data_len 0
- set data_pad_len 0
- } else {
- set sf_len 0
- set sf_pad_len 0
- set data_pad_len [pad_32bit $data_len]
- set data_pad [binary format x$data_pad_len]
- }
- # TODO: gzip compression w/tlv type 0x11
-
- # node number TLV + file name TLV + ( file src name / data TLV)
- set len [expr {8 + 2 + 2 + $f_len + $f_pad_len + $sf_len + $sf_pad_len \
- + $data_len + $data_pad_len}]
- # 16-bit data length
- if { $data_len > 255 } {
- incr len 2
- if { $data_len > 65536 } {
- puts -nonewline "*** error: File Message data length too large "
- puts "($data_len > 65536)"
- return
- }
- }
- if { $type_len > 0 } { incr len [expr {2 + $type_len + $type_pad_len}] }
- set flags 1; # add flag
-
- if { $prmsg == 1 } {
- puts -nonewline ">FILE(flags=$flags,$node,f=$f,"
- if { $type != "" } { puts -nonewline "type=$type," }
- if { $sf != "" } { puts "src=$sf)"
- } else { puts "data=($data_len))" }
- }
-
- set msg [binary format ccSc2sIcc \
- 6 $flags $len \
- {1 4} 0 $node_num \
- 2 $f_len \
- ]
- set msg2 ""
- if { $type_len > 0 } {
- set msg2 [binary format cc 0x5 $type_len]
- set msg2 $msg2$type$type_pad
- }
- if { $sf != "" } { ;# source file name TLV
- set msg3 [binary format cc 0x6 $sf_len]
- puts -nonewline $channel $msg$f$f_pad$msg2$msg3$sf$sf_pad
- } else { ;# file data TLV
- if { $data_len > 255 } {
- set msg3 [binary format ccS 0x10 0 $data_len]
- } else {
- set msg3 [binary format cc 0x10 $data_len]
- }
- puts -nonewline $channel $msg$f$f_pad$msg2$msg3$data$data_pad
- }
- flushChannel channel "Error sending file message"
-}
-
-# Session Message
-proc sendSessionMessage { channel flags num name sfile nodecount tf user } {
- global showAPI
- set prmsg $showAPI
-
- if { $channel == -1 } {
- set pname [lindex [getEmulPlugin "*"] 0]
- set channel [pluginConnect $pname connect true]
- if { $channel == -1 } { return }
- }
-
- set num_len [string length $num]
- set num_pad_len [pad_32bit $num_len]
- set len [expr {2 + $num_len + $num_pad_len}]
- if { $num_len <= 0 } {
- puts "error: sendSessionMessage requires at least one session number"
- return
- }
- set name_len [string length $name]
- set name_pad_len [pad_32bit $name_len]
- if { $name_len > 0 } { incr len [expr { 2 + $name_len + $name_pad_len }] }
- set sfile_len [string length $sfile]
- set sfile_pad_len [pad_32bit $sfile_len]
- if { $sfile_len > 0 } {
- incr len [expr { 2 + $sfile_len + $sfile_pad_len }]
- }
- set nc_len [string length $nodecount]
- set nc_pad_len [pad_32bit $nc_len]
- if { $nc_len > 0 } { incr len [expr { 2 + $nc_len + $nc_pad_len }] }
- set tf_len [string length $tf]
- set tf_pad_len [pad_32bit $tf_len]
- if { $tf_len > 0 } { incr len [expr { 2 + $tf_len + $tf_pad_len }] }
- set user_len [string length $user]
- set user_pad_len [pad_32bit $user_len]
- if { $user_len > 0 } { incr len [expr { 2 + $user_len + $user_pad_len }] }
-
- if { $prmsg == 1 } {
- puts -nonewline ">SESSION(flags=$flags" }
- set msgh [binary format ccS 0x09 $flags $len ] ;# message header
-
- if { $prmsg == 1 } { puts -nonewline ",sids=$num" }
- set num_hdr [binary format cc 0x01 $num_len]
- set num_pad [binary format x$num_pad_len ]
- set msg1 "$num_hdr$num$num_pad"
-
- set msg2 ""
- if { $name_len > 0 } {
- if { $prmsg == 1 } { puts -nonewline ",name=$name" }
- # TODO: name_len > 255
- set name_hdr [binary format cc 0x02 $name_len]
- set name_pad [binary format x$name_pad_len]
- set msg2 "$name_hdr$name$name_pad"
- }
- set msg3 ""
- if { $sfile_len > 0 } {
- if { $prmsg == 1 } { puts -nonewline ",file=$sfile" }
- # TODO: sfile_len > 255
- set sfile_hdr [binary format cc 0x03 $sfile_len]
- set sfile_pad [binary format x$sfile_pad_len]
- set msg3 "$sfile_hdr$sfile$sfile_pad"
- }
- set msg4 ""
- if { $nc_len > 0 } {
- if { $prmsg == 1 } { puts -nonewline ",nc=$nodecount" }
- set nc_hdr [binary format cc 0x04 $nc_len]
- set nc_pad [binary format x$nc_pad_len]
- set msg4 "$nc_hdr$nodecount$nc_pad"
- }
- set msg5 ""
- if { $tf_len > 0 } {
- if { $prmsg == 1 } { puts -nonewline ",thumb=$tf" }
- set tf_hdr [binary format cc 0x06 $tf_len]
- set tf_pad [binary format x$tf_pad_len]
- set msg5 "$tf_hdr$tf$tf_pad"
- }
- set msg6 ""
- if { $user_len > 0 } {
- if { $prmsg == 1 } { puts -nonewline ",user=$user" }
- set user_hdr [binary format cc 0x07 $user_len]
- set user_pad [binary format x$user_pad_len]
- set msg6 "$user_hdr$user$user_pad"
- }
-
- if { $prmsg == 1 } { puts ")" }
- puts -nonewline $channel $msgh$msg1$msg2$msg3$msg4$msg5$msg6
- flushChannel channel "Error sending Session num=$num"
-}
-
-# return a new execution number and record it in the execution request list
-# for the given callback (e.g. widget) type
-proc newExecCallbackRequest { type } {
- global g_api_exec_num g_execRequests
- incr g_api_exec_num
- set exec_num $g_api_exec_num
- lappend g_execRequests($type) $exec_num
- return $exec_num
-}
-
-# ask daemon to load or save an XML file based on the current session
-proc xmlFileLoadSave { cmd name } {
- global oper_mode eventtypes
-
- set plugin [lindex [getEmulPlugin "*"] 0]
- set sock [pluginConnect $plugin connect true]
- if { $sock == -1 || $sock == "" } { return }
-
- # inform daemon about nodes and links when saving in edit mode
- if { $cmd == "save" && $oper_mode != "exec" } {
- sendSessionProperties $sock
- # this tells the CORE services that we are starting to send
- # configuration data
- # clear any existing config
- sendEventMessage $sock $eventtypes(definition_state) -1 "" "" 0
- sendEventMessage $sock $eventtypes(configuration_state) -1 "" "" 0
- sendEmulationServerInfo $sock 0
- sendSessionOptions $sock
- sendHooks $sock
- sendCanvasInfo $sock
- sendNodeTypeInfo $sock 0
- # send any custom service info before the node messages
- sendNodeCustomServices $sock
- sendNodeLinkDefinitions $sock
- } elseif { $cmd == "open" } {
- # reset config objects
- sendNodeTypeInfo $sock 1
- }
- sendEventMessage $sock $eventtypes(file_$cmd) -1 $name "" 0
-}
-
-############################################################################
-#
-# Helper functions below here
-#
-
-# helper function to get interface number from name
-proc ifcNameToNum { ifc } {
- # eth0, eth1, etc.
- if {[string range $ifc 0 2] == "eth"} {
- set ifnum [string range $ifc 3 end]
- # l0, l1, etc.
- } else {
- set ifnum [string range $ifc 1 end]
- }
- if { $ifnum == "" } {
- return -1
- }
- if {![string is integer $ifnum]} {
- return -1
- }
- return $ifnum
-}
-
-#
-# parse the type and length from a TLV header
-proc parseTLVHeader { data current_ref } {
- global showAPI
- set prmsg $showAPI
- upvar $current_ref current
-
- if { [binary scan $data @${current}cc type length] != 2 } {
- if { $prmsg == 1 } { puts "TLV header error" }
- return ""
- }
- set length [expr {$length & 0xFF}]; # convert signed to unsigned
- if { $length == 0 } {
- if { $type == 0 } {
- # prevent endless looping
- if { $prmsg == 1 } { puts -nonewline "(extra padding)" }
- return ""
- } else {
- # support for length > 255
- incr current 2
- if { [binary scan $data @${current}S length] != 1 } {
- puts "error reading TLV length (type=$type)"
- return ""
- }
- set length [expr {$length & 0xFFFF}]
- if { $length == 0 } {
- # zero-length string, not length > 255
- incr current -2
- }
- }
- }
- incr current 2
- return [list $type $length]
-}
-
-# return the binary string, and length by reference
-proc buildStringTLV { type data len_ref } {
- upvar $len_ref len
- set data_len [string length $data]
- if { $data_len > 65536 } {
- puts "warning: buildStringTLV data truncated"
- set data_len 65536
- set data [string range 0 65535]
- }
- set data_pad_len [pad_32bit $data_len]
- set data_pad [binary format x$data_pad_len]
-
- if { $data_len == 0 } {
- set len 0
- return ""
- }
-
- if { $data_len > 255 } {
- set hdr [binary format ccS $type 0 $data_len]
- set hdr_len 4
- } else {
- set hdr [binary format cc $type $data_len]
- set hdr_len 2
- }
-
- set len [expr {$hdr_len + $data_len + $data_pad_len}]
-
- return $hdr$data$data_pad
-}
-
-# calculate padding to 32-bit word boundary
-# 32-bit and 64-bit values are pre-padded, strings and 128-bit values are
-# post-padded to word boundary, depending on type
-proc pad_32bit { len } {
- # total length = 2 + len + pad
- if { $len < 256 } {
- set hdrsiz 2
- } else {
- set hdrsiz 4
- }
- # calculate padding to fill 32-bit boundary
- return [expr { -($hdrsiz + $len) % 4 }]
-}
-
-proc macToString { mac_num } {
- set mac_bytes ""
- # convert 64-bit integer into 12-digit hex string
- set mac_num 0x[format "%.12lx" $mac_num]
- while { $mac_num > 0 } {
- # append 8-bit hex number to list
- set uchar [format "%02x" [expr $mac_num & 0xFF]]
- lappend mac_bytes $uchar
- # shift off 8-bits
- set mac_num [expr $mac_num >> 8]
- }
-
- # make sure we have six hex digits
- set num_zeroes [expr 6 - [llength $mac_bytes]]
- while { $num_zeroes > 0 } {
- lappend mac_bytes 00
- incr num_zeroes -1
- }
-
- # this is lreverse in tcl8.5 and later
- set r {}
- set i [llength $mac_bytes]
- while { $i > 0 } { lappend r [lindex $mac_bytes [incr i -1]] }
-
- return [join $r :]
-}
-
-proc hexdump { data } {
- # read data as hex
- binary scan $data H* hex
- # split into pairs of hex digits
- regsub -all -- {..} $hex {& } hex
- return $hex
-}
diff --git a/gui/canvas.tcl b/gui/canvas.tcl
deleted file mode 100644
index 11c8217b..00000000
--- a/gui/canvas.tcl
+++ /dev/null
@@ -1,406 +0,0 @@
-#
-# Copyright 2005-2008 University of Zagreb, Croatia.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-#
-
-#****h* imunes/canvas.tcl
-# NAME
-# canvas.tcl -- file used for manipultaion with canvases in IMUNES
-# FUNCTION
-# This module is used to define all the actions used for configuring
-# canvases in IMUNES. On each canvas a part of the simulation is presented
-# If there is no additional canvas defined, simulation is presented on the
-# defalut canvas.
-#
-#****
-
-#****f* canvas.tcl/removeCanvas
-# NAME
-# removeCanvas -- remove canvas
-# SYNOPSIS
-# removeCanvas $canvas_id
-# FUNCTION
-# Removes the canvas from simulation. This function does not change the
-# configuration of the nodes, i.e. nodes attached to the removed canvas
-# remain attached to the same non existing canvas.
-# INPUTS
-# * canvas_id -- canvas id
-#****
-
-proc removeCanvas { canvas } {
- global canvas_list $canvas
-
- set i [lsearch $canvas_list $canvas]
- set canvas_list [lreplace $canvas_list $i $i]
- set $canvas {}
-}
-
-#****f* canvas.tcl/newCanvas
-# NAME
-# newCanvas -- craete new canvas
-# SYNOPSIS
-# set canvas_id [newCanvas $canvas_name]
-# FUNCTION
-# Creates new canvas. Returns the canvas_id of the new canvas.
-# If the canvas_name parameter is empty, the name of the new canvas
-# is set to CanvasN, where N represents the canvas_id of the new canvas.
-# INPUTS
-# * canvas_name -- canvas name
-# RESULT
-# * canvas_id -- canvas id
-#****
-
-proc newCanvas { name } {
- global canvas_list
-
- set canvas [newObjectId canvas]
- global $canvas
- lappend canvas_list $canvas
- set $canvas {}
- if { $name != "" } {
- setCanvasName $canvas $name
- } else {
- setCanvasName $canvas Canvas[string range $canvas 1 end]
- }
-
- return $canvas
-}
-
-
-proc setCanvasSize { canvas x y } {
- global $canvas
-
- set i [lsearch [set $canvas] "size *"]
- if { $i >= 0 } {
- set $canvas [lreplace [set $canvas] $i $i "size {$x $y}"]
- } else {
- set $canvas [linsert [set $canvas] 1 "size {$x $y}"]
- }
-}
-
-proc getCanvasSize { canvas } {
- global $canvas g_prefs
-
- set entry [lrange [lsearch -inline [set $canvas] "size *"] 1 end]
- set size [string trim $entry \{\}]
- if { $size == "" } {
- return "$g_prefs(gui_canvas_x) $g_prefs(gui_canvas_y)"
- } else {
- return $size
- }
-}
-
-#****f* canvas.tcl/getCanvasName
-# NAME
-# getCanvasName -- get canvas name
-# SYNOPSIS
-# set canvas_name [getCanvasName $canvas_id]
-# FUNCTION
-# Returns the name of the canvas.
-# INPUTS
-# * canvas_id -- canvas id
-# RESULT
-# * canvas_name -- canvas name
-#****
-
-proc getCanvasName { canvas } {
- global $canvas
-
- set entry [lrange [lsearch -inline [set $canvas] "name *"] 1 end]
- return [string trim $entry \{\}]
-}
-
-#****f* canvas.tcl/setCanvasName
-# NAME
-# setCanvasName -- set canvas name
-# SYNOPSIS
-# setCanvasName $canvas_id $canvas_name
-# FUNCTION
-# Sets the name of the canvas.
-# INPUTS
-# * canvas_id -- canvas id
-# * canvas_name -- canvas name
-#****
-
-proc setCanvasName { canvas name } {
- global $canvas
-
- set i [lsearch [set $canvas] "name *"]
- if { $i >= 0 } {
- set $canvas [lreplace [set $canvas] $i $i "name {$name}"]
- } else {
- set $canvas [linsert [set $canvas] 1 "name {$name}"]
- }
-}
-
-# Boeing: canvas wallpaper support
-proc getCanvasWallpaper { canvas } {
- global $canvas
-
- set entry [lrange [lsearch -inline [set $canvas] "wallpaper *"] 1 end]
- set entry2 [lrange [lsearch -inline \
- [set $canvas] "wallpaper-style *"] 1 end]
- return [list [string trim $entry \{\}] [string trim $entry2 \{\}]]
-}
-
-proc setCanvasWallpaper { canvas file style} {
- global $canvas
-
- set i [lsearch [set $canvas] "wallpaper *"]
- if { $i >= 0 } {
- set $canvas [lreplace [set $canvas] $i $i "wallpaper {$file}"]
- } else {
- set $canvas [linsert [set $canvas] 1 "wallpaper {$file}"]
- }
-
- set i [lsearch [set $canvas] "wallpaper-style *"]
- if { $i >= 0 } {
- set $canvas [lreplace [set $canvas] $i $i "wallpaper-style {$style}"]
- } else {
- set $canvas [linsert [set $canvas] 1 "wallpaper-style {$style}"]
- }
-}
-
-# Boeing: manage canvases
-proc manageCanvasPopup { x y } {
- global curcanvas CORE_DATA_DIR
-
- set w .entry1
- catch {destroy $w}
- toplevel $w -takefocus 1
-
- if { $x == 0 && $y == 0 } {
- set screen [wm maxsize .]
- set x [expr {[lindex $screen 0] / 4}]
- set y [expr {[lindex $screen 1] / 4}]
- } else {
- set x [expr {$x + 10}]
- set y [expr {$y - 250}]
- }
- wm geometry $w +$x+$y
- wm title $w "Manage Canvases"
- wm iconname $w "Manage Canvases"
-
-
- ttk::frame $w.name
- ttk::label $w.name.lab -text "Canvas name:"
- ttk::entry $w.name.ent
- $w.name.ent insert 0 [getCanvasName $curcanvas]
- pack $w.name.lab $w.name.ent -side left -fill x
- pack $w.name -side top -padx 4 -pady 4
-
- global canvas_list
- ttk::frame $w.canv
- listbox $w.canv.cl -bg white -yscrollcommand "$w.canv.scroll set"
- ttk::scrollbar $w.canv.scroll -orient vertical -command "$w.canv.cl yview"
- foreach canvas $canvas_list {
- $w.canv.cl insert end [getCanvasName $canvas]
- if { $canvas == $curcanvas } {
- set curindex [expr {[$w.canv.cl size] - 1}]
- }
- }
- pack $w.canv.cl -side left -pady 4 -fill both -expand true
- pack $w.canv.scroll -side left -fill y
- pack $w.canv -side top -fill both -expand true -padx 4 -pady 4
- $w.canv.cl selection set $curindex
- $w.canv.cl see $curindex
- bind $w.canv.cl "manageCanvasSwitch $w"
-
- ttk::frame $w.buttons2
- foreach b {up down} {
- set fn "$CORE_DATA_DIR/icons/tiny/arrow.${b}.gif"
- set img$b [image create photo -file $fn]
- ttk::button $w.buttons2.$b -image [set img${b}] \
- -command "manageCanvasUpDown $w $b"
- }
- pack $w.buttons2.up $w.buttons2.down -side left -expand 1
- pack $w.buttons2 -side top -fill x -pady 2
-
- # hidden list of canvas numbers
- ttk::label $w.list -text $canvas_list
-
- ttk::frame $w.buttons
- ttk::button $w.buttons.apply -text "Apply" -command "manageCanvasApply $w"
- ttk::button $w.buttons.cancel -text "Cancel" -command "destroy $w"
- pack $w.buttons.apply $w.buttons.cancel -side left -expand 1
- pack $w.buttons -side bottom -fill x -pady 2m
-
- bind $w "destroy $w"
- bind $w "manageCanvasApply $w"
-
-}
-
-# Boeing: manage canvases helper
-# called when a canvas in the list is double-clicked
-proc manageCanvasSwitch { w } {
- global canvas_list curcanvas
- set i [$w.canv.cl curselection]
- if {$i == ""} { return}
- set i [lindex $i 0]
- set item [$w.canv.cl get $i]
-
- foreach canvas $canvas_list {
- if {[getCanvasName $canvas] == $item} {
- $w.name.ent delete 0 end
- $w.name.ent insert 0 $item
- set curcanvas $canvas
- switchCanvas none
- return
- }
- }
-}
-
-# manage canvases helper
-# handle the move up/down buttons for the canvas selection window
-proc manageCanvasUpDown { w dir } {
- global canvas_list
- # get the currently selected item
- set i [$w.canv.cl curselection]
- if {$i == ""} { return}
- set i [lindex $i 0]
- set item [$w.canv.cl get $i]
-
- if {$dir == "down" } {
- set max [expr {[llength $canvas_list] - 1}]
- if {$i >= $max } { return }
- set newi [expr {$i + 1}]
- } else {
- if {$i <= 0} { return }
- set newi [expr {$i - 1}]
- }
-
- # change the position
- $w.canv.cl delete $i
- $w.canv.cl insert $newi $item
- $w.canv.cl selection set $newi
- $w.canv.cl see $newi
-
- # update hidden list of canvas numbers
- set new_canvas_list [$w.list cget -text]
- set item [lindex $new_canvas_list $i]
- set new_canvas_list [lreplace $new_canvas_list $i $i]
- set new_canvas_list [linsert $new_canvas_list $newi $item]
- $w.list configure -text $new_canvas_list
-}
-
-# manage canvases helper
-# called when apply button is pressed - changes the order of the canvases
-proc manageCanvasApply { w } {
- global canvas_list curcanvas changed
- # we calculated this list earlier, making life easier here
- set new_canvas_list [$w.list cget -text]
- if {$canvas_list != $new_canvas_list} {
- set canvas_list $new_canvas_list
- }
- set newname [$w.name.ent get]
- destroy $w
- if { $newname != [getCanvasName $curcanvas] } {
- set changed 1
- }
- setCanvasName $curcanvas $newname
- switchCanvas none
- updateUndoLog
-}
-
-proc setCanvasScale { canvas scale } {
- global $canvas
-
- set i [lsearch [set $canvas] "scale *"]
- if { $i >= 0 } {
- set $canvas [lreplace [set $canvas] $i $i "scale $scale"]
- } else {
- set $canvas [linsert [set $canvas] 1 "scale $scale"]
- }
-}
-
-proc getCanvasScale { canvas } {
- global $canvas g_prefs
-
- set entry [lrange [lsearch -inline [set $canvas] "scale *"] 1 end]
- set scale [string trim $entry \{\}]
- if { $scale == "" } {
- if { ![info exists g_prefs(gui_canvas_scale)] } { return 150.0 }
- return "$g_prefs(gui_canvas_scale)"
- } else {
- return $scale
- }
-}
-
-proc setCanvasRefPoint { canvas refpt } {
- global $canvas
-
- set i [lsearch [set $canvas] "refpt *"]
- if { $i >= 0 } {
- set $canvas [lreplace [set $canvas] $i $i "refpt {$refpt}"]
- } else {
- set $canvas [linsert [set $canvas] 1 "refpt {$refpt}"]
- }
-}
-
-proc getCanvasRefPoint { canvas } {
- global $canvas g_prefs DEFAULT_REFPT
-
- set entry [lrange [lsearch -inline [set $canvas] "refpt *"] 1 end]
- set altitude [string trim $entry \{\}]
- if { $altitude == "" } {
- if { ![info exists g_prefs(gui_canvas_refpt)] } {
- return $DEFAULT_REFPT
- }
- return "$g_prefs(gui_canvas_refpt)"
- } else {
- return $altitude
- }
-}
-
-# from http://wiki.tcl.tk/1415 (MAK)
-proc canvasSee { hWnd items } {
- set box [eval $hWnd bbox $items]
-
- if {$box == ""} { return }
-
- if {[string match {} [$hWnd cget -scrollregion]] } {
- # People really should set -scrollregion you know...
- foreach {x y x1 y1} $box break
-
- set x [expr round(2.5 * ($x1+$x) / [winfo width $hWnd])]
- set y [expr round(2.5 * ($y1+$y) / [winfo height $hWnd])]
-
- $hWnd xview moveto 0
- $hWnd yview moveto 0
- $hWnd xview scroll $x units
- $hWnd yview scroll $y units
- } else {
- # If -scrollregion is set properly, use this
- foreach { x y x1 y1 } $box break
- foreach { top btm } [$hWnd yview] break
- foreach { left right } [$hWnd xview] break
- foreach { p q xmax ymax } [$hWnd cget -scrollregion] break
-
- set xpos [expr (($x1+$x) / 2.0) / $xmax - ($right-$left) / 2.0]
- set ypos [expr (($y1+$y) / 2.0) / $ymax - ($btm-$top) / 2.0]
-
- $hWnd xview moveto $xpos
- $hWnd yview moveto $ypos
- }
-}
diff --git a/gui/cfgparse.tcl b/gui/cfgparse.tcl
deleted file mode 100644
index 41f25594..00000000
--- a/gui/cfgparse.tcl
+++ /dev/null
@@ -1,1147 +0,0 @@
-#
-# Copyright 2005-2008 University of Zagreb, Croatia.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# This work was supported in part by the Croatian Ministry of Science
-# and Technology through the research contract #IP-2003-143.
-#
-
-#****h* imunes/cfgparse.tcl
-# NAME
-# cfgparse.tcl -- file used for parsing the configuration
-# FUNCTION
-# This module is used for parsing the configuration, i.e. reading the
-# configuration from a file or a string and writing the configuration
-# to a file or a string. This module also contains a function for returning
-# a new ID for nodes, links and canvases.
-#****
-
-#****f* nodecfg.tcl/dumpputs
-# NAME
-# dumpputs -- puts a string to a file or a string configuration
-# SYNOPSIS
-# dumpputs $method $destination $string
-# FUNCTION
-# Puts a sting to the file or appends the string configuration (used for
-# undo functions), the choice depends on the value of method parameter.
-# INPUTS
-# * method -- method used. Possiable values are file (if saving the string
-# to the file) and string (if appending the string configuration)
-# * dest -- destination used. File_id for files, and string name for string
-# configuration
-# * string -- the string that is inserted to a file or appended to the string
-# configuartion
-#****
-
-proc dumpputs {method dest string} {
- switch -exact -- $method {
- file {
- puts $dest $string
- }
- string {
- global $dest
- append $dest "$string
-"
- }
- }
-}
-
-#****f* nodecfg.tcl/dumpCfg
-# NAME
-# dumpCfg -- puts the current configuraton to a file or a string
-# SYNOPSIS
-# dumpCfg $method $destination
-# FUNCTION
-# Writes the working (current) configuration to a file or a string.
-# INPUTS
-# * method -- used method. Possiable values are file (saving current congif
-# to the file) and string (saving current config in a string)
-# * dest -- destination used. File_id for files, and string name for string
-# configurations
-#****
-
-proc dumpCfg {method dest} {
- global node_list plot_list link_list canvas_list annotation_list
-
- global g_comments
- if { [info exists g_comments] && $g_comments != "" } {
- dumpputs $method $dest "comments \{"
- foreach line [split $g_comments "\n"] { dumpputs $method $dest "$line" }
- dumpputs $method $dest "\}"
- dumpputs $method $dest ""
- }
-
- foreach node $node_list {
- global $node
- upvar 0 $node lnode
- dumpputs $method $dest "node $node \{"
- foreach element $lnode {
- if { "[lindex $element 0]" == "network-config" } {
- dumpputs $method $dest " network-config \{"
- foreach line [lindex $element 1] {
- dumpputs $method $dest " $line"
- }
- dumpputs $method $dest " \}"
- } elseif { "[lindex $element 0]" == "custom-config" } {
- dumpputs $method $dest " custom-config \{"
- foreach line [lindex $element 1] {
- if { $line != {} } {
- if { [catch {set str [lindex $line 0]} err] } {
- puts "error loading config: $err"
- puts "problem section: [lindex $element 0]"
- puts "problem line: $line"
- set str ""
- }
- if { $str == "config" } {
- dumpputs $method $dest " config \{"
- foreach element [lindex $line 1] {
- dumpputs $method $dest " $element"
- }
- dumpputs $method $dest " \}"
- } else {
- dumpputs $method $dest " $line"
- }
- }
- }
- dumpputs $method $dest " \}"
- } elseif { "[lindex $element 0]" == "ipsec-config" } {
- dumpputs $method $dest " ipsec-config \{"
- foreach line [lindex $element 1] {
- if { $line != {} } {
- dumpputs $method $dest " $line"
- }
- }
- dumpputs $method $dest " \}"
- } elseif { "[lindex $element 0]" == "custom-pre-config-commands" } {
- #Boeing custom pre config commands
- dumpputs $method $dest " custom-pre-config-commands \{"
- foreach line [lindex $element 1] {
- dumpputs $method $dest " $line"
- }
- dumpputs $method $dest " \}"
- } elseif { "[lindex $element 0]" == "custom-post-config-commands" } {
- #Boeing custom post config commands
- dumpputs $method $dest " custom-post-config-commands \{"
- foreach line [lindex $element 1] {
- dumpputs $method $dest " $line"
- }
- dumpputs $method $dest " \}"
- } elseif { "[lindex $element 0]" == "ine-config" } {
- # Boeing: INE config support
- dumpputs $method $dest " ine-config \{"
- foreach line [lindex $element 1] {
- dumpputs $method $dest " $line"
- }
- dumpputs $method $dest " \}"
- # end Boeing
- } else {
- dumpputs $method $dest " $element"
- }
- }
- dumpputs $method $dest "\}"
- dumpputs $method $dest ""
- }
-
- foreach obj "link annotation canvas plot" {
- upvar 0 ${obj}_list obj_list
- foreach elem $obj_list {
- global $elem
- upvar 0 $elem lelem
- dumpputs $method $dest "$obj $elem \{"
- foreach element $lelem {
- dumpputs $method $dest " $element"
- }
- dumpputs $method $dest "\}"
- dumpputs $method $dest ""
- }
- }
-
- global g_traffic_flows
- if { [info exists g_traffic_flows] && [llength $g_traffic_flows] > 0 } {
- dumpputs $method $dest "traffic \{"
- foreach flow $g_traffic_flows {
- dumpputs $method $dest " $flow"
- }
- dumpputs $method $dest "\}"
- dumpputs $method $dest ""
- }
-
- global g_hook_scripts
- if { [info exists g_hook_scripts] && [llength $g_hook_scripts] > 0 } {
- foreach hook $g_hook_scripts {
- set name [lindex $hook 0]
- set state [lindex $hook 1]
- set script [lindex $hook 2]
- dumpputs $method $dest "hook $state:$name \{"
- # remove the final newline here because dumpputs adds a
- # newline automatically
- if {[string index $script end] == "\n"} {
- set script [string replace $script end end]
- }
- dumpputs $method $dest $script
- dumpputs $method $dest "\}"
- dumpputs $method $dest ""
- }
- }
-
- dumpGlobalOptions $method $dest
-
- # session options
- dumpputs $method $dest "option session \{"
- foreach kv [getSessionOptionsList] { dumpputs $method $dest " $kv" }
- dumpputs $method $dest "\}"
- dumpputs $method $dest ""
-}
-
-proc dumpGlobalOptions { method dest } {
- global showIfNames showNodeLabels showLinkLabels
- global showIfIPaddrs showIfIPv6addrs
- global showBkgImage showGrid showAnnotations
- global showAPI
- global g_view_locked
- global g_traffic_start_opt
- global mac_addr_start
-
- dumpputs $method $dest "option global \{"
- if {$showIfNames == 0} {
- dumpputs $method $dest " interface_names no"
- } else {
- dumpputs $method $dest " interface_names yes" }
- if {$showIfIPaddrs == 0} {
- dumpputs $method $dest " ip_addresses no"
- } else {
- dumpputs $method $dest " ip_addresses yes" }
- if {$showIfIPv6addrs == 0} {
- dumpputs $method $dest " ipv6_addresses no"
- } else {
- dumpputs $method $dest " ipv6_addresses yes" }
- if {$showNodeLabels == 0} {
- dumpputs $method $dest " node_labels no"
- } else {
- dumpputs $method $dest " node_labels yes" }
- if {$showLinkLabels == 0} {
- dumpputs $method $dest " link_labels no"
- } else {
- dumpputs $method $dest " link_labels yes" }
- if {$showAPI == 0} {
- dumpputs $method $dest " show_api no"
- } else {
- dumpputs $method $dest " show_api yes" }
- if {$showBkgImage == 0} {
- dumpputs $method $dest " background_images no"
- } else {
- dumpputs $method $dest " background_images yes" }
- if {$showAnnotations == 0} {
- dumpputs $method $dest " annotations no"
- } else {
- dumpputs $method $dest " annotations yes" }
- if {$showGrid == 0} {
- dumpputs $method $dest " grid no"
- } else {
- dumpputs $method $dest " grid yes" }
- if {$g_view_locked == 1} {
- dumpputs $method $dest " locked yes" }
- if { [info exists g_traffic_start_opt] } {
- dumpputs $method $dest " traffic_start $g_traffic_start_opt"
- }
- if { [info exists mac_addr_start] && $mac_addr_start > 0 } {
- dumpputs $method $dest " mac_address_start $mac_addr_start"
- }
- dumpputs $method $dest "\}"
- dumpputs $method $dest ""
-}
-
-# get the global options into a list of key=value pairs
-proc getGlobalOptionList {} {
- global tmp
- set tmp ""
- dumpGlobalOptions string tmp ;# put "options global {items}" into tmp
- set items [lindex $tmp 2]
- return [listToKeyValues $items]
-}
-
-proc setGlobalOption { field value } {
- global showIfNames showNodeLabels showLinkLabels
- global showIfIPaddrs showIfIPv6addrs
- global showBkgImage showGrid showAnnotations
- global showAPI
- global mac_addr_start
- global g_traffic_start_opt
- global g_view_locked
-
- switch -exact -- $field {
- interface_names {
- if { $value == "no" } {
- set showIfNames 0
- } elseif { $value == "yes" } {
- set showIfNames 1
- }
- }
- ip_addresses {
- if { $value == "no" } {
- set showIfIPaddrs 0
- } elseif { $value == "yes" } {
- set showIfIPaddrs 1
- }
- }
- ipv6_addresses {
- if { $value == "no" } {
- set showIfIPv6addrs 0
- } elseif { $value == "yes" } {
- set showIfIPv6addrs 1
- }
- }
- node_labels {
- if { $value == "no" } {
- set showNodeLabels 0
- } elseif { $value == "yes" } {
- set showNodeLabels 1
- }
- }
- link_labels {
- if { $value == "no" } {
- set showLinkLabels 0
- } elseif { $value == "yes" } {
- set showLinkLabels 1
- }
- }
- show_api {
- if { $value == "no" } {
- set showAPI 0
- } elseif { $value == "yes" } {
- set showAPI 1
- }
- }
- background_images {
- if { $value == "no" } {
- set showBkgImage 0
- } elseif { $value == "yes" } {
- set showBkgImage 1
- }
- }
- annotations {
- if { $value == "no" } {
- set showAnnotations 0
- } elseif { $value == "yes" } {
- set showAnnotations 1
- }
- }
- grid {
- if { $value == "no" } {
- set showGrid 0
- } elseif { $value == "yes" } {
- set showGrid 1
- }
- }
- locked {
- if { $value == "yes" } {
- set g_view_locked 1
- } else {
- set g_view_locked 0
- }
- }
- mac_address_start {
- set mac_addr_start $value
- }
- traffic_start {
- set g_traffic_start_opt $value
- }
- }
-}
-
-# reset global vars when opening a new file
-proc cleanupGUIState {} {
- global node_list link_list plot_list canvas_list annotation_list
- global mac_addr_start g_comments
- global g_traffic_flows g_traffic_start_opt g_hook_scripts
- global g_view_locked
-
- set node_list {}
- set link_list {}
- set annotation_list {}
- set plot_list {}
- set canvas_list {}
- set g_traffic_flows ""
- set g_traffic_start_opt 0
- set g_hook_scripts ""
- set g_comments ""
- set g_view_locked 0
- resetSessionOptions
-}
-
-#****f* nodecfg.tcl/loadCfg
-# NAME
-# loadCfg -- loads the current configuration.
-# SYNOPSIS
-# loadCfg $cfg
-# FUNCTION
-# Loads the configuration written in the cfg string to a current
-# configuration.
-# INPUTS
-# * cfg -- string containing the new working configuration.
-#****
-
-proc loadCfg { cfg } {
- global node_list plot_list link_list canvas_list annotation_list
- global g_traffic_flows g_traffic_start_opt g_hook_scripts
- global g_view_locked
- global g_comments
-
- # maximum coordinates
- set maxX 0
- set maxY 0
- set do_upgrade [upgradeOldConfig cfg]
- if { $do_upgrade == "no"} { return }
-
- # Cleanup first
- cleanupGUIState
- set class ""
- set object ""
- foreach entry $cfg {
- if {"$class" == ""} {
- set class $entry
- continue
- } elseif {"$object" == ""} {
- set object $entry
- if {"$class" == "node"} {
- lappend node_list $object
- } elseif {"$class" == "link"} {
- lappend link_list $object
- } elseif {"$class" == "canvas"} {
- lappend canvas_list $object
- } elseif {"$class" == "plot"} {
- lappend plot_list $object
- } elseif {"$class" == "option"} {
- # do nothing
- } elseif {"$class" == "traffic"} { ;# save traffic flows
- set g_traffic_flows [split [string trim $object] "\n"]
- set class ""; set object ""; continue
- } elseif {"$class" == "script"} {
- # global_script (old config) becomes a runtime hook
- set name "runtime_hook.sh"
- set script [string trim $object]
- lappend g_hook_scripts [list $name 4 $script] ;# 4=RUNTIME_STATE
- set class ""; set object ""; continue
- } elseif {"$class" == "hook"} {
- continue
- } elseif {"$class" == "comments"} {
- set g_comments [string trim $object]
- set class ""; set object ""; continue
- } elseif {"$class" == "annotation"} {
- lappend annotation_list $object
- } else {
- puts "configuration parsing error: unknown object class $class"
- #exit 1
- }
- # create an empty global variable named object for most objects
- global $object
- set $object {}
- continue
- } else {
- set line [concat $entry]
- # uses 'key=value' instead of 'key value'
- if { $object == "session" } {
- # 'key=value', values with space needs quoting 'key={space val}'
- setSessionOptions "" [split $line "\n"]
- set class ""
- set object ""
- continue
- }
- # extracts "field { value }" elements from line
- if { [catch { set tmp [llength $line] } e] } {
- puts "*** Error with line ('$e'):\n$line"
- puts "*** Line will be skipped. This is a Tcl limitation, "
- puts "*** consider using XML or fixing with whitespace."
- continue
- }
- while {[llength $line] >= 2} {
- set field [lindex $line 0]
- if {"$field" == ""} {
- set line [lreplace $line 0 0]
- continue
- }
-
- # consume first two list elements from line
- set value [lindex $line 1]
- set line [lreplace $line 0 1]
-
- if {"$class" == "node"} {
- switch -exact -- $field {
- type {
- lappend $object "type $value"
- }
- mirror {
- lappend $object "mirror $value"
- }
- model {
- lappend $object "model $value"
- }
- cpu {
- lappend $object "cpu {$value}"
- }
- interface-peer {
- lappend $object "interface-peer {$value}"
- }
- network-config {
- set cfg ""
- foreach zline [split $value {
-}] {
- if { [string index "$zline" 0] == " " } {
- set zline [string replace "$zline" 0 0]
- }
- lappend cfg $zline
- }
- set cfg [lrange $cfg 1 [expr {[llength $cfg] - 2}]]
- lappend $object "network-config {$cfg}"
- }
- custom-enabled {
- lappend $object "custom-enabled $value"
- }
- custom-command {
- lappend $object "custom-command {$value}"
- }
- custom-config {
- set cfg ""
- set have_config 0
- set ccfg {}
- foreach zline [split $value "\n"] {
- if { [string index "$zline" 0] == \
- " " } {
- # remove leading tab character
- set zline [string replace "$zline" 0 0]
- }
-
- # flag for config lines
- if { $zline == "config \{" } {
- set have_config 1
- # collect custom config lines into list
- } elseif { $have_config == 1 } {
- lappend ccfg $zline
- # add non-config lines
- } else {
- lappend cfg $zline
- }
- }
- # chop off last brace in config { } block and add it
- if { $have_config } {
- set ccfg [lrange $ccfg 0 \
- [expr {[llength $ccfg] - 3}]]
- lappend cfg [list config $ccfg]
- }
- #set cfg [lrange $cfg 1 [expr {[llength $cfg] - 2}]]
- lappend $object "custom-config {$cfg}"
- }
- ipsec-enabled {
- lappend $object "ipsec-enabled $value"
- }
- ipsec-config {
- set cfg ""
-
- foreach zline [split $value {
-}] {
- if { [string index "$zline" 0] == " " } {
- set zline [string replace "$zline" 0 0]
- }
- lappend cfg $zline
- }
- set cfg [lrange $cfg 1 [expr {[llength $cfg] - 2}]]
- lappend $object "ipsec-config {$cfg}"
- }
- iconcoords {
- checkMaxCoords $value maxX maxY
- lappend $object "iconcoords {$value}"
- }
- labelcoords {
- checkMaxCoords $value maxX maxY
- lappend $object "labelcoords {$value}"
- }
- canvas {
- lappend $object "canvas $value"
- }
- hidden {
- lappend $object "hidden $value"
- }
- /* {
- set comment "$field $value"
- foreach c $line {
- lappend comment $c
- # consume one element from line
- set line [lreplace $line 0 0]
- if { $c == "*/" } { break }
- }
- lappend $object "$comment"
- }
-
- custom-pre-config-commands {
- # Boeing - custom pre config commands
- set cfg ""
- foreach zline [split $value {
-}] {
- if { [string index "$zline" 0] == " " } {
- set zline [string replace "$zline" 0 0]
- }
- lappend cfg $zline
- }
- set cfg [lrange $cfg 1 [expr [llength $cfg] - 2]]
- lappend $object "custom-pre-config-commands {$cfg}"
- }
- custom-post-config-commands {
- # Boeing - custom post config commands
- set cfg ""
- foreach zline [split $value {
-}] {
- if { [string index "$zline" 0] == " " } {
- set zline [string replace "$zline" 0 0]
- }
- lappend cfg $zline
- }
- set cfg [lrange $cfg 1 [expr [llength $cfg] - 2]]
- lappend $object "custom-post-config-commands {$cfg}"
- }
- custom-image {
- # Boeing - custom-image
- lappend $object "custom-image $value"
- }
- ine-config {
- # Boeing - INE
- set cfg ""
- foreach zline [split $value {
-}] {
- if { [string index "$zline" 0] == " " } {
- set zline [string replace "$zline" 0 0]
- }
- lappend cfg $zline
- }
- set cfg [lrange $cfg 1 [expr [llength $cfg] - 2]]
- lappend $object "ine-config {$cfg}"
- }
- tunnel-peer {
- # Boeing - Span tunnels
- lappend $object "tunnel-peer {$value}"
- }
- range {
- # Boeing - WLAN range
- lappend $object "range $value"
- }
- bandwidth {
- # Boeing - WLAN bandwidth
- lappend $object "bandwidth $value"
- }
- cli-enabled {
- puts "Warning: cli-enabled setting is deprecated"
- }
- delay {
- # Boeing - WLAN delay
- lappend $object "delay $value"
- }
- ber {
- # Boeing - WLAN BER
- lappend $object "ber $value"
- }
- location {
- # Boeing - node location
- lappend $object "location $value"
- }
- os {
- # Boeing - node OS
- # just ignore it, set at runtime
- }
- services {
- lappend $object "services {$value}"
- }
-
- default {
- # Boeing - added warning
- puts -nonewline "config file warning: unknown confi"
- puts "guration item '$field' ignored for $object"
- }
- }
- } elseif {"$class" == "plot"} {
- switch -exact -- $field {
- name {
- lappend $object "name $value"
- }
- height {
- lappend $object "height $value"
- }
- width {
- lappend $object "width $value"
- }
- x {
- lappend $object "x $value"
- }
- y {
- lappend $object "y $value"
- }
- color {
- lappend $object "color $value"
- }
- }
- } elseif {"$class" == "link"} {
- switch -exact -- $field {
- nodes {
- lappend $object "nodes {$value}"
- }
- mirror {
- lappend $object "mirror $value"
- }
- bandwidth -
- delay -
- ber -
- duplicate -
- jitter {
- if { [llength $value] > 1 } { ;# down/up-stream
- lappend $object "$field {$value}"
- } else {
- lappend $object "$field $value"
- }
- }
- color {
- lappend $object "color $value"
- }
- width {
- lappend $object "width $value"
- }
- default {
- # this enables opaque data to be stored along with
- # each link (any key is stored)
- lappend $object "$field $value"
- # Boeing - added warning
- #puts -nonewline "config file warning: unknown conf"
- #puts "iguration item '$field' ignored for $object"
- }
- }
- } elseif {"$class" == "canvas"} {
- switch -exact -- $field {
- name {
- lappend $object "name {$value}"
- }
- size {
- lappend $object "size {$value}"
- }
- bkgImage {
- lappend $object "wallpaper {$value}"
- }
- wallpaper {
- lappend $object "wallpaper {$value}"
- }
- wallpaper-style {
- lappend $object "wallpaper-style {$value}"
- }
- scale {
- lappend $object "scale {$value}"
- }
- refpt {
- lappend $object "refpt {$value}"
- }
- }
- } elseif {"$class" == "option"} {
- setGlobalOption $field $value
- } elseif {"$class" == "annotation"} {
- switch -exact -- $field {
- type {
- lappend $object "type $value"
- }
- iconcoords {
- lappend $object "iconcoords {$value}"
- }
- color {
- lappend $object "color $value"
- }
- border {
- lappend $object "border $value"
- }
- label {
- lappend $object "label {$value}"
- }
- labelcolor {
- lappend $object "labelcolor $value"
- }
- size {
- lappend $object "size $value"
- }
- canvas {
- lappend $object "canvas $value"
- }
- font {
- lappend $object "font {$value}"
- }
- fontfamily {
- lappend $object "fontfamily {$value}"
- }
- fontsize {
- lappend $object "fontsize {$value}"
- }
- effects {
- lappend $object "effects {$value}"
- }
- width {
- lappend $object "width $value"
- }
- rad {
- lappend $object "rad $value"
- }
- } ;# end switch
- } elseif {"$class" == "hook"} {
- set state_name [split $object :]
- if { [llength $state_name] != 2 } {
- puts "invalid hook in config file"
- continue
- }
- set state [lindex $state_name 0]
- set name [lindex $state_name 1]
- set lines [split $entry "\n"]
- set lines [lreplace $lines 0 0] ;# chop extra newline
- set lines [join $lines "\n"]
- set hook [list $name $state $lines]
- lappend g_hook_scripts $hook
- set line "" ;# exit this while loop
- } ;#endif class
- }
- }
- set class ""
- set object ""
- }
-
- #
- # Hack for comaptibility with old format files (no canvases)
- #
- if { $canvas_list == "" } {
- set curcanvas [newCanvas ""]
- foreach node $node_list {
- setNodeCanvas $node $curcanvas
- }
- }
-
-
- # auto resize canvas
- set curcanvas [lindex $canvas_list 0]
- set newX 0
- set newY 0
- if { $maxX > [lindex [getCanvasSize $curcanvas] 0] } {
- set newX [expr {$maxX + 50}]
- }
- if { $maxY > [lindex [getCanvasSize $curcanvas] 1] } {
- set newY [expr {$maxY + 50}]
- }
- if { $newX > 0 || $newY > 0 } {
- if { $newX == 0 } { set newX [lindex [getCanvasSize $curcanvas] 0] }
- if { $newY == 0 } { set newY [lindex [getCanvasSize $curcanvas] 1] }
- setCanvasSize $curcanvas $newX $newY
- }
-
- # extra upgrade steps
- if { $do_upgrade == "yes" } {
- upgradeNetworkConfigToServices
- }
- upgradeConfigRemoveNode0
- upgradeConfigServices
- upgradeWlanConfigs
-}
-
-#****f* nodecfg.tcl/newObjectId
-# NAME
-# newObjectId -- new object Id
-# SYNOPSIS
-# set obj_id [newObjectId $type]
-# FUNCTION
-# Returns the Id for a new object of the defined type. Supported types
-# are node, link and canvas. The Id is in the form $mark$number. $mark is the
-# first letter of the given type and $number is the first available number to
-# that can be used for id.
-# INPUTS
-# * type -- the type of the new object. Can be node, link or canvas.
-# RESULT
-# * obj_id -- object Id in the form $mark$number. $mark is the
-# first letter of the given type and $number is the first available number to
-# that can be used for id.
-#****
-
-proc newObjectId { type } {
- global node_list link_list annotation_list canvas_list
-
- set mark [string range [set type] 0 0]
- set id 1 ;# start numbering at 1, not 0
- while {[lsearch [set [set type]_list] "$mark$id"] != -1} {
- incr id
- }
- return $mark$id
-}
-
-
-
-# Boeing: pick a new link id for temporary newlinks
-proc newlinkId { } {
- global link_list
- set id [newObjectId link]
- set mark "l"
- set id 0
-
- # alllinks contains a list of all existing and new links
- set alllinks $link_list
- foreach newlink [.c find withtag "newlink"] {
- set newlinkname [lindex [.c gettags $newlink] 1]
- lappend alllinks $newlinkname
- }
-
- while {[lsearch $alllinks "$mark$id"] != -1 } {
- incr id
- }
- return $mark$id
-}
-
-# Boeing: helper fn to determine canvas size during load
-proc checkMaxCoords { str maxXp maxYp } {
- upvar 1 $maxXp maxX
- upvar 1 $maxYp maxY
- set x [lindex $str 0]
- set y [lindex $str 1]
- if { $x > $maxX } {
- set maxX $x
- }
- if { $y > $maxY } {
- set maxY $y
- }
- if { [llength $str] == 4 } {
- set x [lindex $str 2]
- set y [lindex $str 3]
- if { $x > $maxX } {
- set maxX $x
- }
- if { $y > $maxY } {
- set maxY $y
- }
- }
-}
-
-# Boeing: pick a router for OSPF
-proc newRouterId { type node } {
- set mark [string range [set type] 0 0]
- for { set id 0 } { $node != "$mark$id" } { incr id } {
- }
- return "0.0.0.${id}"
-}
-# end Boeing
-
-# Boeing: load servers.conf file into exec_servers array
-proc loadServersConf { } {
- global CONFDIR exec_servers DEFAULT_API_PORT
- set confname "$CONFDIR/servers.conf"
- if { [catch { set f [open "$confname" r] } ] } {
- puts "Creating a default $confname"
- if { [catch { set f [open "$confname" w+] } ] } {
- puts "***Warning: could not create a default $confname file."
- return
- }
- puts $f "core1 192.168.0.2 $DEFAULT_API_PORT"
- puts $f "core2 192.168.0.3 $DEFAULT_API_PORT"
- close $f
- if { [catch { set f [open "$confname" r] } ] } {
- return
- }
- }
-
- array unset exec_servers
-
- while { [ gets $f line ] >= 0 } {
- if { [string range $line 0 0] == "#" } { continue } ;# skip comments
- set l [split $line] ;# parse fields separated by whitespace
- set name [lindex $l 0]
- set ip [lindex $l 1]
- set port [lindex $l 2]
- set sock -1
- if { $name == "" } { continue } ;# blank name
- # load array of servers
- array set exec_servers [list $name [list $ip $port $sock]]
- }
- close $f
-}
-# end Boeing
-
-# Boeing: write servers.conf file from exec_servers array
-proc writeServersConf { } {
- global CONFDIR exec_servers
- set confname "$CONFDIR/servers.conf"
- if { [catch { set f [open "$confname" w] } ] } {
- puts "***Warning: could not write servers file: $confname"
- return
- }
-
- set header "# servers.conf: list of CORE emulation servers for running"
- set header "$header remotely."
- puts $f $header
- foreach server [lsort -dictionary [array names exec_servers]] {
- set ip [lindex $exec_servers($server) 0]
- set port [lindex $exec_servers($server) 1]
- puts $f "$server $ip $port"
- }
- close $f
-}
-# end Boeing
-
-# display the preferences dialog
-proc popupPrefs {} {
- global EDITORS TERMS
-
- set wi .core_prefs
- catch { destroy $wi }
- toplevel $wi
-
- wm transient $wi .
- wm resizable $wi 0 0
- wm title $wi "Preferences"
-
- global g_prefs g_prefs_old
- array set g_prefs_old [array get g_prefs]
-
- #
- # Paths
- #
- labelframe $wi.dirs -borderwidth 4 -text "Paths" -relief raised
- frame $wi.dirs.conf
- label $wi.dirs.conf.label -text "Default configuration file path:"
- entry $wi.dirs.conf.entry -bg white -width 40 \
- -textvariable g_prefs(default_conf_path)
- pack $wi.dirs.conf.label $wi.dirs.conf.entry -side left
- pack $wi.dirs.conf -side top -anchor w -padx 4 -pady 4
-
- frame $wi.dirs.mru
- label $wi.dirs.mru.label -text "Number of recent files to remember:"
- entry $wi.dirs.mru.num -bg white -width 3 \
- -textvariable g_prefs(num_recent)
- button $wi.dirs.mru.clear -text "Clear recent files" \
- -command "addFileToMrulist \"\""
- pack $wi.dirs.mru.label $wi.dirs.mru.num $wi.dirs.mru.clear -side left
- pack $wi.dirs.mru -side top -anchor w -padx 4 -pady 4
-
- pack $wi.dirs -side top -fill x
-
- #
- # Window
- #
- labelframe $wi.win -borderwidth 4 -text "GUI Window" -relief raised
- frame $wi.win.win
- checkbutton $wi.win.win.savepos -text "remember window position" \
- -variable g_prefs(gui_save_pos)
- checkbutton $wi.win.win.savesiz -text "remember window size" \
- -variable g_prefs(gui_save_size)
- pack $wi.win.win.savepos $wi.win.win.savesiz -side left -anchor w -padx 4
- pack $wi.win.win -side top -anchor w -padx 4 -pady 4
-
- frame $wi.win.a
- checkbutton $wi.win.a.snaptogrid -text "snap to grid" \
- -variable g_prefs(gui_snap_grid)
- checkbutton $wi.win.a.showtooltips -text "show tooltips" \
- -variable g_prefs(gui_show_tooltips)
- pack $wi.win.a.snaptogrid $wi.win.a.showtooltips \
- -side left -anchor w -padx 4
- pack $wi.win.a -side top -anchor w -padx 4 -pady 4
-
- frame $wi.win.canv
- label $wi.win.canv.label -text "Default canvas size:"
- entry $wi.win.canv.x -bg white -width 5 -textvariable g_prefs(gui_canvas_x)
- entry $wi.win.canv.y -bg white -width 5 -textvariable g_prefs(gui_canvas_y)
- label $wi.win.canv.label2 -text "Default # of canvases:"
- entry $wi.win.canv.num -bg white -width 5 \
- -textvariable g_prefs(gui_num_canvases)
- pack $wi.win.canv.label $wi.win.canv.x $wi.win.canv.y \
- $wi.win.canv.label2 $wi.win.canv.num \
- -side left -anchor w -padx 4
- pack $wi.win.canv -side top -anchor w -padx 4 -pady 4
- pack $wi.win -side top -fill x
-
- #
- # Programs
- #
- labelframe $wi.pr -borderwidth 4 -text "Programs" -relief raised
-
- frame $wi.pr.editor
- label $wi.pr.editor.label -text "Text editor:"
- set editors [linsert $EDITORS 0 "EDITOR"]
- ttk::combobox $wi.pr.editor.combo -width 10 -exportselection 0 \
- -values $editors -textvariable g_prefs(gui_text_editor)
- label $wi.pr.editor.label2 -text "Terminal program:"
- set terms [linsert $TERMS 0 "TERM"]
- ttk::combobox $wi.pr.editor.combo2 -width 20 -exportselection 0 \
- -values $terms -textvariable g_prefs(gui_term_prog)
- pack $wi.pr.editor.label $wi.pr.editor.combo -padx 4 -pady 4 -side left
- pack $wi.pr.editor.label2 $wi.pr.editor.combo2 -padx 4 -pady 4 -side left
- pack $wi.pr.editor -side top -anchor w -padx 4 -pady 4
-
- frame $wi.pr.3d
- label $wi.pr.3d.label -text "3D GUI command:"
- entry $wi.pr.3d.entry -bg white -width 40 -textvariable g_prefs(gui_3d_path)
- pack $wi.pr.3d.label $wi.pr.3d.entry -side left -padx 4 -pady 4
- pack $wi.pr.3d -side top -anchor w -padx 4 -pady 4
-
- pack $wi.pr -side top -fill x
-
- #
- # Buttons at the bottom
- #
- frame $wi.bot -borderwidth 0
- button $wi.bot.apply -text "Save" -command "savePrefsFile; destroy $wi"
- button $wi.bot.defaults -text "Load defaults" -command initDefaultPrefs
- button $wi.bot.cancel -text "Cancel" -command {
- global g_prefs g_prefs_old
- array set g_prefs [array get g_prefs_old]
- destroy .core_prefs
- }
- pack $wi.bot.cancel $wi.bot.defaults $wi.bot.apply -side right
- pack $wi.bot -side bottom -fill x
- after 100 {
- catch { grab .core_prefs }
- }
-}
-
-# initialize preferences array with default values
-proc initDefaultPrefs {} {
- global g_prefs CONFDIR SBINDIR DEFAULT_REFPT tcl_platform
-
- # variable expansions must be done here
- array set g_prefs [list default_conf_path "$CONFDIR/configs"]
- array set g_prefs [list gui_canvas_refpt "$DEFAULT_REFPT"]
- set shell "bash"
- array set g_prefs [list shell $shell]
- array set g_prefs [list gui_text_editor [get_text_editor true]]
- array set g_prefs [list gui_term_prog [get_term_prog true]]
- setDefaultAddrs ipv4
- setDefaultAddrs ipv6
- # preferences will be reordered alphabetically
- array set g_prefs {
- num_recent 4
- log_path "/tmp/core_logs"
- gui_save_pos 0
- gui_save_size 0
- gui_snap_grid 0
- gui_show_tooltips 1
- gui_canvas_x 1000
- gui_canvas_y 750
- gui_canvas_scale 150.0
- gui_num_canvases 1
- gui_3d_path "/usr/local/bin/sdt3d.sh"
- }
- # add new preferences above; keep this at the end of the file
-}
-
-
diff --git a/gui/configs/sample1.imn b/gui/configs/sample1.imn
deleted file mode 100644
index 912f1e71..00000000
--- a/gui/configs/sample1.imn
+++ /dev/null
@@ -1,510 +0,0 @@
-node n1 {
- type router
- model router
- network-config {
- hostname n1
- !
- interface eth1
- ip address 10.0.5.1/24
- ipv6 address a:5::1/64
- !
- interface eth0
- ip address 10.0.3.2/24
- ipv6 address a:3::2/64
- !
- }
- canvas c1
- iconcoords {384.0 456.0}
- labelcoords {384.0 484.0}
- interface-peer {eth0 n2}
- interface-peer {eth1 n15}
-}
-
-node n2 {
- type router
- model router
- network-config {
- hostname n2
- !
- interface eth2
- ip address 10.0.4.1/24
- ipv6 address a:4::1/64
- !
- interface eth1
- ip address 10.0.3.1/24
- ipv6 address a:3::1/64
- !
- interface eth0
- ip address 10.0.2.2/24
- ipv6 address a:2::2/64
- !
- }
- canvas c1
- iconcoords {264.0 432.0}
- labelcoords {264.0 460.0}
- interface-peer {eth0 n3}
- interface-peer {eth1 n1}
- interface-peer {eth2 n15}
-}
-
-node n3 {
- type router
- model router
- network-config {
- hostname n3
- !
- interface eth1
- ip address 10.0.2.1/24
- ipv6 address a:2::1/64
- !
- interface eth0
- ip address 10.0.1.1/24
- ipv6 address a:1::1/64
- !
- }
- canvas c1
- iconcoords {120.0 360.0}
- labelcoords {120.0 388.0}
- interface-peer {eth0 n4}
- interface-peer {eth1 n2}
-}
-
-node n4 {
- type lanswitch
- network-config {
- hostname n4
- !
- }
- canvas c1
- iconcoords {192.0 252.0}
- labelcoords {192.0 280.0}
- interface-peer {e0 n3}
- interface-peer {e1 n11}
- interface-peer {e2 n12}
- interface-peer {e3 n13}
- interface-peer {e4 n14}
-}
-
-node n5 {
- type router
- model mdr
- network-config {
- hostname n5
- !
- interface eth0
- ipv6 address a:0::3/128
- ip address 10.0.0.5/32
- !
- interface eth1
- ip address 10.0.6.2/24
- ipv6 address a:6::2/64
- !
- }
- canvas c1
- iconcoords {540.0 348.0}
- labelcoords {540.0 376.0}
- interface-peer {eth0 n10}
- interface-peer {eth1 n15}
- services {zebra OSPFv2 OSPFv3MDR IPForward}
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- files=('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh', )
- }
- }
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth0
- ip address 10.0.0.5/32
- ipv6 address a::3/128
- ipv6 ospf6 instance-id 65
- ipv6 ospf6 hello-interval 2
- ipv6 ospf6 dead-interval 6
- ipv6 ospf6 retransmit-interval 5
- ipv6 ospf6 network manet-designated-router
- ipv6 ospf6 diffhellos
- ipv6 ospf6 adjacencyconnectivity uniconnected
- ipv6 ospf6 lsafullness mincostlsa
- !
- interface eth1
- ip address 10.0.6.2/24
- !ip ospf hello-interval 2
- !ip ospf dead-interval 6
- !ip ospf retransmit-interval 5
- !ip ospf network point-to-point
- ipv6 address a:6::2/64
- !
- router ospf
- router-id 10.0.0.5
- network 10.0.0.5/32 area 0
- network 10.0.6.0/24 area 0
- redistribute connected metric-type 1
- redistribute ospf6 metric-type 1
- !
- router ospf6
- router-id 10.0.0.5
- interface eth0 area 0.0.0.0
- redistribute connected
- redistribute ospf
- !
-
-
- }
- }
-}
-
-node n6 {
- type router
- model mdr
- network-config {
- hostname n6
- !
- interface eth0
- ip address 10.0.0.6/32
- ipv6 address a:0::6/128
- !
- }
- canvas c1
- iconcoords {780.0 228.0}
- labelcoords {780.0 252.0}
- interface-peer {eth0 n10}
-}
-
-node n7 {
- type router
- model mdr
- network-config {
- hostname n7
- !
- interface eth0
- ip address 10.0.0.7/32
- ipv6 address a:0::7/128
- !
- }
- canvas c1
- iconcoords {816.0 348.0}
- labelcoords {816.0 372.0}
- interface-peer {eth0 n10}
-}
-
-node n8 {
- type router
- model mdr
- network-config {
- hostname n8
- !
- interface eth0
- ip address 10.0.0.8/32
- ipv6 address a:0::8/128
- !
- }
- canvas c1
- iconcoords {672.0 420.0}
- labelcoords {672.0 444.0}
- interface-peer {eth0 n10}
-}
-
-node n9 {
- type router
- model mdr
- network-config {
- hostname n9
- !
- interface eth0
- ip address 10.0.0.9/32
- ipv6 address a:0::9/128
- !
- }
- canvas c1
- iconcoords {672.0 96.0}
- labelcoords {672.0 120.0}
- interface-peer {eth0 n10}
-}
-
-node n10 {
- type wlan
- network-config {
- hostname wlan10
- !
- interface wireless
- ip address 10.0.0.0/32
- ipv6 address a:0::0/128
- !
- mobmodel
- coreapi
- basic_range
- ns2script
- !
- }
- canvas c1
- iconcoords {852.0 564.0}
- labelcoords {852.0 596.0}
- interface-peer {e0 n8}
- interface-peer {e1 n7}
- interface-peer {e2 n5}
- interface-peer {e3 n6}
- interface-peer {e4 n9}
- custom-config {
- custom-config-id basic_range
- custom-command {3 3 9 9 9}
- config {
- range=240
- bandwidth=54000000
- jitter=0
- delay=50000
- error=0
- }
- }
- custom-config {
- custom-config-id ns2script
- custom-command {10 3 11 10 10}
- config {
- file=sample1.scen
- refresh_ms=50
- loop=1
- autostart=5
- map=
- }
- }
-}
-
-node n11 {
- type router
- model PC
- network-config {
- hostname n11
- !
- interface eth0
- ip address 10.0.1.20/24
- ipv6 address a:1::20/64
- !
- }
- canvas c1
- iconcoords {192.0 156.0}
- labelcoords {192.0 188.0}
- interface-peer {eth0 n4}
-}
-
-node n12 {
- type router
- model PC
- network-config {
- hostname n12
- !
- interface eth0
- ip address 10.0.1.21/24
- ipv6 address a:1::21/64
- !
- }
- canvas c1
- iconcoords {264.0 156.0}
- labelcoords {264.0 188.0}
- interface-peer {eth0 n4}
-}
-
-node n13 {
- type router
- model PC
- network-config {
- hostname n13
- !
- interface eth0
- ip address 10.0.1.22/24
- ipv6 address a:1::22/64
- !
- }
- canvas c1
- iconcoords {336.0 156.0}
- labelcoords {336.0 188.0}
- interface-peer {eth0 n4}
-}
-
-node n14 {
- type router
- model host
- network-config {
- hostname n14
- !
- interface eth0
- ip address 10.0.1.10/24
- ipv6 address a:1::10/64
- !
- }
- canvas c1
- iconcoords {348.0 228.0}
- labelcoords {348.0 260.0}
- interface-peer {eth0 n4}
-}
-
-node n15 {
- type router
- model router
- network-config {
- hostname n15
- !
- interface eth2
- ip address 10.0.6.1/24
- ipv6 address a:6::1/64
- !
- interface eth1
- ip address 10.0.5.2/24
- ipv6 address a:5::2/64
- !
- interface eth0
- ip address 10.0.4.2/24
- ipv6 address a:4::2/64
- !
- }
- canvas c1
- iconcoords {384.0 312.0}
- labelcoords {384.0 340.0}
- interface-peer {eth0 n2}
- interface-peer {eth1 n1}
- interface-peer {eth2 n5}
-}
-
-link l1 {
- nodes {n10 n8}
- bandwidth 11000000
- delay 25000
-}
-
-link l0 {
- nodes {n10 n7}
- bandwidth 11000000
- delay 25000
-}
-
-link l2 {
- nodes {n10 n5}
- bandwidth 11000000
- delay 25000
-}
-
-link l3 {
- nodes {n10 n6}
- bandwidth 11000000
- delay 25000
-}
-
-link l4 {
- nodes {n10 n9}
- bandwidth 11000000
- delay 25000
-}
-
-link l5 {
- nodes {n3 n4}
- bandwidth 100000000
-}
-
-link l6 {
- delay 25000
- nodes {n3 n2}
- bandwidth 100000000
-}
-
-link l7 {
- nodes {n2 n1}
- bandwidth 100000000
-}
-
-link l8 {
- delay 50000
- nodes {n2 n15}
- bandwidth 100000000
-}
-
-link l9 {
- nodes {n1 n15}
- bandwidth 100000000
-}
-
-link l10 {
- nodes {n15 n5}
- bandwidth 100000000
-}
-
-link l11 {
- nodes {n4 n11}
- bandwidth 100000000
-}
-
-link l12 {
- nodes {n4 n12}
- bandwidth 100000000
-}
-
-link l13 {
- nodes {n4 n13}
- bandwidth 100000000
-}
-
-link l14 {
- nodes {n4 n14}
- bandwidth 100000000
-}
-
-annotation a0 {
- iconcoords {612.0 492.0}
- type text
- label {wireless network}
- labelcolor black
- fontfamily {Arial}
- fontsize {12}
- effects {bold}
- canvas c1
-}
-
-annotation a1 {
- iconcoords {142.0 112.0 393.0 291.0}
- type rectangle
- label {}
- labelcolor black
- fontfamily {Arial}
- fontsize {12}
- color #ebebde
- width 1
- border #ffffff
- rad 25
- canvas c1
-}
-
-annotation a2 {
- iconcoords {492.0 384.0}
- type text
- label {gateway}
- labelcolor black
- fontfamily {Arial}
- fontsize {12}
- effects {bold}
- canvas c1
-}
-
-canvas c1 {
- name {Canvas1}
- wallpaper-style {upperleft}
- wallpaper {sample1-bg.gif}
-}
-
-option global {
- interface_names no
- ip_addresses yes
- ipv6_addresses no
- node_labels yes
- link_labels yes
- ipsec_configs yes
- exec_errors no
- show_api no
- background_images no
- annotations yes
- grid no
- traffic_start 0
-}
-
-option session {
-}
-
diff --git a/gui/configs/sample10-kitchen-sink.imn b/gui/configs/sample10-kitchen-sink.imn
deleted file mode 100644
index dacee547..00000000
--- a/gui/configs/sample10-kitchen-sink.imn
+++ /dev/null
@@ -1,848 +0,0 @@
-comments {
-Kitchen Sink
-============
-
-Contains every type of node available in CORE, except for physical (prouter)
-machine types, and nodes distributed on other emulation servers.
-
-To get the RJ45 node to work, a test0 interface should first be created like this:
- sudo ip link add name test0 type veth peer name test0.1
-
-wlan15 uses the basic range model, while wlan24 uses EMANE 802.11
-
-gateway nodes n11 and n20 are customized to redistribute routing between OSPFv2 and
-OSPFv3 MDR (the MANET networks)
-}
-
-node n1 {
- type router
- model router
- network-config {
- hostname n1
- !
- interface eth2
- ip address 10.0.11.2/24
- ipv6 address 2001:11::2/64
- !
- interface eth1
- ip address 10.0.3.1/24
- ipv6 address 2001:3::1/64
- !
- interface eth0
- ip address 10.0.2.1/24
- ipv6 address 2001:2::1/64
- !
- }
- canvas c1
- iconcoords {288.0 264.0}
- labelcoords {288.0 292.0}
- interface-peer {eth0 n3}
- interface-peer {eth1 n2}
- interface-peer {eth2 n20}
- custom-image $CORE_DATA_DIR/icons/normal/router_red.gif
-}
-
-node n2 {
- type router
- model router
- network-config {
- hostname n2
- !
- interface eth2
- ip address 10.0.5.2/24
- ipv6 address 2001:5::2/64
- !
- interface eth1
- ip address 10.0.3.2/24
- ipv6 address 2001:3::2/64
- !
- interface eth0
- ip address 10.0.0.1/24
- ipv6 address 2001:0::1/64
- !
- }
- canvas c1
- iconcoords {576.0 264.0}
- labelcoords {576.0 292.0}
- interface-peer {eth0 n5}
- interface-peer {eth1 n1}
- interface-peer {eth2 n19}
-}
-
-node n3 {
- type router
- model router
- network-config {
- hostname n3
- !
- interface eth3
- ip address 10.0.9.1/24
- ipv6 address 2001:9::1/64
- !
- interface eth2
- ip address 10.0.4.1/24
- ipv6 address 2001:4::1/64
- !
- interface eth1
- ip address 10.0.2.2/24
- ipv6 address 2001:2::2/64
- !
- interface eth0
- ip address 10.0.1.1/24
- ipv6 address 2001:1::1/64
- !
- }
- canvas c1
- iconcoords {288.0 408.0}
- labelcoords {288.0 436.0}
- interface-peer {eth0 n4}
- interface-peer {eth1 n1}
- interface-peer {eth2 n19}
- interface-peer {eth3 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_red.gif
-}
-
-node n4 {
- type hub
- network-config {
- hostname n4
- !
- }
- canvas c1
- iconcoords {216.0 528.0}
- labelcoords {216.0 552.0}
- interface-peer {e0 n3}
- interface-peer {e1 n16}
- interface-peer {e2 n17}
- interface-peer {e3 n18}
-}
-
-node n5 {
- type lanswitch
- network-config {
- hostname n5
- !
- }
- canvas c1
- iconcoords {672.0 264.0}
- labelcoords {672.0 288.0}
- interface-peer {e0 n2}
- interface-peer {e1 n6}
- interface-peer {e2 n7}
- interface-peer {e3 n8}
- interface-peer {e4 n25}
-}
-
-node n6 {
- type router
- model host
- network-config {
- hostname n6
- !
- interface eth0
- ip address 10.0.0.10/24
- ipv6 address 2001:0::10/64
- !
- }
- canvas c1
- iconcoords {792.0 216.0}
- labelcoords {792.0 248.0}
- interface-peer {eth0 n5}
-}
-
-node n7 {
- type router
- model host
- network-config {
- hostname n7
- !
- interface eth0
- ip address 10.0.0.11/24
- ipv6 address 2001:0::11/64
- !
- }
- canvas c1
- iconcoords {792.0 288.0}
- labelcoords {792.0 320.0}
- interface-peer {eth0 n5}
-}
-
-node n8 {
- type router
- model host
- network-config {
- hostname n8
- !
- interface eth0
- ip address 10.0.0.12/24
- ipv6 address 2001:0::12/64
- !
- }
- canvas c1
- iconcoords {792.0 360.0}
- labelcoords {792.0 392.0}
- interface-peer {eth0 n5}
-}
-
-node n9 {
- type rj45
- network-config {
- hostname test0
- !
- }
- canvas c1
- iconcoords {576.0 528.0}
- labelcoords {576.0 556.0}
- interface-peer {0 n19}
-}
-
-node n10 {
- type tunnel
- network-config {
- hostname 10.250.0.91
- !
- interface e0
- ip address 10.250.0.91/24
- !
- tunnel-type
- UDP
- !
- tunnel-tap
- off
- !
- tunnel-key
- 1
- !
- }
- canvas c1
- iconcoords {672.0 504.0}
- labelcoords {672.0 536.0}
- interface-peer {e0 n19}
-}
-
-node n11 {
- type router
- model mdr
- network-config {
- hostname n11
- !
- interface eth1
- ip address 10.0.9.2/24
- ipv6 address 2001:9::2/64
- !
- interface eth0
- ip address 10.0.8.1/32
- ipv6 address 2001:8::1/128
- !
- }
- canvas c1
- iconcoords {288.0 624.0}
- labelcoords {288.0 656.0}
- interface-peer {eth0 n15}
- interface-peer {eth1 n3}
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- files=('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh', '/usr/local/etc/quagga/vtysh.conf', )
- }
- }
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth0
- ip address 10.0.8.1/32
- ipv6 address 2001:8::1/128
- ipv6 ospf6 instance-id 65
- ipv6 ospf6 hello-interval 2
- ipv6 ospf6 dead-interval 6
- ipv6 ospf6 retransmit-interval 5
- ipv6 ospf6 network manet-designated-router
- ipv6 ospf6 diffhellos
- ipv6 ospf6 adjacencyconnectivity uniconnected
- ipv6 ospf6 lsafullness mincostlsa
- !
- interface eth1
- ip address 10.0.9.2/24
- ipv6 address 2001:9::2/64
- !
- router ospf
- router-id 10.0.8.1
- network 10.0.8.1/32 area 0
- network 10.0.9.0/24 area 0
- redistribute connected metric-type 1
- redistribute ospf6 metric-type 1
- !
- router ospf6
- router-id 10.0.8.1
- interface eth0 area 0.0.0.0
- redistribute connected
- redistribute ospf
- !
-
- }
- }
- services {zebra OSPFv2 OSPFv3MDR IPForward}
-}
-
-node n12 {
- type router
- model mdr
- network-config {
- hostname n12
- !
- interface eth0
- ip address 10.0.8.2/32
- ipv6 address 2001:8::2/128
- !
- }
- canvas c1
- iconcoords {504.0 792.0}
- labelcoords {504.0 824.0}
- interface-peer {eth0 n15}
-}
-
-node n13 {
- type router
- model mdr
- network-config {
- hostname n13
- !
- interface eth0
- ip address 10.0.8.3/32
- ipv6 address 2001:8::3/128
- !
- }
- canvas c1
- iconcoords {552.0 672.0}
- labelcoords {552.0 704.0}
- interface-peer {eth0 n15}
-}
-
-node n14 {
- type router
- model mdr
- network-config {
- hostname n14
- !
- interface eth0
- ip address 10.0.8.4/32
- ipv6 address 2001:8::4/128
- !
- }
- canvas c1
- iconcoords {720.0 792.0}
- labelcoords {720.0 824.0}
- interface-peer {eth0 n15}
-}
-
-node n15 {
- type wlan
- network-config {
- hostname wlan15
- !
- interface wireless
- ip address 10.0.8.0/32
- ipv6 address 2001:8::0/128
- !
- mobmodel
- coreapi
- basic_range
- !
- }
- custom-config {
- custom-config-id basic_range
- custom-command {3 3 9 9 9}
- config {
- range=275
- bandwidth=54000000
- jitter=0
- delay=20000
- error=0
- }
- }
- canvas c1
- iconcoords {120.0 768.0}
- labelcoords {120.0 800.0}
- interface-peer {e0 n11}
- interface-peer {e1 n12}
- interface-peer {e2 n13}
- interface-peer {e3 n14}
-}
-
-node n16 {
- type router
- model PC
- network-config {
- hostname n16
- !
- interface eth0
- ip address 10.0.1.20/24
- ipv6 address 2001:1::20/64
- !
- }
- canvas c1
- iconcoords {96.0 456.0}
- labelcoords {96.0 488.0}
- interface-peer {eth0 n4}
-}
-
-node n17 {
- type router
- model PC
- network-config {
- hostname n17
- !
- interface eth0
- ip address 10.0.1.21/24
- ipv6 address 2001:1::21/64
- !
- }
- canvas c1
- iconcoords {96.0 600.0}
- labelcoords {96.0 632.0}
- interface-peer {eth0 n4}
-}
-
-node n18 {
- type router
- model PC
- network-config {
- hostname n18
- !
- interface eth0
- ip address 10.0.1.22/24
- ipv6 address 2001:1::22/64
- !
- }
- canvas c1
- iconcoords {96.0 528.0}
- labelcoords {96.0 560.0}
- interface-peer {eth0 n4}
-}
-
-node n19 {
- type router
- model router
- network-config {
- hostname n19
- !
- interface eth3
- ip address 10.0.7.1/24
- ipv6 address 2001:7::1/64
- !
- interface eth2
- ip address 10.0.6.1/24
- ipv6 address 2001:6::1/64
- !
- interface eth1
- ip address 10.0.5.1/24
- ipv6 address 2001:5::1/64
- !
- interface eth0
- ip address 10.0.4.2/24
- ipv6 address 2001:4::2/64
- !
- }
- canvas c1
- iconcoords {576.0 408.0}
- labelcoords {576.0 436.0}
- interface-peer {eth0 n3}
- interface-peer {eth1 n2}
- interface-peer {eth2 n9}
- interface-peer {eth3 n10}
-}
-
-node n20 {
- type router
- model mdr
- network-config {
- hostname n20
- !
- interface eth1
- ip address 10.0.11.1/24
- ipv6 address 2001:11::1/64
- !
- interface eth0
- ip address 10.0.10.1/32
- ipv6 address 2001:10::1/128
- !
- }
- canvas c1
- iconcoords {288.0 168.0}
- labelcoords {288.0 200.0}
- interface-peer {eth0 n24}
- interface-peer {eth1 n1}
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- files=('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh', '/usr/local/etc/quagga/vtysh.conf', )
- }
- }
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth0
- ip address 10.0.10.1/32
- ipv6 address 2001:10::1/128
- ipv6 ospf6 instance-id 65
- ipv6 ospf6 hello-interval 2
- ipv6 ospf6 dead-interval 6
- ipv6 ospf6 retransmit-interval 5
- ipv6 ospf6 network manet-designated-router
- ipv6 ospf6 diffhellos
- ipv6 ospf6 adjacencyconnectivity uniconnected
- ipv6 ospf6 lsafullness mincostlsa
- !
- interface eth1
- ip address 10.0.11.1/24
- ipv6 address 2001:11::1/64
- !
- router ospf
- router-id 10.0.10.1
- network 10.0.10.1/32 area 0
- network 10.0.11.0/24 area 0
- redistribute connected metric-type 1
- redistribute ospf6 metric-type 1
- !
- router ospf6
- router-id 10.0.10.1
- interface eth0 area 0.0.0.0
- redistribute connected
- redistribute ospf
- !
-
- }
- }
- services {zebra OSPFv2 OSPFv3MDR IPForward}
-}
-
-node n21 {
- type router
- model mdr
- network-config {
- hostname n21
- !
- interface eth0
- ip address 10.0.10.2/32
- ipv6 address 2001:10::2/128
- !
- }
- canvas c1
- iconcoords {240.0 48.0}
- labelcoords {240.0 80.0}
- interface-peer {eth0 n24}
-}
-
-node n22 {
- type router
- model mdr
- network-config {
- hostname n22
- !
- interface eth0
- ip address 10.0.10.3/32
- ipv6 address 2001:10::3/128
- !
- }
- canvas c1
- iconcoords {504.0 48.0}
- labelcoords {504.0 80.0}
- interface-peer {eth0 n24}
-}
-
-node n23 {
- type router
- model mdr
- network-config {
- hostname n23
- !
- interface eth0
- ip address 10.0.10.4/32
- ipv6 address 2001:10::4/128
- !
- }
- canvas c1
- iconcoords {144.0 168.0}
- labelcoords {144.0 200.0}
- interface-peer {eth0 n24}
-}
-
-node n24 {
- type wlan
- network-config {
- hostname wlan24
- !
- interface wireless
- ip address 10.0.10.0/32
- ipv6 address 2001:10::0/128
- !
- mobmodel
- coreapi
- emane_ieee80211abg
- !
- }
- custom-config {
- custom-config-id basic_range
- custom-command {3 3 9 9 9}
- config {
- range=275
- bandwidth=54000000
- jitter=0
- delay=20000
- error=0
- }
- }
- canvas c1
- iconcoords {48.0 72.0}
- labelcoords {48.0 104.0}
- interface-peer {e0 n20}
- interface-peer {e1 n21}
- interface-peer {e2 n22}
- interface-peer {e3 n23}
-}
-
-node n25 {
- type lanswitch
- network-config {
- hostname n25
- !
- }
- canvas c1
- iconcoords {624.0 192.0}
- labelcoords {624.0 216.0}
- interface-peer {e0 n5}
- interface-peer {e1 n26}
-}
-
-node n26 {
- type router
- model PC
- network-config {
- hostname n26
- !
- interface eth0
- ip address 10.0.0.20/24
- ipv6 address 2001:0::20/64
- !
- }
- canvas c1
- iconcoords {720.0 144.0}
- labelcoords {720.0 176.0}
- interface-peer {eth0 n25}
-}
-
-link l1 {
- nodes {n2 n5}
- bandwidth 0
-}
-
-link l2 {
- delay 8000
- nodes {n3 n4}
- bandwidth 1024000
-}
-
-link l3 {
- nodes {n1 n3}
- bandwidth 0
-}
-
-link l4 {
- nodes {n1 n2}
- bandwidth 0
-}
-
-link l5 {
- nodes {n5 n6}
- bandwidth 0
-}
-
-link l6 {
- nodes {n5 n7}
- bandwidth 0
-}
-
-link l7 {
- nodes {n5 n8}
- bandwidth 0
-}
-
-link l8 {
- nodes {n3 n19}
- bandwidth 0
-}
-
-link l9 {
- nodes {n19 n2}
- bandwidth 0
-}
-
-link l10 {
- nodes {n4 n16}
- bandwidth 0
-}
-
-link l11 {
- nodes {n4 n17}
- bandwidth 0
-}
-
-link l12 {
- nodes {n4 n18}
- bandwidth 0
-}
-
-link l13 {
- nodes {n19 n9}
-}
-
-link l14 {
- nodes {n19 n10}
-}
-
-link l15 {
- nodes {n15 n11}
-}
-
-link l16 {
- nodes {n15 n12}
-}
-
-link l17 {
- nodes {n15 n13}
-}
-
-link l18 {
- nodes {n15 n14}
-}
-
-link l19 {
- nodes {n3 n11}
- bandwidth 0
-}
-
-link l20 {
- nodes {n24 n20}
-}
-
-link l21 {
- nodes {n24 n21}
-}
-
-link l22 {
- nodes {n24 n22}
-}
-
-link l23 {
- nodes {n24 n23}
-}
-
-link l24 {
- nodes {n20 n1}
- bandwidth 0
-}
-
-link l25 {
- delay 5000
- nodes {n25 n5}
- bandwidth 0
-}
-
-link l26 {
- nodes {n25 n26}
- bandwidth 0
-}
-
-annotation a1 {
- iconcoords {45.0 431.0 220.0 642.0}
- type rectangle
- label {}
- labelcolor black
- fontfamily {Arial}
- fontsize {12}
- color #e6f4f4
- width 0
- border black
- rad 0
- canvas c1
-}
-
-annotation a2 {
- iconcoords {642 189 821 404}
- type rectangle
- label {}
- labelcolor black
- fontfamily {Arial}
- fontsize {12}
- color #e6f4f4
- width 0
- border black
- rad 0
- canvas c1
-}
-
-annotation a3 {
- iconcoords {200 218 655 463}
- type rectangle
- label {}
- labelcolor black
- fontfamily {Arial}
- fontsize {12}
- color #f4f1f0
- width 0
- border black
- rad 0
- canvas c1
-}
-
-annotation a4 {
- iconcoords {600.0 48.0}
- type text
- label {Kitchen Sink Scenario}
- labelcolor black
- fontfamily {FreeSans}
- fontsize {16}
- effects {bold}
- canvas c1
-}
-
-annotation a5 {
- iconcoords {648.0 72.0}
- type text
- label {see scenario comments}
- labelcolor black
- fontfamily {FreeSans}
- fontsize {12}
- canvas c1
-}
-
-canvas c1 {
- name {Canvas1}
- refpt {0 0 47.5791667 -122.132322 150}
- scale {150.0}
- size {1000 1000}
-}
-
-option global {
- interface_names no
- ip_addresses yes
- ipv6_addresses yes
- node_labels yes
- link_labels yes
- ipsec_configs yes
- exec_errors yes
- show_api no
- background_images no
- annotations yes
- grid yes
- traffic_start 0
-}
-
-option session {
- enablesdt=1
-}
-
diff --git a/gui/configs/sample11-sdn.imn b/gui/configs/sample11-sdn.imn
deleted file mode 100644
index a41dbc11..00000000
--- a/gui/configs/sample11-sdn.imn
+++ /dev/null
@@ -1,291 +0,0 @@
-node n1 {
- type router
- model host
- network-config {
- hostname ryu1
- !
- interface eth1
- ip address 10.0.5.10/24
- ipv6 address 2001:5::10/64
- !
- interface eth0
- ip address 10.0.4.10/24
- ipv6 address 2001:4::10/64
- !
- }
- canvas c1
- iconcoords {203.0 65.0}
- labelcoords {203.0 97.0}
- interface-peer {eth0 n2}
- interface-peer {eth1 n3}
-}
-
-node n2 {
- type router
- model OVS
- network-config {
- hostname ovs1
- !
- interface eth2
- ip address 10.0.4.1/24
- ipv6 address 2001:4::1/64
- !
- interface eth1
- ip address 10.0.1.1/24
- ipv6 address 2001:1::1/64
- !
- interface eth0
- ip address 10.0.0.1/24
- ipv6 address 2001:0::1/64
- !
- }
- canvas c1
- iconcoords {124.0 213.0}
- labelcoords {124.0 245.0}
- interface-peer {eth0 n6}
- interface-peer {eth1 n4}
- interface-peer {eth2 n1}
-}
-
-node n3 {
- type router
- model OVS
- network-config {
- hostname ovs2
- !
- interface eth2
- ip address 10.0.5.1/24
- ipv6 address 2001:5::1/64
- !
- interface eth1
- ip address 10.0.3.1/24
- ipv6 address 2001:3::1/64
- !
- interface eth0
- ip address 10.0.2.1/24
- ipv6 address 2001:2::1/64
- !
- }
- canvas c1
- iconcoords {299.0 220.0}
- labelcoords {299.0 252.0}
- interface-peer {eth0 n7}
- interface-peer {eth1 n5}
- interface-peer {eth2 n1}
-}
-
-node n4 {
- type router
- model host
- network-config {
- hostname n4
- !
- interface eth0
- ip address 10.0.1.10/24
- ipv6 address 2001:1::10/64
- !
- }
- canvas c1
- iconcoords {39.0 313.0}
- labelcoords {39.0 345.0}
- interface-peer {eth0 n2}
-}
-
-node n5 {
- type router
- model host
- network-config {
- hostname n5
- !
- interface eth0
- ip address 10.0.3.10/24
- ipv6 address 2001:3::10/64
- !
- }
- canvas c1
- iconcoords {286.0 327.0}
- labelcoords {286.0 359.0}
- interface-peer {eth0 n3}
-}
-
-node n6 {
- type router
- model host
- network-config {
- hostname n6
- !
- interface eth0
- ip address 10.0.0.10/24
- ipv6 address 2001:0::10/64
- !
- }
- canvas c1
- iconcoords {131.0 322.0}
- labelcoords {131.0 354.0}
- interface-peer {eth0 n2}
-}
-
-node n7 {
- type router
- model host
- network-config {
- hostname n7
- !
- interface eth0
- ip address 10.0.2.10/24
- ipv6 address 2001:2::10/64
- !
- }
- canvas c1
- iconcoords {373.0 328.0}
- labelcoords {373.0 360.0}
- interface-peer {eth0 n3}
-}
-
-node n8 {
- type router
- model mdr
- network-config {
- hostname n8
- !
- interface eth0
- ip address 10.0.6.1/32
- ipv6 address 2001:6::1/128
- !
- }
- canvas c1
- iconcoords {579.0 102.0}
- labelcoords {579.0 134.0}
- interface-peer {eth0 n11}
-}
-
-node n9 {
- type router
- model mdr
- network-config {
- hostname n9
- !
- interface eth0
- ip address 10.0.6.2/32
- ipv6 address 2001:6::2/128
- !
- }
- canvas c1
- iconcoords {493.0 212.0}
- labelcoords {493.0 244.0}
- interface-peer {eth0 n11}
-}
-
-node n10 {
- type router
- model mdr
- network-config {
- hostname n10
- !
- interface eth0
- ip address 10.0.6.3/32
- ipv6 address 2001:6::3/128
- !
- }
- canvas c1
- iconcoords {674.0 225.0}
- labelcoords {674.0 257.0}
- interface-peer {eth0 n11}
-}
-
-node n11 {
- type wlan
- network-config {
- hostname mobile-sdn
- !
- interface wireless
- ip address 10.0.6.0/32
- ipv6 address 2001:6::0/128
- !
- mobmodel
- coreapi
- basic_range
- !
- }
- custom-config {
- custom-config-id basic_range
- custom-command {3 3 9 9 9}
- config {
- range=275
- bandwidth=54000000
- jitter=0
- delay=20000
- error=0
- }
- }
- canvas c1
- iconcoords {683.0 127.0}
- labelcoords {683.0 159.0}
- interface-peer {e0 n8}
- interface-peer {e1 n9}
- interface-peer {e2 n10}
-}
-
-link l1 {
- nodes {n2 n6}
- bandwidth 0
-}
-
-link l2 {
- nodes {n2 n4}
- bandwidth 0
-}
-
-link l3 {
- nodes {n3 n7}
- bandwidth 0
-}
-
-link l4 {
- nodes {n3 n5}
- bandwidth 0
-}
-
-link l5 {
- nodes {n1 n2}
- bandwidth 0
-}
-
-link l6 {
- nodes {n1 n3}
- bandwidth 0
-}
-
-link l7 {
- nodes {n11 n8}
-}
-
-link l8 {
- nodes {n11 n9}
-}
-
-link l9 {
- nodes {n11 n10}
-}
-
-canvas c1 {
- name {Canvas1}
-}
-
-option global {
- interface_names no
- ip_addresses yes
- ipv6_addresses no
- node_labels yes
- link_labels yes
- show_api no
- background_images no
- annotations yes
- grid yes
- traffic_start 0
- mac_address_start 80
-}
-
-option session {
-}
-
diff --git a/gui/configs/sample2-ssh.imn b/gui/configs/sample2-ssh.imn
deleted file mode 100644
index d79a5f3b..00000000
--- a/gui/configs/sample2-ssh.imn
+++ /dev/null
@@ -1,248 +0,0 @@
-node n8 {
- type router
- model router
- network-config {
- hostname n8
- !
- interface eth3
- ip address 10.0.6.2/24
- ipv6 address a:6::2/64
- !
- interface eth2
- ip address 10.0.3.1/24
- ipv6 address a:3::1/64
- !
- interface eth1
- ip address 10.0.1.1/24
- ipv6 address a:1::1/64
- !
- interface eth0
- ip address 10.0.0.1/24
- ipv6 address a:0::1/64
- !
- }
- canvas c1
- iconcoords {264.0 168.0}
- labelcoords {264.0 196.0}
- interface-peer {eth0 n1}
- interface-peer {eth1 n4}
- interface-peer {eth2 n7}
- interface-peer {eth3 n6}
-}
-
-node n1 {
- type router
- model router
- network-config {
- hostname n1
- !
- interface eth3
- ip address 10.0.5.1/24
- ipv6 address a:5::1/64
- !
- interface eth2
- ip address 10.0.4.2/24
- ipv6 address a:4::2/64
- !
- interface eth1
- ip address 10.0.2.1/24
- ipv6 address a:2::1/64
- !
- interface eth0
- ip address 10.0.0.2/24
- ipv6 address a:0::2/64
- !
- }
- canvas c1
- iconcoords {528.0 312.0}
- labelcoords {528.0 340.0}
- interface-peer {eth0 n8}
- interface-peer {eth1 n5}
- interface-peer {eth2 n7}
- interface-peer {eth3 n6}
-}
-
-node n2 {
- type router
- model host
- cpu {{min 0} {max 100} {weight 1}}
- network-config {
- hostname sshserver
- !
- interface eth0
- ip address 10.0.2.10/24
- ipv6 address a:2::10/64
- !
- }
- canvas c1
- iconcoords {732.0 84.0}
- labelcoords {671.0 95.0}
- interface-peer {eth0 n5}
-}
-
-node n3 {
- type router
- model PC
- cpu {{min 0} {max 100} {weight 1}}
- network-config {
- hostname sshclient
- !
- interface eth0
- ip address 10.0.1.20/24
- ipv6 address a:1::20/64
- !
- }
- canvas c1
- iconcoords {72.0 252.0}
- labelcoords {86.0 295.0}
- interface-peer {eth0 n4}
-}
-
-node n4 {
- type lanswitch
- network-config {
- hostname n4
- !
- }
- canvas c1
- iconcoords {120.0 120.0}
- labelcoords {120.0 148.0}
- interface-peer {e0 n3}
- interface-peer {e1 n8}
-}
-
-node n5 {
- type lanswitch
- network-config {
- hostname n5
- !
- }
- canvas c1
- iconcoords {708.0 204.0}
- labelcoords {708.0 232.0}
- interface-peer {e0 n1}
- interface-peer {e1 n2}
-}
-
-node n6 {
- type router
- model router
- network-config {
- hostname n6
- !
- interface eth1
- ip address 10.0.6.1/24
- ipv6 address a:6::1/64
- !
- interface eth0
- ip address 10.0.5.2/24
- ipv6 address a:5::2/64
- !
- }
- canvas c1
- iconcoords {480.0 132.0}
- labelcoords {480.0 160.0}
- interface-peer {eth0 n1}
- interface-peer {eth1 n8}
-}
-
-node n7 {
- type router
- model router
- network-config {
- hostname n7
- !
- interface eth1
- ip address 10.0.4.1/24
- ipv6 address a:4::1/64
- !
- interface eth0
- ip address 10.0.3.2/24
- ipv6 address a:3::2/64
- !
- }
- canvas c1
- iconcoords {312.0 348.0}
- labelcoords {312.0 376.0}
- interface-peer {eth0 n8}
- interface-peer {eth1 n1}
-}
-
-link l0 {
- nodes {n8 n1}
- bandwidth 0
-}
-
-link l1 {
- nodes {n4 n3}
- bandwidth 0
-}
-
-link l2 {
- nodes {n4 n8}
- bandwidth 0
-}
-
-link l3 {
- nodes {n1 n5}
- bandwidth 0
-}
-
-link l4 {
- nodes {n5 n2}
- bandwidth 0
-}
-
-link l5 {
- nodes {n8 n7}
- bandwidth 0
-}
-
-link l6 {
- nodes {n7 n1}
- bandwidth 0
-}
-
-link l7 {
- nodes {n1 n6}
- bandwidth 0
-}
-
-link l8 {
- nodes {n6 n8}
- bandwidth 0
-}
-
-annotation a0 {
- iconcoords {202 75 612 405}
- type rectangle
- label {provider network}
- labelcolor black
- fontfamily {Arial}
- fontsize 10
- color #f8f8d6
- width 0
- border black
- rad 25
- canvas c1
-}
-
-canvas c1 {
- name {Canvas1}
-}
-
-option global {
- interface_names no
- ip_addresses yes
- ipv6_addresses yes
- node_labels yes
- link_labels yes
- ipsec_configs yes
- remote_exec no
- exec_errors yes
- show_api no
- background_images no
- annotations yes
- grid yes
-}
-
diff --git a/gui/configs/sample3-bgp.imn b/gui/configs/sample3-bgp.imn
deleted file mode 100644
index d4a396ae..00000000
--- a/gui/configs/sample3-bgp.imn
+++ /dev/null
@@ -1,754 +0,0 @@
-node n1 {
- type router
- model router
- network-config {
- hostname router1
- !
- interface eth2
- ip address 10.0.8.2/24
- !
- interface eth1
- ip address 10.0.6.1/24
- !
- interface eth0
- ip address 10.0.5.2/24
- !
- }
- iconcoords {168.0 264.0}
- labelcoords {168.0 288.0}
- interface-peer {eth0 n16}
- interface-peer {eth1 n2}
- interface-peer {eth2 n3}
- canvas c1
- services {zebra BGP IPForward}
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth2
- ip address 10.0.8.2/24
- !
- interface eth1
- ip address 10.0.6.1/24
- !
- interface eth0
- ip address 10.0.5.2/24
- !
- router bgp 105
- bgp router-id 10.0.8.2
- redistribute connected
- neighbor 10.0.6.2 remote-as 105
- neighbor 10.0.6.2 next-hop-self
- neighbor 10.0.5.1 remote-as 105
- neighbor 10.0.5.1 next-hop-self
- neighbor 10.0.8.1 remote-as 2901
- neighbor 10.0.8.1 next-hop-self
- !
- }
- }
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- ('/usr/local/etc/quagga', '/var/run/quagga')
- ('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh')
- 35
- ('sh quaggaboot.sh zebra',)
- ('killall zebra',)
-
- }
- }
-}
-
-node n2 {
- type router
- model router
- network-config {
- hostname router2
- !
- interface eth2
- ip address 10.0.9.1/24
- !
- interface eth1
- ip address 10.0.7.1/24
- !
- interface eth0
- ip address 10.0.6.2/24
- !
- }
- iconcoords {312.0 168.0}
- labelcoords {312.0 192.0}
- interface-peer {eth0 n1}
- interface-peer {eth1 n16}
- interface-peer {eth2 n6}
- canvas c1
- services {zebra BGP IPForward}
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth2
- ip address 10.0.9.1/24
- !
- interface eth1
- ip address 10.0.7.1/24
- !
- interface eth0
- ip address 10.0.6.2/24
- !
- router bgp 105
- bgp router-id 10.0.8.2
- redistribute connected
- neighbor 10.0.7.2 remote-as 105
- neighbor 10.0.7.2 next-hop-self
- neighbor 10.0.6.1 remote-as 105
- neighbor 10.0.6.1 next-hop-self
- neighbor 10.0.9.2 remote-as 2902
- neighbor 10.0.9.2 next-hop-self
- !
- }
- }
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- ('/usr/local/etc/quagga', '/var/run/quagga')
- ('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh')
- 35
- ('sh quaggaboot.sh zebra',)
- ('killall zebra',)
-
- }
- }
-}
-
-node n3 {
- type router
- model router
- network-config {
- hostname router3
- !
- interface eth1
- ip address 10.0.8.1/24
- !
- interface eth0
- ip address 10.0.2.1/24
- !
- }
- iconcoords {96.0 408.0}
- labelcoords {96.0 432.0}
- interface-peer {eth0 n4}
- interface-peer {eth1 n1}
- canvas c1
- services {zebra BGP IPForward}
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth1
- ip address 10.0.8.1/24
- !
- interface eth0
- ip address 10.0.2.1/24
- !
- router bgp 2901
- bgp router-id 10.0.2.1
- redistribute connected
- neighbor 10.0.2.2 remote-as 2901
- neighbor 10.0.2.2 next-hop-self
- neighbor 10.0.8.2 remote-as 105
- neighbor 10.0.8.2 next-hop-self
- !
- }
- }
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- ('/usr/local/etc/quagga', '/var/run/quagga')
- ('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh')
- 35
- ('sh quaggaboot.sh zebra',)
- ('killall zebra',)
-
- }
- }
-}
-
-node n4 {
- type router
- model router
- network-config {
- hostname router4
- !
- interface eth0
- ip address 10.0.2.2/24
- !
- interface eth1
- ip address 10.0.10.1/24
- !
- interface eth2
- ip address 10.0.0.1/24
- !
- }
- iconcoords {240.0 432.0}
- labelcoords {240.0 456.0}
- interface-peer {eth2 n9}
- interface-peer {eth0 n3}
- interface-peer {eth1 n7}
- canvas c1
- services {zebra BGP IPForward}
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth0
- ip address 10.0.2.2/24
- !
- interface eth1
- ip address 10.0.10.1/24
- !
- interface eth2
- ip address 10.0.0.1/24
- !
- router bgp 2901
- bgp router-id 10.0.10.1
- redistribute connected
- neighbor 10.0.2.1 remote-as 2901
- neighbor 10.0.2.1 next-hop-self
- neighbor 10.0.10.2 remote-as 2902
- neighbor 10.0.10.2 next-hop-self
- network 10.0.0.0 mask 255.255.255.0
- !
- }
- }
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- ('/usr/local/etc/quagga', '/var/run/quagga')
- ('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh')
- 35
- ('sh quaggaboot.sh zebra',)
- ('killall zebra',)
-
- }
- }
-}
-
-node n5 {
- type router
- model router
- network-config {
- hostname router5
- !
- interface eth1
- ip address 10.0.4.1/24
- !
- interface eth0
- ip address 10.0.3.2/24
- !
- interface eth2
- ip address 10.0.1.1/24
- !
- }
- iconcoords {528.0 336.0}
- labelcoords {528.0 360.0}
- interface-peer {eth2 n8}
- interface-peer {eth0 n7}
- interface-peer {eth1 n6}
- canvas c1
- services {zebra BGP IPForward}
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth1
- ip address 10.0.4.1/24
- !
- interface eth0
- ip address 10.0.3.2/24
- !
- interface eth2
- ip address 10.0.1.1/24
- !
- router bgp 2902
- bgp router-id 10.0.4.1
- redistribute connected
- neighbor 10.0.4.2 remote-as 2902
- neighbor 10.0.4.2 next-hop-self
- neighbor 10.0.3.1 remote-as 2902
- neighbor 10.0.3.1 next-hop-self
- network 10.0.1.0 mask 255.255.255.0
- !
- }
- }
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- ('/usr/local/etc/quagga', '/var/run/quagga')
- ('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh')
- 35
- ('sh quaggaboot.sh zebra',)
- ('killall zebra',)
-
- }
- }
-}
-
-node n6 {
- type router
- model router
- network-config {
- hostname router6
- !
- interface eth1
- ip address 10.0.9.2/24
- !
- interface eth0
- ip address 10.0.4.2/24
- !
- router bgp 2902
- bgp router-id 10.0.9.2
- redistribute connected
- neighbor 10.0.4.1 remote-as 2902
- neighbor 10.0.4.1 next-hop-self
- neighbor 10.0.9.1 remote-as 105
- neighbor 10.0.9.1 next-hop-self
- !
- }
- iconcoords {624.0 240.0}
- labelcoords {624.0 264.0}
- interface-peer {eth0 n5}
- interface-peer {eth1 n2}
- canvas c1
- services {zebra BGP IPForward}
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth1
- ip address 10.0.9.2/24
- !
- interface eth0
- ip address 10.0.4.2/24
- !
- router bgp 2902
- bgp router-id 10.0.9.2
- redistribute connected
- neighbor 10.0.4.1 remote-as 2902
- neighbor 10.0.4.1 next-hop-self
- neighbor 10.0.9.1 remote-as 105
- neighbor 10.0.9.1 next-hop-self
- !
- }
- }
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- ('/usr/local/etc/quagga', '/var/run/quagga')
- ('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh')
- 35
- ('sh quaggaboot.sh zebra',)
- ('killall zebra',)
-
- }
- }
-}
-
-node n7 {
- type router
- model router
- network-config {
- hostname router7
- !
- interface eth1
- ip address 10.0.10.2/24
- !
- interface eth0
- ip address 10.0.3.1/24
- !
- }
- iconcoords {528.0 456.0}
- labelcoords {528.0 480.0}
- interface-peer {eth0 n5}
- interface-peer {eth1 n4}
- canvas c1
- services {zebra BGP IPForward}
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth1
- ip address 10.0.10.2/24
- !
- interface eth0
- ip address 10.0.3.1/24
- !
- router bgp 2902
- bgp router-id 10.0.3.1
- redistribute connected
- neighbor 10.0.3.2 remote-as 2902
- neighbor 10.0.3.2 next-hop-self
- neighbor 10.0.10.1 remote-as 2901
- neighbor 10.0.10.1 next-hop-self
- !
- }
- }
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- ('/usr/local/etc/quagga', '/var/run/quagga')
- ('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh')
- 35
- ('sh quaggaboot.sh zebra',)
- ('killall zebra',)
-
- }
- }
-}
-
-node n8 {
- type lanswitch
- network-config {
- hostname lanswitch8
- !
- }
- iconcoords {672.0 432.0}
- labelcoords {672.0 456.0}
- interface-peer {e0 n5}
- interface-peer {e1 n10}
- interface-peer {e2 n11}
- canvas c1
-}
-
-node n9 {
- type hub
- network-config {
- hostname hub9
- !
- }
- iconcoords {120.0 504.0}
- labelcoords {120.0 528.0}
- interface-peer {e0 n4}
- interface-peer {e1 n15}
- interface-peer {e2 n14}
- interface-peer {e3 n13}
- interface-peer {e4 n12}
- canvas c1
-}
-
-node n10 {
- type router
- model host
- network-config {
- hostname host10
- !
- interface eth0
- ip address 10.0.1.10/24
- !
- }
- iconcoords {576.0 552.0}
- labelcoords {576.0 584.0}
- interface-peer {eth0 n8}
- canvas c1
-}
-
-node n11 {
- type router
- model host
- network-config {
- hostname host11
- !
- interface eth0
- ip address 10.0.1.11/24
- !
- }
- iconcoords {696.0 552.0}
- labelcoords {696.0 584.0}
- interface-peer {eth0 n8}
- canvas c1
-}
-
-node n12 {
- type router
- model PC
- network-config {
- hostname pc12
- !
- interface eth0
- ip address 10.0.0.23/24
- !
- }
- iconcoords {288.0 576.0}
- labelcoords {288.0 608.0}
- interface-peer {eth0 n9}
- canvas c1
-}
-
-node n13 {
- type router
- model PC
- network-config {
- hostname pc13
- !
- interface eth0
- ip address 10.0.0.22/24
- !
- }
- iconcoords {216.0 600.0}
- labelcoords {216.0 632.0}
- interface-peer {eth0 n9}
- canvas c1
-}
-
-node n14 {
- type router
- model PC
- network-config {
- hostname pc14
- !
- interface eth0
- ip address 10.0.0.21/24
- !
- }
- iconcoords {120.0 624.0}
- labelcoords {120.0 656.0}
- interface-peer {eth0 n9}
- canvas c1
-}
-
-node n15 {
- type router
- model PC
- network-config {
- hostname pc15
- !
- interface eth0
- ip address 10.0.0.20/24
- !
- }
- iconcoords {24.0 576.0}
- labelcoords {24.0 608.0}
- interface-peer {eth0 n9}
- canvas c1
-}
-
-node n16 {
- type router
- model router
- network-config {
- hostname router0
- !
- interface eth0
- ip address 10.0.5.1/24
- !
- interface eth1
- ip address 10.0.7.2/24
- !
- }
- iconcoords {120.0 120.0}
- labelcoords {120.0 144.0}
- interface-peer {eth0 n1}
- interface-peer {eth1 n2}
- canvas c1
- services {zebra BGP IPForward}
- custom-config {
- custom-config-id service:zebra:/usr/local/etc/quagga/Quagga.conf
- custom-command /usr/local/etc/quagga/Quagga.conf
- config {
- interface eth0
- ip address 10.0.5.1/24
- !
- interface eth1
- ip address 10.0.7.2/24
- !
- router bgp 105
- bgp router-id 10.0.5.1
- redistribute connected
- neighbor 10.0.7.1 remote-as 105
- neighbor 10.0.7.1 next-hop-self
- neighbor 10.0.5.2 remote-as 105
- neighbor 10.0.5.2 next-hop-self
- !
- }
- }
- custom-config {
- custom-config-id service:zebra
- custom-command zebra
- config {
- ('/usr/local/etc/quagga', '/var/run/quagga')
- ('/usr/local/etc/quagga/Quagga.conf', 'quaggaboot.sh')
- 35
- ('sh quaggaboot.sh zebra',)
- ('killall zebra',)
-
- }
- }
-}
-
-link l0 {
- nodes {n9 n4}
- bandwidth 100000000
-}
-
-link l1 {
- nodes {n8 n5}
- bandwidth 100000000
-}
-
-link l2 {
- nodes {n15 n9}
- bandwidth 100000000
-}
-
-link l3 {
- nodes {n14 n9}
- bandwidth 100000000
-}
-
-link l4 {
- nodes {n13 n9}
- bandwidth 100000000
-}
-
-link l5 {
- nodes {n12 n9}
- bandwidth 100000000
-}
-
-link l6 {
- nodes {n10 n8}
- bandwidth 100000000
-}
-
-link l7 {
- nodes {n11 n8}
- bandwidth 100000000
-}
-
-link l8 {
- nodes {n3 n4}
- bandwidth 2048000
- delay 2500
-}
-
-link l9 {
- nodes {n7 n5}
- bandwidth 2048000
- delay 2500
-}
-
-link l10 {
- nodes {n5 n6}
- bandwidth 2048000
- delay 2500
-}
-
-link l11 {
- nodes {n16 n1}
- bandwidth 2048000
- delay 2500
-}
-
-link l12 {
- nodes {n1 n2}
- bandwidth 2048000
- delay 2500
-}
-
-link l13 {
- nodes {n2 n16}
- bandwidth 2048000
- delay 2500
-}
-
-link l14 {
- nodes {n3 n1}
- bandwidth 10000000
- delay 650000
-}
-
-link l15 {
- nodes {n2 n6}
- bandwidth 10000000
- delay 650000
-}
-
-link l16 {
- nodes {n4 n7}
- bandwidth 5000000
- delay 7500
-}
-
-annotation a0 {
- iconcoords { 70 55 345 330 }
- type oval
- label {AS 105}
- labelcolor #CFCFAC
- fontfamily {Arial}
- fontsize {12}
- color #FFFFCC
- width 0
- border black
- canvas c1
-}
-
-annotation a1 {
- iconcoords { 470 170 740 630 }
- type oval
- label {AS 2902}
- labelcolor #C0C0CF
- fontfamily {Arial}
- fontsize {12}
- color #F0F0FF
- width 0
- border black
- canvas c1
-}
-
-annotation a2 {
- iconcoords { 0 355 320 660 }
- type oval
- label {AS 2901}
- labelcolor #C0C0CF
- fontfamily {Arial}
- fontsize {12}
- color #F0F0FF
- width 0
- border black
- canvas c1
-}
-
-annotation a10 {
- type text
- canvas c1
- iconcoords { 450 55 }
- color #FFCCCC
- fontsize {20}
- label {Sample Topology 1}
-}
-
-canvas c1 {
- name {Canvas1}
- size {900 706.0}
-}
-
-option global {
- interface_names yes
- ip_addresses yes
- ipv6_addresses yes
- node_labels yes
- link_labels yes
- ipsec_configs yes
- remote_exec no
- exec_errors yes
- show_api no
- background_images no
- annotations yes
- grid yes
-}
-
diff --git a/gui/configs/sample4-nrlsmf.imn b/gui/configs/sample4-nrlsmf.imn
deleted file mode 100644
index 165c424f..00000000
--- a/gui/configs/sample4-nrlsmf.imn
+++ /dev/null
@@ -1,546 +0,0 @@
-comments {
-Joe Macker NRL
-Last updated: Sept 2010,2015(to fix mobility script)
-Nov 2010 Jeff Ahrenholz - updated for new services model and renamed
- (was 2groups_10nodes_smf.imn)
-
-This scenario is a simple SMF example for testing multicast within CORE.
-
-There are several dependencies for these scenarios to work;
-
-nrlsmf must be installed and the binary must be within the path when executing.
-This should also be built along with protolib from the NRL pf.itd.nrl.navy.mil
-repository or from nightly snapshots by using the Makefile.core build file.
-This avoids some of the potential problems that arise with protolib call and
-proper netns support in various kernel releases. For now the Makefile.core
-approach patches around the problem.
-
-This scenario will launch 10 quagga manet-ospf and smf classical flooding
-router nodes. A mobility pattern can be used to cause periodic fragmentation
-and coalescing among 5 groups that move together as a somewhat randomized
-cluster.
-
-Within netns and core the following must be used as nrlsmf params. hash mode
-and instance ids.
-This script uses nodenames as instance ids and MD5 as the hash mode.
-Distributed optimized relay selection is not provided in this example but works
-in nrlsmf with both quagga manetospf-mdr and with nrlolsr or newer nhdp code
-being developed. Relays can also be manually configured if that is of some use
-in a scneario. Classical flodding still provides duplication detection in this
-mode but of course has additional overhead.
-
------
-Traffic testing etc. You can try sending your own multicast apps or use a
-testtool.
-
-mgen is recommended as a test tool, but ping -t 5 224.225.226.227 type testing
-can also be used.
-
-an example mgen script to source multicast from a terminal window is as follows:
-
-mgen event "on 1 udp dst 224.225.226.227/5000 periodic [1 500]"
-
-this sends 500 bytes packets every second. See mgen users guide for the myriad
-of choices/options.
-
-on a receive node terminal the follow can work.
-
-mgen event "join 224.225.226.227" event "listen udp 5000" output
-without output it will stream to stdout.
-}
-
-node n1 {
- type router
- model mdr
- network-config {
- hostname n1
- !
- interface eth0
- ip address 10.0.0.1/32
- ipv6 address a:0::1/128
- !
- }
- iconcoords {186.2364578872143 137.89039496012572}
- labelcoords {186.2364578872143 161.89039496012572}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_green.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n2 {
- type router
- model mdr
- network-config {
- hostname n2
- !
- interface eth0
- ip address 10.0.0.2/32
- ipv6 address a:0::2/128
- !
- }
- iconcoords {49.97421009111123 297.31725181124926}
- labelcoords {49.97421009111123 321.31725181124926}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_green.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n3 {
- type router
- model mdr
- network-config {
- hostname n3
- !
- interface eth0
- ip address 10.0.0.3/32
- ipv6 address a:0::3/128
- !
- }
- iconcoords {176.46110847174833 328.14864514530865}
- labelcoords {176.46110847174833 352.14864514530865}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_green.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n4 {
- type router
- model mdr
- network-config {
- hostname n4
- !
- interface eth0
- ip address 10.0.0.4/32
- ipv6 address a:0::4/128
- !
- }
- iconcoords {145.04062040794378 195.27962082775758}
- labelcoords {145.04062040794378 219.27962082775758}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_green.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n5 {
- type router
- model mdr
- network-config {
- hostname n5
- !
- interface eth0
- ip address 10.0.0.5/32
- ipv6 address a:0::5/128
- !
- }
- iconcoords {137.9101266949479 257.51849231830334}
- labelcoords {137.9101266949479 281.51849231830334}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_green.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n6 {
- type router
- model mdr
- network-config {
- hostname n6
- !
- interface eth0
- ip address 10.0.0.6/32
- ipv6 address a:0::6/128
- !
- }
- iconcoords {119.15850324229558 93.2505296351548}
- labelcoords {119.15850324229558 117.2505296351548}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_red.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n7 {
- type router
- model mdr
- network-config {
- hostname n7
- !
- interface eth0
- ip address 10.0.0.7/32
- ipv6 address a:0::7/128
- !
- }
- iconcoords {79.1102256826161 50.123535235375556}
- labelcoords {79.1102256826161 74.12353523537556}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_red.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n8 {
- type router
- model mdr
- network-config {
- hostname n8
- !
- interface eth0
- ip address 10.0.0.8/32
- ipv6 address a:0::8/128
- !
- }
- iconcoords {159.90259315202974 8.220638318379141}
- labelcoords {159.90259315202974 32.220638318379144}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_red.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n9 {
- type router
- model mdr
- network-config {
- hostname n9
- !
- interface eth0
- ip address 10.0.0.9/32
- ipv6 address a:0::9/128
- !
- }
- iconcoords {150.43010603614704 165.70781621981482}
- labelcoords {150.43010603614704 189.70781621981482}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_red.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n10 {
- type router
- model mdr
- network-config {
- hostname n10
- !
- interface eth0
- ip address 10.0.0.10/32
- ipv6 address a:0::10/128
- !
- }
- iconcoords {64.19289632467826 42.49909518554088}
- labelcoords {64.19289632467826 66.49909518554088}
- canvas c1
- interface-peer {eth0 n11}
- custom-image $CORE_DATA_DIR/icons/normal/router_red.gif
- services {zebra OSPFv3MDR SMF IPForward UserDefined}
- custom-config {
- custom-config-id service:UserDefined:custom-post-config-commands.sh
- custom-command custom-post-config-commands.sh
- config {
- route add default dev eth0
- route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('custom-post-config-commands.sh', )
- startidx=35
- cmdup=('sh custom-post-config-commands.sh', )
- }
- }
-}
-
-node n11 {
- type wlan
- network-config {
- hostname wlan11
- !
- interface wireless
- ip address 10.0.0.0/32
- ipv6 address a:0::0/128
- !
- mobmodel
- coreapi
- basic_range
- ns2script
- !
- }
- iconcoords {0 0}
- labelcoords {0 0}
- canvas c1
- interface-peer {e0 n1}
- interface-peer {e1 n2}
- interface-peer {e2 n3}
- interface-peer {e3 n4}
- interface-peer {e4 n5}
- interface-peer {e5 n6}
- interface-peer {e6 n7}
- interface-peer {e7 n8}
- interface-peer {e8 n9}
- interface-peer {e9 n10}
- custom-config {
- custom-config-id ns2script
- custom-command {10 3 11 10 10}
- config {
- file=sample4.scen
- refresh_ms=50
- loop=1
- autostart=5
- map=
- }
- }
- custom-config {
- custom-config-id basic_range
- custom-command {3 3 9 9 9}
- config {
- range=200
- bandwidth=54000000
- jitter=0
- delay=50000
- error=0
- }
- }
-}
-
-link l1 {
- nodes {n11 n1}
- bandwidth 54000000
- delay 50000
-}
-
-link l2 {
- nodes {n11 n2}
- bandwidth 54000000
- delay 50000
-}
-
-link l3 {
- nodes {n11 n3}
- bandwidth 54000000
- delay 50000
-}
-
-link l4 {
- nodes {n11 n4}
- bandwidth 54000000
- delay 50000
-}
-
-link l5 {
- nodes {n11 n5}
- bandwidth 54000000
- delay 50000
-}
-
-link l6 {
- nodes {n11 n6}
- bandwidth 54000000
- delay 50000
-}
-
-link l7 {
- nodes {n11 n7}
- bandwidth 54000000
- delay 50000
-}
-
-link l8 {
- nodes {n11 n8}
- bandwidth 54000000
- delay 50000
-}
-
-link l9 {
- nodes {n11 n9}
- bandwidth 54000000
- delay 50000
-}
-
-link l10 {
- nodes {n11 n10}
- bandwidth 54000000
- delay 50000
-}
-
-canvas c1 {
- name {Canvas1}
- wallpaper-style {upperleft}
- wallpaper {sample4-bg.jpg}
- size {1000 750}
-}
-
-option global {
- interface_names no
- ip_addresses yes
- ipv6_addresses yes
- node_labels yes
- link_labels yes
- show_api no
- background_images no
- annotations yes
- grid no
- traffic_start 0
-}
-
-option session {
-}
-
diff --git a/gui/configs/sample4.scen b/gui/configs/sample4.scen
deleted file mode 100644
index 939176e7..00000000
--- a/gui/configs/sample4.scen
+++ /dev/null
@@ -1,2791 +0,0 @@
-$node_(1) set X_ 196.387421
-$node_(1) set Y_ 462.134022
-$ns_ at 0.000000 "$node_(1) setdest 196.387421 462.134022 1.000000"
-$ns_ at 0.000000 "$node_(1) setdest 195.956911 462.201568 0.435777"
-$node_(2) set X_ 108.414716
-$node_(2) set Y_ 393.160360
-$ns_ at 0.000000 "$node_(2) setdest 108.414716 393.160360 1.000000"
-$ns_ at 0.000000 "$node_(2) setdest 108.686466 392.778045 0.469055"
-$node_(3) set X_ 14.254378
-$node_(3) set Y_ 541.257030
-$ns_ at 0.000000 "$node_(3) setdest 14.254378 541.257030 1.000000"
-$ns_ at 0.000000 "$node_(3) setdest 14.839150 541.372844 0.596131"
-$node_(4) set X_ 41.851670
-$node_(4) set Y_ 545.867138
-$ns_ at 0.000000 "$node_(4) setdest 41.851670 545.867138 1.000000"
-$ns_ at 0.000000 "$node_(4) setdest 42.442273 545.926217 0.593550"
-$node_(5) set X_ 182.809226
-$node_(5) set Y_ 513.055969
-$ns_ at 0.000000 "$node_(5) setdest 182.809226 513.055969 1.000000"
-$ns_ at 0.000000 "$node_(5) setdest 183.335280 513.337339 0.596575"
-$node_(6) set X_ 122.027997
-$node_(6) set Y_ 524.087717
-$ns_ at 0.000000 "$node_(6) setdest 122.027997 524.087717 1.000000"
-$ns_ at 0.000000 "$node_(6) setdest 122.475860 524.470641 0.589248"
-$node_(7) set X_ 186.692167
-$node_(7) set Y_ 453.103964
-$ns_ at 0.000000 "$node_(7) setdest 186.692167 453.103964 1.000000"
-$ns_ at 0.000000 "$node_(7) setdest 186.362331 453.043815 0.335275"
-$node_(8) set X_ 6.841010
-$node_(8) set Y_ 411.004614
-$ns_ at 0.000000 "$node_(8) setdest 6.841010 411.004614 1.000000"
-$ns_ at 0.000000 "$node_(8) setdest 6.715910 410.970880 0.129569"
-$node_(9) set X_ 180.514289
-$node_(9) set Y_ 395.901964
-$ns_ at 0.000000 "$node_(9) setdest 180.514289 395.901964 1.000000"
-$ns_ at 0.000000 "$node_(9) setdest 180.863640 396.303766 0.532438"
-$node_(10) set X_ 148.853602
-$node_(10) set Y_ 357.991260
-$ns_ at 0.000000 "$node_(10) setdest 148.853602 357.991260 1.000000"
-$ns_ at 0.000000 "$node_(10) setdest 148.959253 358.166829 0.204906"
-
-$ns_ at 1.000000 "$node_(1) setdest 194.187758 463.051431 1.962694"
-$ns_ at 1.000000 "$node_(2) setdest 109.321754 390.842582 2.037058"
-$ns_ at 1.000000 "$node_(3) setdest 16.393600 542.808055 2.115690"
-$ns_ at 1.000000 "$node_(4) setdest 44.634359 546.049079 2.195526"
-$ns_ at 1.000000 "$node_(5) setdest 184.328928 515.246522 2.152281"
-$ns_ at 1.000000 "$node_(6) setdest 123.835691 526.192539 2.194099"
-$ns_ at 1.000000 "$node_(7) setdest 184.877733 452.038170 1.793140"
-$ns_ at 1.000000 "$node_(8) setdest 6.671562 410.117567 0.854465"
-$ns_ at 1.000000 "$node_(9) setdest 181.894113 398.159435 2.122590"
-$ns_ at 1.000000 "$node_(10) setdest 148.870931 359.695988 1.531708"
-
-$ns_ at 2.000000 "$node_(1) setdest 190.851655 464.311512 3.566145"
-$ns_ at 2.000000 "$node_(2) setdest 110.783099 387.546466 3.605539"
-$ns_ at 2.000000 "$node_(3) setdest 14.881262 545.183484 2.815996"
-$ns_ at 2.000000 "$node_(4) setdest 48.394729 546.584695 3.798324"
-$ns_ at 2.000000 "$node_(5) setdest 184.473917 519.006641 3.762914"
-$ns_ at 2.000000 "$node_(6) setdest 126.386821 528.676353 3.560561"
-$ns_ at 2.000000 "$node_(7) setdest 182.160868 450.006458 3.392523"
-$ns_ at 2.000000 "$node_(8) setdest 8.577394 409.839307 1.926038"
-$ns_ at 2.000000 "$node_(9) setdest 182.309184 401.800750 3.664895"
-$ns_ at 2.000000 "$node_(10) setdest 149.229189 362.797090 3.121727"
-
-$ns_ at 3.000000 "$node_(1) setdest 185.998912 466.082945 5.165955"
-$ns_ at 3.000000 "$node_(2) setdest 114.977824 384.500577 5.183932"
-$ns_ at 3.000000 "$node_(3) setdest 12.849462 546.572220 2.461056"
-$ns_ at 3.000000 "$node_(4) setdest 52.522431 543.493688 5.156767"
-$ns_ at 3.000000 "$node_(5) setdest 181.227267 523.091806 5.218171"
-$ns_ at 3.000000 "$node_(6) setdest 122.849749 526.513462 4.145958"
-$ns_ at 3.000000 "$node_(7) setdest 178.377101 446.748671 4.993003"
-$ns_ at 3.000000 "$node_(8) setdest 11.957948 411.081133 3.601427"
-$ns_ at 3.000000 "$node_(9) setdest 179.694536 406.348826 5.246083"
-$ns_ at 3.000000 "$node_(10) setdest 150.721736 367.286506 4.731021"
-
-$ns_ at 4.000000 "$node_(1) setdest 179.555767 468.148449 6.766123"
-$ns_ at 4.000000 "$node_(2) setdest 121.705230 383.835205 6.760230"
-$ns_ at 4.000000 "$node_(3) setdest 12.743213 545.655478 0.922878"
-$ns_ at 4.000000 "$node_(4) setdest 54.718112 536.856974 6.990493"
-$ns_ at 4.000000 "$node_(5) setdest 174.581069 521.988831 6.737099"
-$ns_ at 4.000000 "$node_(6) setdest 117.358177 524.776868 5.759612"
-$ns_ at 4.000000 "$node_(7) setdest 173.583229 442.224357 6.591709"
-$ns_ at 4.000000 "$node_(8) setdest 16.085272 414.253650 5.205734"
-$ns_ at 4.000000 "$node_(9) setdest 174.174132 410.497488 6.905523"
-$ns_ at 4.000000 "$node_(10) setdest 152.442894 373.377115 6.329131"
-
-$ns_ at 5.000000 "$node_(1) setdest 184.255964 467.324102 4.771939"
-$ns_ at 5.000000 "$node_(2) setdest 130.096253 384.724742 8.438041"
-$ns_ at 5.000000 "$node_(3) setdest 13.104636 545.386686 0.450418"
-$ns_ at 5.000000 "$node_(4) setdest 60.821055 533.607888 6.913933"
-$ns_ at 5.000000 "$node_(5) setdest 176.727658 522.545813 2.217673"
-$ns_ at 5.000000 "$node_(6) setdest 109.928718 524.861347 7.429940"
-$ns_ at 5.000000 "$node_(7) setdest 168.331832 435.943930 8.186631"
-$ns_ at 5.000000 "$node_(8) setdest 20.338476 419.569962 6.808298"
-$ns_ at 5.000000 "$node_(9) setdest 166.303912 413.725191 8.506376"
-$ns_ at 5.000000 "$node_(10) setdest 153.598648 381.217946 7.925553"
-
-$ns_ at 6.000000 "$node_(1) setdest 190.713020 468.199291 6.516097"
-$ns_ at 6.000000 "$node_(2) setdest 140.041968 386.083359 10.038083"
-$ns_ at 6.000000 "$node_(3) setdest 15.010480 545.397474 1.905875"
-$ns_ at 6.000000 "$node_(4) setdest 69.199175 531.278561 8.695899"
-$ns_ at 6.000000 "$node_(5) setdest 180.271997 521.405130 3.723372"
-$ns_ at 6.000000 "$node_(6) setdest 100.969155 523.987540 9.002072"
-$ns_ at 6.000000 "$node_(7) setdest 162.840946 427.835646 9.792553"
-$ns_ at 6.000000 "$node_(8) setdest 24.574187 426.845069 8.418339"
-$ns_ at 6.000000 "$node_(9) setdest 156.473605 416.105660 10.114424"
-$ns_ at 6.000000 "$node_(10) setdest 153.809976 390.743972 9.528370"
-
-$ns_ at 7.000000 "$node_(1) setdest 198.802940 468.836289 8.114961"
-$ns_ at 7.000000 "$node_(2) setdest 151.520674 388.001681 11.637897"
-$ns_ at 7.000000 "$node_(3) setdest 18.516288 545.400428 3.505809"
-$ns_ at 7.000000 "$node_(4) setdest 79.188417 528.784398 10.295912"
-$ns_ at 7.000000 "$node_(5) setdest 185.412195 520.020244 5.323489"
-$ns_ at 7.000000 "$node_(6) setdest 91.080154 520.135759 10.612660"
-$ns_ at 7.000000 "$node_(7) setdest 157.194066 417.952547 11.382569"
-$ns_ at 7.000000 "$node_(8) setdest 29.470473 435.584536 10.017580"
-$ns_ at 7.000000 "$node_(9) setdest 144.909476 418.020989 11.721670"
-$ns_ at 7.000000 "$node_(10) setdest 154.204220 401.865406 11.128419"
-
-$ns_ at 8.000000 "$node_(1) setdest 208.501664 469.415232 9.715988"
-$ns_ at 8.000000 "$node_(2) setdest 164.443430 390.863715 13.235894"
-$ns_ at 8.000000 "$node_(3) setdest 23.619197 545.235409 5.105577"
-$ns_ at 8.000000 "$node_(4) setdest 90.784905 526.131143 11.896146"
-$ns_ at 8.000000 "$node_(5) setdest 192.096154 518.214428 6.923603"
-$ns_ at 8.000000 "$node_(6) setdest 80.107574 514.731340 12.231323"
-$ns_ at 8.000000 "$node_(7) setdest 153.494434 405.549908 12.942672"
-$ns_ at 8.000000 "$node_(8) setdest 34.279206 446.159167 11.616658"
-$ns_ at 8.000000 "$node_(9) setdest 131.868827 420.741097 13.321318"
-$ns_ at 8.000000 "$node_(10) setdest 155.452554 414.535462 12.731405"
-
-$ns_ at 9.000000 "$node_(1) setdest 219.760670 470.533402 11.314394"
-$ns_ at 9.000000 "$node_(2) setdest 178.682089 395.031168 14.836006"
-$ns_ at 9.000000 "$node_(3) setdest 30.308442 544.767661 6.705579"
-$ns_ at 9.000000 "$node_(4) setdest 103.964771 523.226201 13.496205"
-$ns_ at 9.000000 "$node_(5) setdest 200.282657 515.840475 8.523761"
-$ns_ at 9.000000 "$node_(6) setdest 69.403546 506.039069 13.788828"
-$ns_ at 9.000000 "$node_(7) setdest 157.365544 391.985292 14.106179"
-$ns_ at 9.000000 "$node_(8) setdest 38.646714 458.620995 13.205010"
-$ns_ at 9.000000 "$node_(9) setdest 117.255049 423.747093 14.919736"
-$ns_ at 9.000000 "$node_(10) setdest 155.850673 428.857711 14.327781"
-
-$ns_ at 10.000000 "$node_(1) setdest 232.472738 472.803312 12.913139"
-$ns_ at 10.000000 "$node_(2) setdest 194.127048 400.653131 16.436339"
-$ns_ at 10.000000 "$node_(3) setdest 38.581962 544.035935 8.305815"
-$ns_ at 10.000000 "$node_(4) setdest 118.685377 519.880090 15.096115"
-$ns_ at 10.000000 "$node_(5) setdest 210.050487 513.181447 10.123286"
-$ns_ at 10.000000 "$node_(6) setdest 59.302514 494.374293 15.430420"
-$ns_ at 10.000000 "$node_(7) setdest 169.643190 381.472758 16.163353"
-$ns_ at 10.000000 "$node_(8) setdest 40.877385 473.255023 14.803063"
-$ns_ at 10.000000 "$node_(9) setdest 100.860701 425.784585 16.520473"
-$ns_ at 10.000000 "$node_(10) setdest 154.521863 444.723981 15.921817"
-
-$ns_ at 11.000000 "$node_(1) setdest 246.478612 476.598268 14.510900"
-$ns_ at 11.000000 "$node_(2) setdest 210.951195 407.159256 18.038337"
-$ns_ at 11.000000 "$node_(3) setdest 48.438708 543.050999 9.905834"
-$ns_ at 11.000000 "$node_(4) setdest 134.861031 515.746212 16.695530"
-$ns_ at 11.000000 "$node_(5) setdest 221.527307 510.799257 11.721444"
-$ns_ at 11.000000 "$node_(6) setdest 49.457411 480.494289 17.017067"
-$ns_ at 11.000000 "$node_(7) setdest 180.598709 367.456279 17.790028"
-$ns_ at 11.000000 "$node_(8) setdest 39.538357 489.562934 16.362792"
-$ns_ at 11.000000 "$node_(9) setdest 83.020566 428.952409 18.119203"
-$ns_ at 11.000000 "$node_(10) setdest 151.821820 462.044995 17.530195"
-
-$ns_ at 12.000000 "$node_(1) setdest 261.629729 482.087033 16.114679"
-$ns_ at 12.000000 "$node_(2) setdest 229.245871 414.133015 19.578776"
-$ns_ at 12.000000 "$node_(3) setdest 59.881260 541.845844 11.505842"
-$ns_ at 12.000000 "$node_(4) setdest 152.423948 510.621388 18.295352"
-$ns_ at 12.000000 "$node_(5) setdest 234.527040 507.889458 13.321411"
-$ns_ at 12.000000 "$node_(6) setdest 40.966307 463.915095 18.627091"
-$ns_ at 12.000000 "$node_(7) setdest 185.609934 356.000078 12.504276"
-$ns_ at 12.000000 "$node_(8) setdest 30.885561 505.096833 17.781252"
-$ns_ at 12.000000 "$node_(9) setdest 63.625003 431.905828 19.619138"
-$ns_ at 12.000000 "$node_(10) setdest 146.050593 480.248923 19.096860"
-
-$ns_ at 13.000000 "$node_(1) setdest 278.393127 487.812114 17.714064"
-$ns_ at 13.000000 "$node_(2) setdest 248.189196 420.533024 19.995242"
-$ns_ at 13.000000 "$node_(3) setdest 72.938784 540.726815 13.105387"
-$ns_ at 13.000000 "$node_(4) setdest 171.235204 504.613101 19.747478"
-$ns_ at 13.000000 "$node_(5) setdest 249.025623 504.352557 14.923758"
-$ns_ at 13.000000 "$node_(6) setdest 30.880946 446.819434 19.848832"
-$ns_ at 13.000000 "$node_(7) setdest 184.657559 357.512927 1.787661"
-$ns_ at 13.000000 "$node_(8) setdest 14.206642 507.144149 16.804101"
-$ns_ at 13.000000 "$node_(9) setdest 44.005432 428.793757 19.864857"
-$ns_ at 13.000000 "$node_(10) setdest 132.025204 492.782747 18.809792"
-
-$ns_ at 14.000000 "$node_(1) setdest 297.118073 492.525399 19.309031"
-$ns_ at 14.000000 "$node_(2) setdest 267.609451 425.285611 19.993334"
-$ns_ at 14.000000 "$node_(3) setdest 87.624368 539.967665 14.705193"
-$ns_ at 14.000000 "$node_(4) setdest 190.013797 497.736791 19.997979"
-$ns_ at 14.000000 "$node_(5) setdest 265.067340 500.390654 16.523722"
-$ns_ at 14.000000 "$node_(6) setdest 22.990420 428.699834 19.763105"
-$ns_ at 14.000000 "$node_(7) setdest 182.833109 360.375049 3.394165"
-$ns_ at 14.000000 "$node_(8) setdest 11.626599 492.727976 14.645227"
-$ns_ at 14.000000 "$node_(9) setdest 26.668091 418.946242 19.938830"
-$ns_ at 14.000000 "$node_(10) setdest 123.299921 486.526765 10.736287"
-
-$ns_ at 15.000000 "$node_(1) setdest 316.902786 495.404161 19.993052"
-$ns_ at 15.000000 "$node_(2) setdest 287.409944 428.039581 19.991095"
-$ns_ at 15.000000 "$node_(3) setdest 103.927453 539.724173 16.304903"
-$ns_ at 15.000000 "$node_(4) setdest 208.447762 489.981073 19.999056"
-$ns_ at 15.000000 "$node_(5) setdest 282.569771 495.688589 18.123038"
-$ns_ at 15.000000 "$node_(6) setdest 32.358017 413.328574 18.000764"
-$ns_ at 15.000000 "$node_(7) setdest 180.522818 364.802409 4.993892"
-$ns_ at 15.000000 "$node_(8) setdest 17.250049 478.879349 14.946828"
-$ns_ at 15.000000 "$node_(9) setdest 19.305071 401.972918 18.501562"
-$ns_ at 15.000000 "$node_(10) setdest 122.308127 476.484801 10.090823"
-
-$ns_ at 16.000000 "$node_(1) setdest 336.810376 497.321840 19.999742"
-$ns_ at 16.000000 "$node_(2) setdest 307.390871 428.541832 19.987239"
-$ns_ at 16.000000 "$node_(3) setdest 121.831706 539.952811 17.905713"
-$ns_ at 16.000000 "$node_(4) setdest 227.120033 482.822730 19.997389"
-$ns_ at 16.000000 "$node_(5) setdest 301.236586 489.579183 19.641151"
-$ns_ at 16.000000 "$node_(6) setdest 46.948370 420.814042 16.398495"
-$ns_ at 16.000000 "$node_(7) setdest 177.898557 370.854610 6.596658"
-$ns_ at 16.000000 "$node_(8) setdest 30.672025 469.903968 16.146420"
-$ns_ at 16.000000 "$node_(9) setdest 28.762169 396.296220 11.030031"
-$ns_ at 16.000000 "$node_(10) setdest 119.039643 465.199922 11.748680"
-
-$ns_ at 17.000000 "$node_(1) setdest 356.723919 496.365486 19.936494"
-$ns_ at 17.000000 "$node_(2) setdest 327.327857 427.009656 19.995774"
-$ns_ at 17.000000 "$node_(3) setdest 141.310307 540.046329 19.478826"
-$ns_ at 17.000000 "$node_(4) setdest 246.180029 476.772114 19.997335"
-$ns_ at 17.000000 "$node_(5) setdest 320.056175 482.812486 19.999128"
-$ns_ at 17.000000 "$node_(6) setdest 50.106366 436.546462 16.046245"
-$ns_ at 17.000000 "$node_(7) setdest 175.044087 378.536882 8.195444"
-$ns_ at 17.000000 "$node_(8) setdest 48.497193 467.760705 17.953557"
-$ns_ at 17.000000 "$node_(9) setdest 38.413556 402.420929 11.430719"
-$ns_ at 17.000000 "$node_(10) setdest 114.693546 452.584125 13.343422"
-
-$ns_ at 18.000000 "$node_(1) setdest 376.664288 496.703412 19.943231"
-$ns_ at 18.000000 "$node_(2) setdest 346.945189 423.241158 19.976018"
-$ns_ at 18.000000 "$node_(3) setdest 161.304062 539.571077 19.999402"
-$ns_ at 18.000000 "$node_(4) setdest 265.558802 471.836704 19.997378"
-$ns_ at 18.000000 "$node_(5) setdest 338.448532 474.970956 19.994209"
-$ns_ at 18.000000 "$node_(6) setdest 54.288270 451.088370 15.131272"
-$ns_ at 18.000000 "$node_(7) setdest 172.073073 387.868710 9.793362"
-$ns_ at 18.000000 "$node_(8) setdest 67.655050 465.445201 19.297281"
-$ns_ at 18.000000 "$node_(9) setdest 49.709921 408.850378 12.997910"
-$ns_ at 18.000000 "$node_(10) setdest 114.878490 437.804560 14.780722"
-
-$ns_ at 19.000000 "$node_(1) setdest 396.221169 500.830441 19.987596"
-$ns_ at 19.000000 "$node_(2) setdest 364.910034 414.653995 19.911680"
-$ns_ at 19.000000 "$node_(3) setdest 181.265387 538.352550 19.998483"
-$ns_ at 19.000000 "$node_(4) setdest 285.155517 467.848358 19.998454"
-$ns_ at 19.000000 "$node_(5) setdest 356.023480 465.435990 19.994859"
-$ns_ at 19.000000 "$node_(6) setdest 59.822992 466.650093 16.516669"
-$ns_ at 19.000000 "$node_(7) setdest 170.484709 399.136223 11.378916"
-$ns_ at 19.000000 "$node_(8) setdest 84.504418 457.452149 18.649130"
-$ns_ at 19.000000 "$node_(9) setdest 63.410973 414.003103 14.637944"
-$ns_ at 19.000000 "$node_(10) setdest 124.979075 425.189235 16.160700"
-
-$ns_ at 20.000000 "$node_(1) setdest 414.959731 507.703787 19.959373"
-$ns_ at 20.000000 "$node_(2) setdest 380.876777 402.624609 19.991073"
-$ns_ at 20.000000 "$node_(3) setdest 201.169537 536.405487 19.999156"
-$ns_ at 20.000000 "$node_(4) setdest 304.943032 464.963448 19.996711"
-$ns_ at 20.000000 "$node_(5) setdest 372.787924 454.543588 19.992274"
-$ns_ at 20.000000 "$node_(6) setdest 70.020001 481.532051 18.040280"
-$ns_ at 20.000000 "$node_(7) setdest 170.249709 412.128831 12.994733"
-$ns_ at 20.000000 "$node_(8) setdest 93.638312 442.200433 17.777595"
-$ns_ at 20.000000 "$node_(9) setdest 78.562641 419.829513 16.233302"
-$ns_ at 20.000000 "$node_(10) setdest 142.579167 424.108364 17.633250"
-
-$ns_ at 21.000000 "$node_(1) setdest 429.209520 521.348596 19.729097"
-$ns_ at 21.000000 "$node_(2) setdest 397.102346 390.982114 19.970398"
-$ns_ at 21.000000 "$node_(3) setdest 220.965783 533.570502 19.998213"
-$ns_ at 21.000000 "$node_(4) setdest 324.852277 463.066604 19.999402"
-$ns_ at 21.000000 "$node_(5) setdest 388.665021 442.382765 19.999195"
-$ns_ at 21.000000 "$node_(6) setdest 86.716919 491.602850 19.498924"
-$ns_ at 21.000000 "$node_(7) setdest 169.847567 426.715435 14.592147"
-$ns_ at 21.000000 "$node_(8) setdest 97.710618 423.903178 18.744951"
-$ns_ at 21.000000 "$node_(9) setdest 95.770736 424.404680 17.805917"
-$ns_ at 21.000000 "$node_(10) setdest 161.156216 426.885868 18.783538"
-
-$ns_ at 22.000000 "$node_(1) setdest 430.473009 540.114895 18.808785"
-$ns_ at 22.000000 "$node_(2) setdest 416.281990 386.251137 19.754515"
-$ns_ at 22.000000 "$node_(3) setdest 240.636740 529.963240 19.998972"
-$ns_ at 22.000000 "$node_(4) setdest 344.804967 461.695943 19.999714"
-$ns_ at 22.000000 "$node_(5) setdest 405.064820 430.950640 19.991171"
-$ns_ at 22.000000 "$node_(6) setdest 105.990772 495.255793 19.616967"
-$ns_ at 22.000000 "$node_(7) setdest 167.385262 442.713557 16.186502"
-$ns_ at 22.000000 "$node_(8) setdest 103.162186 405.249727 19.433755"
-$ns_ at 22.000000 "$node_(9) setdest 115.163365 425.341594 19.415248"
-$ns_ at 22.000000 "$node_(10) setdest 179.829755 431.479678 19.230293"
-
-$ns_ at 23.000000 "$node_(1) setdest 415.678953 543.404262 15.155331"
-$ns_ at 23.000000 "$node_(2) setdest 435.187649 392.319327 19.855651"
-$ns_ at 23.000000 "$node_(3) setdest 260.149758 525.579574 19.999361"
-$ns_ at 23.000000 "$node_(4) setdest 364.757106 460.319210 19.999581"
-$ns_ at 23.000000 "$node_(5) setdest 423.001973 422.178788 19.967143"
-$ns_ at 23.000000 "$node_(6) setdest 123.055577 489.304227 18.072872"
-$ns_ at 23.000000 "$node_(7) setdest 163.127378 459.989903 17.793305"
-$ns_ at 23.000000 "$node_(8) setdest 100.668183 387.349777 18.072860"
-$ns_ at 23.000000 "$node_(9) setdest 134.745751 421.781273 19.903410"
-$ns_ at 23.000000 "$node_(10) setdest 192.254617 443.561434 17.330494"
-
-$ns_ at 24.000000 "$node_(1) setdest 406.160525 540.747525 9.882242"
-$ns_ at 24.000000 "$node_(2) setdest 449.530999 405.814727 19.694098"
-$ns_ at 24.000000 "$node_(3) setdest 279.642597 521.105699 19.999658"
-$ns_ at 24.000000 "$node_(4) setdest 384.596757 457.826144 19.995677"
-$ns_ at 24.000000 "$node_(5) setdest 442.473674 417.861163 19.944649"
-$ns_ at 24.000000 "$node_(6) setdest 134.199736 475.485411 17.752521"
-$ns_ at 24.000000 "$node_(7) setdest 160.485918 479.161017 19.352233"
-$ns_ at 24.000000 "$node_(8) setdest 89.621312 373.738896 17.529673"
-$ns_ at 24.000000 "$node_(9) setdest 151.033770 410.479558 19.824942"
-$ns_ at 24.000000 "$node_(10) setdest 187.121532 459.497919 16.742763"
-
-$ns_ at 25.000000 "$node_(1) setdest 409.358404 540.925330 3.202818"
-$ns_ at 25.000000 "$node_(2) setdest 458.447905 423.373342 19.693049"
-$ns_ at 25.000000 "$node_(3) setdest 299.300679 517.470033 19.991455"
-$ns_ at 25.000000 "$node_(4) setdest 404.207394 453.940099 19.991959"
-$ns_ at 25.000000 "$node_(5) setdest 462.251199 419.968804 19.889511"
-$ns_ at 25.000000 "$node_(6) setdest 137.331615 457.789340 17.971076"
-$ns_ at 25.000000 "$node_(7) setdest 163.430534 498.853924 19.911840"
-$ns_ at 25.000000 "$node_(8) setdest 77.657124 359.369184 18.698407"
-$ns_ at 25.000000 "$node_(9) setdest 164.260780 395.480602 19.998061"
-$ns_ at 25.000000 "$node_(10) setdest 184.039441 474.459839 15.276071"
-
-$ns_ at 26.000000 "$node_(1) setdest 413.898194 539.190016 4.860144"
-$ns_ at 26.000000 "$node_(2) setdest 472.249585 436.422368 18.993774"
-$ns_ at 26.000000 "$node_(3) setdest 319.267001 516.756455 19.979069"
-$ns_ at 26.000000 "$node_(4) setdest 422.915330 447.007413 19.951166"
-$ns_ at 26.000000 "$node_(5) setdest 477.938097 430.823097 19.076018"
-$ns_ at 26.000000 "$node_(6) setdest 140.850027 439.467490 18.656618"
-$ns_ at 26.000000 "$node_(7) setdest 173.893091 515.708878 19.838210"
-$ns_ at 26.000000 "$node_(8) setdest 62.077819 360.254769 15.604455"
-$ns_ at 26.000000 "$node_(9) setdest 179.407140 382.455787 19.976437"
-$ns_ at 26.000000 "$node_(10) setdest 185.534654 490.826466 16.434784"
-
-$ns_ at 27.000000 "$node_(1) setdest 419.345130 535.713495 6.461836"
-$ns_ at 27.000000 "$node_(2) setdest 485.947996 449.586921 18.998734"
-$ns_ at 27.000000 "$node_(3) setdest 339.044367 519.533812 19.971427"
-$ns_ at 27.000000 "$node_(4) setdest 438.826119 435.000710 19.932740"
-$ns_ at 27.000000 "$node_(5) setdest 473.471267 424.832381 7.472701"
-$ns_ at 27.000000 "$node_(6) setdest 135.925019 421.904243 18.240706"
-$ns_ at 27.000000 "$node_(7) setdest 186.435379 531.166580 19.906018"
-$ns_ at 27.000000 "$node_(8) setdest 57.119411 374.294350 14.889447"
-$ns_ at 27.000000 "$node_(9) setdest 192.143744 373.866180 15.362370"
-$ns_ at 27.000000 "$node_(10) setdest 185.569664 508.866862 18.040430"
-
-$ns_ at 28.000000 "$node_(1) setdest 425.125458 530.097247 8.059430"
-$ns_ at 28.000000 "$node_(2) setdest 493.049174 466.718934 18.545421"
-$ns_ at 28.000000 "$node_(3) setdest 358.303469 524.898542 19.992332"
-$ns_ at 28.000000 "$node_(4) setdest 450.847143 419.080495 19.948891"
-$ns_ at 28.000000 "$node_(5) setdest 466.757695 428.118270 7.474565"
-$ns_ at 28.000000 "$node_(6) setdest 128.600444 404.149699 19.206072"
-$ns_ at 28.000000 "$node_(7) setdest 190.977325 534.505975 5.637449"
-$ns_ at 28.000000 "$node_(8) setdest 50.549060 388.112799 15.300949"
-$ns_ at 28.000000 "$node_(9) setdest 191.629729 374.111864 0.569712"
-$ns_ at 28.000000 "$node_(10) setdest 181.834449 527.981880 19.476543"
-
-$ns_ at 29.000000 "$node_(1) setdest 431.663417 522.972367 9.669997"
-$ns_ at 29.000000 "$node_(2) setdest 500.999975 483.730217 18.777619"
-$ns_ at 29.000000 "$node_(3) setdest 378.191935 526.327594 19.939741"
-$ns_ at 29.000000 "$node_(4) setdest 458.446194 400.622892 19.960678"
-$ns_ at 29.000000 "$node_(5) setdest 461.699992 435.699961 9.113857"
-$ns_ at 29.000000 "$node_(6) setdest 122.697249 385.435598 19.623081"
-$ns_ at 29.000000 "$node_(7) setdest 183.725190 529.813555 8.637839"
-$ns_ at 29.000000 "$node_(8) setdest 38.920729 400.522858 17.006694"
-$ns_ at 29.000000 "$node_(9) setdest 190.433575 375.757305 2.034271"
-$ns_ at 29.000000 "$node_(10) setdest 169.338208 541.367431 18.311990"
-
-$ns_ at 30.000000 "$node_(1) setdest 440.262619 515.700706 11.261586"
-$ns_ at 30.000000 "$node_(2) setdest 500.811238 501.442061 17.712850"
-$ns_ at 30.000000 "$node_(3) setdest 397.439899 521.321197 19.888392"
-$ns_ at 30.000000 "$node_(4) setdest 464.984365 381.792314 19.933348"
-$ns_ at 30.000000 "$node_(5) setdest 458.178246 445.894374 10.785581"
-$ns_ at 30.000000 "$node_(6) setdest 117.489012 366.365374 19.768641"
-$ns_ at 30.000000 "$node_(7) setdest 174.343370 525.704745 10.242113"
-$ns_ at 30.000000 "$node_(8) setdest 24.090640 411.759729 18.606419"
-$ns_ at 30.000000 "$node_(9) setdest 187.828459 378.293814 3.636002"
-$ns_ at 30.000000 "$node_(10) setdest 152.821188 535.712898 17.458113"
-
-$ns_ at 31.000000 "$node_(1) setdest 451.405438 509.290896 12.854885"
-$ns_ at 31.000000 "$node_(2) setdest 491.700571 517.036414 18.060678"
-$ns_ at 31.000000 "$node_(3) setdest 413.171544 509.240492 19.835022"
-$ns_ at 31.000000 "$node_(4) setdest 480.918024 372.117997 18.640651"
-$ns_ at 31.000000 "$node_(5) setdest 456.464076 458.133299 12.358384"
-$ns_ at 31.000000 "$node_(6) setdest 116.659357 360.796271 5.630563"
-$ns_ at 31.000000 "$node_(7) setdest 164.951174 518.581014 11.788168"
-$ns_ at 31.000000 "$node_(8) setdest 8.936318 423.738537 19.316970"
-$ns_ at 31.000000 "$node_(9) setdest 184.393707 382.243473 5.234245"
-$ns_ at 31.000000 "$node_(10) setdest 139.669561 526.256345 16.198509"
-
-$ns_ at 32.000000 "$node_(1) setdest 464.725397 503.658293 14.461934"
-$ns_ at 32.000000 "$node_(2) setdest 479.083065 531.312050 19.052435"
-$ns_ at 32.000000 "$node_(3) setdest 421.035268 491.095019 19.776156"
-$ns_ at 32.000000 "$node_(4) setdest 490.592449 383.745440 15.125870"
-$ns_ at 32.000000 "$node_(5) setdest 456.762816 472.118321 13.988212"
-$ns_ at 32.000000 "$node_(6) setdest 116.717596 368.408818 7.612770"
-$ns_ at 32.000000 "$node_(7) setdest 156.422329 508.202089 13.433662"
-$ns_ at 32.000000 "$node_(8) setdest 11.745791 420.358995 4.394820"
-$ns_ at 32.000000 "$node_(9) setdest 180.640795 387.951388 6.831153"
-$ns_ at 32.000000 "$node_(10) setdest 126.512644 516.165541 16.580976"
-
-$ns_ at 33.000000 "$node_(1) setdest 480.312677 499.837211 16.048799"
-$ns_ at 33.000000 "$node_(2) setdest 464.103605 542.498822 18.695670"
-$ns_ at 33.000000 "$node_(3) setdest 415.566812 472.559995 19.324884"
-$ns_ at 33.000000 "$node_(4) setdest 492.444864 398.380771 14.752097"
-$ns_ at 33.000000 "$node_(5) setdest 454.811405 487.581008 15.585336"
-$ns_ at 33.000000 "$node_(6) setdest 117.946938 377.618577 9.291444"
-$ns_ at 33.000000 "$node_(7) setdest 147.983933 495.750139 15.041861"
-$ns_ at 33.000000 "$node_(8) setdest 16.630884 421.422038 4.999419"
-$ns_ at 33.000000 "$node_(9) setdest 176.046756 395.024567 8.434160"
-$ns_ at 33.000000 "$node_(10) setdest 114.664512 502.380973 18.176703"
-
-$ns_ at 34.000000 "$node_(1) setdest 497.919072 498.422291 17.663158"
-$ns_ at 34.000000 "$node_(2) setdest 467.653826 541.046000 3.835981"
-$ns_ at 34.000000 "$node_(3) setdest 405.186017 464.081358 13.403290"
-$ns_ at 34.000000 "$node_(4) setdest 490.175129 414.347121 16.126873"
-$ns_ at 34.000000 "$node_(5) setdest 451.792079 504.480069 17.166671"
-$ns_ at 34.000000 "$node_(6) setdest 121.883147 387.777476 10.894815"
-$ns_ at 34.000000 "$node_(7) setdest 138.114893 482.374086 16.622777"
-$ns_ at 34.000000 "$node_(8) setdest 22.994022 423.191629 6.604618"
-$ns_ at 34.000000 "$node_(9) setdest 170.044883 403.068060 10.035948"
-$ns_ at 34.000000 "$node_(10) setdest 107.004140 484.410586 19.534997"
-
-$ns_ at 35.000000 "$node_(1) setdest 517.152845 499.275087 19.252670"
-$ns_ at 35.000000 "$node_(2) setdest 469.760083 536.639542 4.883974"
-$ns_ at 35.000000 "$node_(3) setdest 406.522026 464.499466 1.399905"
-$ns_ at 35.000000 "$node_(4) setdest 486.192447 431.664927 17.769867"
-$ns_ at 35.000000 "$node_(5) setdest 441.963945 520.294525 18.619593"
-$ns_ at 35.000000 "$node_(6) setdest 124.346991 399.961894 12.431032"
-$ns_ at 35.000000 "$node_(7) setdest 124.150809 470.712739 18.192929"
-$ns_ at 35.000000 "$node_(8) setdest 30.684577 426.047417 8.203668"
-$ns_ at 35.000000 "$node_(9) setdest 162.654904 412.053873 11.634287"
-$ns_ at 35.000000 "$node_(10) setdest 107.841118 465.759378 18.669978"
-
-$ns_ at 36.000000 "$node_(1) setdest 536.528998 504.082029 19.963517"
-$ns_ at 36.000000 "$node_(2) setdest 474.403635 532.108135 6.488160"
-$ns_ at 36.000000 "$node_(3) setdest 409.528015 464.468428 3.006149"
-$ns_ at 36.000000 "$node_(4) setdest 484.427652 450.881008 19.296950"
-$ns_ at 36.000000 "$node_(5) setdest 426.470273 532.788799 19.903788"
-$ns_ at 36.000000 "$node_(6) setdest 120.932715 413.505237 13.967084"
-$ns_ at 36.000000 "$node_(7) setdest 105.532349 464.813463 19.530707"
-$ns_ at 36.000000 "$node_(8) setdest 39.253080 430.783080 9.790084"
-$ns_ at 36.000000 "$node_(9) setdest 153.536221 421.645072 13.234104"
-$ns_ at 36.000000 "$node_(10) setdest 117.666134 450.695452 17.984794"
-
-$ns_ at 37.000000 "$node_(1) setdest 554.428542 512.921944 19.963411"
-$ns_ at 37.000000 "$node_(2) setdest 481.127335 527.610678 8.089206"
-$ns_ at 37.000000 "$node_(3) setdest 414.102043 465.013680 4.606412"
-$ns_ at 37.000000 "$node_(4) setdest 489.773407 469.940100 19.794597"
-$ns_ at 37.000000 "$node_(5) setdest 408.058188 532.100718 18.424937"
-$ns_ at 37.000000 "$node_(6) setdest 109.012095 423.192684 15.360592"
-$ns_ at 37.000000 "$node_(7) setdest 85.728992 467.102452 19.935205"
-$ns_ at 37.000000 "$node_(8) setdest 48.361002 437.630220 11.394629"
-$ns_ at 37.000000 "$node_(9) setdest 142.102893 431.075459 14.820701"
-$ns_ at 37.000000 "$node_(10) setdest 131.161133 437.935237 18.572509"
-
-$ns_ at 38.000000 "$node_(1) setdest 566.932229 527.655226 19.323866"
-$ns_ at 38.000000 "$node_(2) setdest 490.148231 524.075412 9.688895"
-$ns_ at 38.000000 "$node_(3) setdest 420.185075 466.255244 6.208443"
-$ns_ at 38.000000 "$node_(4) setdest 501.252538 485.927117 19.681340"
-$ns_ at 38.000000 "$node_(5) setdest 405.981429 521.845202 10.463677"
-$ns_ at 38.000000 "$node_(6) setdest 91.954174 422.557957 17.069726"
-$ns_ at 38.000000 "$node_(7) setdest 66.578736 472.830545 19.988581"
-$ns_ at 38.000000 "$node_(8) setdest 58.379443 445.916629 13.001297"
-$ns_ at 38.000000 "$node_(9) setdest 128.348746 440.069498 16.433785"
-$ns_ at 38.000000 "$node_(10) setdest 139.114132 421.205939 18.523488"
-
-$ns_ at 39.000000 "$node_(1) setdest 567.143596 529.512240 1.869004"
-$ns_ at 39.000000 "$node_(2) setdest 501.202329 521.792270 11.287418"
-$ns_ at 39.000000 "$node_(3) setdest 427.677364 468.446739 7.806218"
-$ns_ at 39.000000 "$node_(4) setdest 511.141012 502.780491 19.540167"
-$ns_ at 39.000000 "$node_(5) setdest 413.374406 514.767835 10.234513"
-$ns_ at 39.000000 "$node_(6) setdest 75.493177 413.507199 18.785117"
-$ns_ at 39.000000 "$node_(7) setdest 46.764183 471.773954 19.842703"
-$ns_ at 39.000000 "$node_(8) setdest 69.942011 454.838968 14.604833"
-$ns_ at 39.000000 "$node_(9) setdest 112.291115 448.251876 18.022176"
-$ns_ at 39.000000 "$node_(10) setdest 141.846200 402.561193 18.843852"
-
-$ns_ at 40.000000 "$node_(1) setdest 564.578377 527.996748 2.979440"
-$ns_ at 40.000000 "$node_(2) setdest 514.059687 520.805131 12.895197"
-$ns_ at 40.000000 "$node_(3) setdest 436.538030 471.609166 9.408100"
-$ns_ at 40.000000 "$node_(4) setdest 519.473141 520.208352 19.317213"
-$ns_ at 40.000000 "$node_(5) setdest 419.858457 504.879506 11.824634"
-$ns_ at 40.000000 "$node_(6) setdest 87.235668 420.830481 13.838951"
-$ns_ at 40.000000 "$node_(7) setdest 64.203274 476.552061 18.081820"
-$ns_ at 40.000000 "$node_(8) setdest 84.829204 454.481993 14.891472"
-$ns_ at 40.000000 "$node_(9) setdest 125.059425 443.474044 13.632954"
-$ns_ at 40.000000 "$node_(10) setdest 148.729503 397.886383 8.320679"
-
-$ns_ at 41.000000 "$node_(1) setdest 560.539286 525.794333 4.600531"
-$ns_ at 41.000000 "$node_(2) setdest 528.559240 520.724740 14.499776"
-$ns_ at 41.000000 "$node_(3) setdest 446.636223 475.986259 11.006019"
-$ns_ at 41.000000 "$node_(4) setdest 526.125692 538.415388 19.384339"
-$ns_ at 41.000000 "$node_(5) setdest 424.189640 492.212788 13.386743"
-$ns_ at 41.000000 "$node_(6) setdest 102.775617 424.456016 15.957271"
-$ns_ at 41.000000 "$node_(7) setdest 83.933552 478.414079 19.817945"
-$ns_ at 41.000000 "$node_(8) setdest 101.442514 452.999884 16.679290"
-$ns_ at 41.000000 "$node_(9) setdest 140.551926 441.300742 15.644194"
-$ns_ at 41.000000 "$node_(10) setdest 158.699125 396.791989 10.029510"
-
-$ns_ at 42.000000 "$node_(1) setdest 554.946328 523.113767 6.202145"
-$ns_ at 42.000000 "$node_(2) setdest 544.648492 520.084739 16.101976"
-$ns_ at 42.000000 "$node_(3) setdest 457.867768 481.716252 12.608743"
-$ns_ at 42.000000 "$node_(4) setdest 542.996006 542.160589 17.281030"
-$ns_ at 42.000000 "$node_(5) setdest 427.836410 477.619041 15.042485"
-$ns_ at 42.000000 "$node_(6) setdest 120.073180 427.461833 17.556783"
-$ns_ at 42.000000 "$node_(7) setdest 103.908927 479.371110 19.998288"
-$ns_ at 42.000000 "$node_(8) setdest 119.693903 451.998492 18.278840"
-$ns_ at 42.000000 "$node_(9) setdest 157.508841 438.167173 17.244020"
-$ns_ at 42.000000 "$node_(10) setdest 170.268449 395.614996 11.629039"
-
-$ns_ at 43.000000 "$node_(1) setdest 548.011229 519.540767 7.801405"
-$ns_ at 43.000000 "$node_(2) setdest 559.640611 513.386833 16.420280"
-$ns_ at 43.000000 "$node_(3) setdest 470.540438 488.142494 14.208911"
-$ns_ at 43.000000 "$node_(4) setdest 557.442321 534.605141 16.302785"
-$ns_ at 43.000000 "$node_(5) setdest 432.038134 461.515754 16.642426"
-$ns_ at 43.000000 "$node_(6) setdest 139.110535 429.593024 19.156274"
-$ns_ at 43.000000 "$node_(7) setdest 123.907121 479.374828 19.998194"
-$ns_ at 43.000000 "$node_(8) setdest 139.427933 451.544210 19.739258"
-$ns_ at 43.000000 "$node_(9) setdest 176.047394 434.787992 18.844013"
-$ns_ at 43.000000 "$node_(10) setdest 183.465605 394.695269 13.229166"
-
-$ns_ at 44.000000 "$node_(1) setdest 540.245181 514.250782 9.396566"
-$ns_ at 44.000000 "$node_(2) setdest 557.197334 501.679640 11.959430"
-$ns_ at 44.000000 "$node_(3) setdest 484.194340 496.104414 15.805733"
-$ns_ at 44.000000 "$node_(4) setdest 569.805764 524.976564 15.670489"
-$ns_ at 44.000000 "$node_(5) setdest 437.187949 444.017164 18.240648"
-$ns_ at 44.000000 "$node_(6) setdest 159.082551 430.599768 19.997374"
-$ns_ at 44.000000 "$node_(7) setdest 143.880972 478.393510 19.997942"
-$ns_ at 44.000000 "$node_(8) setdest 159.427822 451.554805 19.999892"
-$ns_ at 44.000000 "$node_(9) setdest 195.825003 432.098619 19.959623"
-$ns_ at 44.000000 "$node_(10) setdest 198.232049 393.331915 14.829248"
-
-$ns_ at 45.000000 "$node_(1) setdest 531.522089 507.546145 11.002022"
-$ns_ at 45.000000 "$node_(2) setdest 547.805553 492.435892 13.177725"
-$ns_ at 45.000000 "$node_(3) setdest 499.562490 504.256506 17.396455"
-$ns_ at 45.000000 "$node_(4) setdest 586.131716 520.450839 16.941632"
-$ns_ at 45.000000 "$node_(5) setdest 444.245357 425.600998 19.722124"
-$ns_ at 45.000000 "$node_(6) setdest 179.081213 430.697528 19.998900"
-$ns_ at 45.000000 "$node_(7) setdest 163.775015 476.359693 19.997735"
-$ns_ at 45.000000 "$node_(8) setdest 179.427632 451.479451 19.999952"
-$ns_ at 45.000000 "$node_(9) setdest 215.744509 430.326634 19.998166"
-$ns_ at 45.000000 "$node_(10) setdest 214.511122 391.127338 16.427671"
-
-$ns_ at 46.000000 "$node_(1) setdest 521.224593 500.285353 12.599902"
-$ns_ at 46.000000 "$node_(2) setdest 537.140911 482.188971 14.789658"
-$ns_ at 46.000000 "$node_(3) setdest 517.239989 511.230267 19.003350"
-$ns_ at 46.000000 "$node_(4) setdest 596.737679 531.230366 15.122323"
-$ns_ at 46.000000 "$node_(5) setdest 450.567683 406.626744 19.999853"
-$ns_ at 46.000000 "$node_(6) setdest 199.077088 430.293213 19.999963"
-$ns_ at 46.000000 "$node_(7) setdest 183.547456 473.359299 19.998794"
-$ns_ at 46.000000 "$node_(8) setdest 199.426772 451.293967 19.999999"
-$ns_ at 46.000000 "$node_(9) setdest 235.727172 429.545275 19.997933"
-$ns_ at 46.000000 "$node_(10) setdest 232.313482 388.287908 18.027380"
-
-$ns_ at 47.000000 "$node_(1) setdest 509.132728 492.839445 14.200519"
-$ns_ at 47.000000 "$node_(2) setdest 529.956513 467.566241 16.292323"
-$ns_ at 47.000000 "$node_(3) setdest 530.443547 512.706866 13.285868"
-$ns_ at 47.000000 "$node_(4) setdest 593.888061 544.610217 13.679939"
-$ns_ at 47.000000 "$node_(5) setdest 455.365546 387.217155 19.993791"
-$ns_ at 47.000000 "$node_(6) setdest 219.066969 429.662345 19.999833"
-$ns_ at 47.000000 "$node_(7) setdest 203.164862 469.479130 19.997458"
-$ns_ at 47.000000 "$node_(8) setdest 219.417361 451.789967 19.996742"
-$ns_ at 47.000000 "$node_(9) setdest 255.709496 428.728816 19.998997"
-$ns_ at 47.000000 "$node_(10) setdest 251.796297 386.439234 19.570326"
-
-$ns_ at 48.000000 "$node_(1) setdest 494.811654 486.211110 15.780621"
-$ns_ at 48.000000 "$node_(2) setdest 523.405915 450.824130 17.978004"
-$ns_ at 48.000000 "$node_(3) setdest 527.369831 511.982215 3.157982"
-$ns_ at 48.000000 "$node_(4) setdest 596.143329 540.896760 4.344652"
-$ns_ at 48.000000 "$node_(5) setdest 452.127739 368.087344 19.401882"
-$ns_ at 48.000000 "$node_(6) setdest 239.040183 428.633694 19.999686"
-$ns_ at 48.000000 "$node_(7) setdest 222.507492 464.407083 19.996575"
-$ns_ at 48.000000 "$node_(8) setdest 239.319828 453.699710 19.993882"
-$ns_ at 48.000000 "$node_(9) setdest 275.658454 427.303064 19.999843"
-$ns_ at 48.000000 "$node_(10) setdest 271.767272 385.393628 19.998328"
-
-$ns_ at 49.000000 "$node_(1) setdest 477.936814 482.029186 17.385301"
-$ns_ at 49.000000 "$node_(2) setdest 511.589591 435.283606 19.522638"
-$ns_ at 49.000000 "$node_(3) setdest 522.811495 510.411820 4.821262"
-$ns_ at 49.000000 "$node_(4) setdest 596.364469 534.992612 5.908287"
-$ns_ at 49.000000 "$node_(5) setdest 441.999585 365.539662 10.443668"
-$ns_ at 49.000000 "$node_(6) setdest 259.000403 427.373742 19.999946"
-$ns_ at 49.000000 "$node_(7) setdest 241.427668 457.938519 19.995384"
-$ns_ at 49.000000 "$node_(8) setdest 258.949550 457.488811 19.992080"
-$ns_ at 49.000000 "$node_(9) setdest 295.601472 425.794473 19.999995"
-$ns_ at 49.000000 "$node_(10) setdest 291.764641 385.099501 19.999532"
-
-$ns_ at 50.000000 "$node_(1) setdest 460.251786 475.213570 18.952911"
-$ns_ at 50.000000 "$node_(2) setdest 494.572859 425.450831 19.653312"
-$ns_ at 50.000000 "$node_(3) setdest 516.437962 509.551212 6.431374"
-$ns_ at 50.000000 "$node_(4) setdest 595.905073 527.487889 7.518771"
-$ns_ at 50.000000 "$node_(5) setdest 435.704871 370.756310 8.175380"
-$ns_ at 50.000000 "$node_(6) setdest 278.984020 426.603522 19.998455"
-$ns_ at 50.000000 "$node_(7) setdest 259.940900 450.373613 19.999189"
-$ns_ at 50.000000 "$node_(8) setdest 278.151718 463.062180 19.994642"
-$ns_ at 50.000000 "$node_(9) setdest 315.561187 424.532692 19.999558"
-$ns_ at 50.000000 "$node_(10) setdest 311.760339 384.687257 19.999947"
-
-$ns_ at 51.000000 "$node_(1) setdest 445.750485 461.773203 19.771980"
-$ns_ at 51.000000 "$node_(2) setdest 477.062237 431.160008 18.417833"
-$ns_ at 51.000000 "$node_(3) setdest 508.417207 509.293695 8.024888"
-$ns_ at 51.000000 "$node_(4) setdest 596.138322 518.372789 9.118084"
-$ns_ at 51.000000 "$node_(5) setdest 427.847555 376.601237 9.792885"
-$ns_ at 51.000000 "$node_(6) setdest 298.977580 426.115506 19.999515"
-$ns_ at 51.000000 "$node_(7) setdest 278.425975 442.746479 19.996779"
-$ns_ at 51.000000 "$node_(8) setdest 297.021088 469.690556 19.999713"
-$ns_ at 51.000000 "$node_(9) setdest 335.550946 423.983930 19.997290"
-$ns_ at 51.000000 "$node_(10) setdest 331.755079 384.949165 19.996455"
-
-$ns_ at 52.000000 "$node_(1) setdest 440.756113 442.613683 19.799772"
-$ns_ at 52.000000 "$node_(2) setdest 463.491729 442.499863 17.684767"
-$ns_ at 52.000000 "$node_(3) setdest 498.797256 509.801163 9.633327"
-$ns_ at 52.000000 "$node_(4) setdest 595.872849 507.661271 10.714807"
-$ns_ at 52.000000 "$node_(5) setdest 421.543150 385.787102 11.141168"
-$ns_ at 52.000000 "$node_(6) setdest 318.966418 425.467482 19.999339"
-$ns_ at 52.000000 "$node_(7) setdest 297.432455 436.535728 19.995493"
-$ns_ at 52.000000 "$node_(8) setdest 316.154504 475.504807 19.997327"
-$ns_ at 52.000000 "$node_(9) setdest 355.519975 424.976200 19.993668"
-$ns_ at 52.000000 "$node_(10) setdest 351.681172 386.619992 19.996020"
-
-$ns_ at 53.000000 "$node_(1) setdest 439.775796 422.648723 19.989013"
-$ns_ at 53.000000 "$node_(2) setdest 454.163430 457.931863 18.032299"
-$ns_ at 53.000000 "$node_(3) setdest 487.566288 509.968935 11.232221"
-$ns_ at 53.000000 "$node_(4) setdest 593.366650 495.626354 12.293098"
-$ns_ at 53.000000 "$node_(5) setdest 426.618346 394.729658 10.282360"
-$ns_ at 53.000000 "$node_(6) setdest 338.963772 425.552181 19.997533"
-$ns_ at 53.000000 "$node_(7) setdest 316.854629 431.777866 19.996452"
-$ns_ at 53.000000 "$node_(8) setdest 335.626595 480.039122 19.993058"
-$ns_ at 53.000000 "$node_(9) setdest 375.323130 427.689354 19.988150"
-$ns_ at 53.000000 "$node_(10) setdest 371.379909 390.033338 19.992278"
-
-$ns_ at 54.000000 "$node_(1) setdest 445.215882 403.632184 19.779365"
-$ns_ at 54.000000 "$node_(2) setdest 454.059564 475.725275 17.793715"
-$ns_ at 54.000000 "$node_(3) setdest 474.763417 509.199397 12.825977"
-$ns_ at 54.000000 "$node_(4) setdest 586.634251 483.521630 13.850977"
-$ns_ at 54.000000 "$node_(5) setdest 434.740699 390.416312 9.196607"
-$ns_ at 54.000000 "$node_(6) setdest 358.922646 426.804947 19.998152"
-$ns_ at 54.000000 "$node_(7) setdest 336.584130 428.536703 19.993958"
-$ns_ at 54.000000 "$node_(8) setdest 355.462297 482.552656 19.994323"
-$ns_ at 54.000000 "$node_(9) setdest 394.479217 433.330580 19.969455"
-$ns_ at 54.000000 "$node_(10) setdest 390.644077 395.375055 19.991051"
-
-$ns_ at 55.000000 "$node_(1) setdest 453.489395 385.467485 19.960143"
-$ns_ at 55.000000 "$node_(2) setdest 462.180023 491.875553 18.076873"
-$ns_ at 55.000000 "$node_(3) setdest 460.781091 505.762029 14.398644"
-$ns_ at 55.000000 "$node_(4) setdest 575.183381 473.135665 15.459324"
-$ns_ at 55.000000 "$node_(5) setdest 443.385083 383.339482 11.171700"
-$ns_ at 55.000000 "$node_(6) setdest 378.818295 428.840950 19.999553"
-$ns_ at 55.000000 "$node_(7) setdest 356.438978 426.133796 19.999724"
-$ns_ at 55.000000 "$node_(8) setdest 375.442154 483.043104 19.985875"
-$ns_ at 55.000000 "$node_(9) setdest 411.603795 443.510768 19.922032"
-$ns_ at 55.000000 "$node_(10) setdest 409.167270 402.886591 19.988293"
-
-$ns_ at 56.000000 "$node_(1) setdest 459.358776 366.350314 19.997896"
-$ns_ at 56.000000 "$node_(2) setdest 474.439207 506.513884 19.093672"
-$ns_ at 56.000000 "$node_(3) setdest 448.331346 496.551801 15.486266"
-$ns_ at 56.000000 "$node_(4) setdest 559.796949 465.725065 17.078034"
-$ns_ at 56.000000 "$node_(5) setdest 453.233562 375.205933 12.772907"
-$ns_ at 56.000000 "$node_(6) setdest 398.640054 431.491358 19.998170"
-$ns_ at 56.000000 "$node_(7) setdest 376.341269 424.293425 19.987200"
-$ns_ at 56.000000 "$node_(8) setdest 395.289271 480.727854 19.981702"
-$ns_ at 56.000000 "$node_(9) setdest 424.686463 458.541108 19.926549"
-$ns_ at 56.000000 "$node_(10) setdest 426.588462 412.682524 19.986450"
-
-$ns_ at 57.000000 "$node_(1) setdest 474.147494 357.589355 17.188968"
-$ns_ at 57.000000 "$node_(2) setdest 487.397435 521.211648 19.594386"
-$ns_ at 57.000000 "$node_(3) setdest 449.175044 489.763733 6.840299"
-$ns_ at 57.000000 "$node_(4) setdest 541.945847 460.100331 18.716289"
-$ns_ at 57.000000 "$node_(5) setdest 461.910819 364.190126 14.022938"
-$ns_ at 57.000000 "$node_(6) setdest 418.176323 435.711193 19.986816"
-$ns_ at 57.000000 "$node_(7) setdest 395.624998 428.517124 19.740868"
-$ns_ at 57.000000 "$node_(8) setdest 414.491546 475.216368 19.977584"
-$ns_ at 57.000000 "$node_(9) setdest 432.332273 476.914703 19.900939"
-$ns_ at 57.000000 "$node_(10) setdest 442.302058 425.016869 19.976315"
-
-$ns_ at 58.000000 "$node_(1) setdest 481.754901 367.368742 12.389877"
-$ns_ at 58.000000 "$node_(2) setdest 501.253150 535.247087 19.722434"
-$ns_ at 58.000000 "$node_(3) setdest 452.555239 490.811571 3.538882"
-$ns_ at 58.000000 "$node_(4) setdest 523.200618 453.356899 19.921282"
-$ns_ at 58.000000 "$node_(5) setdest 462.037992 362.225513 1.968725"
-$ns_ at 58.000000 "$node_(6) setdest 436.692511 443.161055 19.958699"
-$ns_ at 58.000000 "$node_(7) setdest 407.232993 444.170234 19.487570"
-$ns_ at 58.000000 "$node_(8) setdest 432.402128 466.376774 19.973166"
-$ns_ at 58.000000 "$node_(9) setdest 433.371712 496.829333 19.941738"
-$ns_ at 58.000000 "$node_(10) setdest 455.460442 440.041839 19.972301"
-
-$ns_ at 59.000000 "$node_(1) setdest 490.840101 378.013714 13.994866"
-$ns_ at 59.000000 "$node_(2) setdest 517.254096 544.656606 18.562578"
-$ns_ at 59.000000 "$node_(3) setdest 456.805761 493.906270 5.257765"
-$ns_ at 59.000000 "$node_(4) setdest 505.296597 444.480311 19.983688"
-$ns_ at 59.000000 "$node_(5) setdest 459.985759 364.047842 2.744548"
-$ns_ at 59.000000 "$node_(6) setdest 452.558464 455.227354 19.932988"
-$ns_ at 59.000000 "$node_(7) setdest 405.781902 462.093611 17.982022"
-$ns_ at 59.000000 "$node_(8) setdest 448.131072 454.084488 19.962465"
-$ns_ at 59.000000 "$node_(9) setdest 431.643951 516.751552 19.996999"
-$ns_ at 59.000000 "$node_(10) setdest 465.450760 457.326282 19.963928"
-
-$ns_ at 60.000000 "$node_(1) setdest 498.659527 391.489267 15.579922"
-$ns_ at 60.000000 "$node_(2) setdest 534.755136 543.334674 17.550895"
-$ns_ at 60.000000 "$node_(3) setdest 462.401977 497.870630 6.858118"
-$ns_ at 60.000000 "$node_(4) setdest 488.791604 433.220713 19.979823"
-$ns_ at 60.000000 "$node_(5) setdest 456.842494 367.045729 4.343667"
-$ns_ at 60.000000 "$node_(6) setdest 465.331500 470.591333 19.980047"
-$ns_ at 60.000000 "$node_(7) setdest 408.815556 476.318798 14.545068"
-$ns_ at 60.000000 "$node_(8) setdest 460.493008 438.434407 19.943483"
-$ns_ at 60.000000 "$node_(9) setdest 438.396275 534.407383 18.902969"
-$ns_ at 60.000000 "$node_(10) setdest 472.292912 476.109195 19.990319"
-
-$ns_ at 61.000000 "$node_(1) setdest 506.422494 406.848972 17.210003"
-$ns_ at 61.000000 "$node_(2) setdest 550.122906 534.408750 17.771901"
-$ns_ at 61.000000 "$node_(3) setdest 469.441169 502.553605 8.454613"
-$ns_ at 61.000000 "$node_(4) setdest 473.810761 419.970774 19.999664"
-$ns_ at 61.000000 "$node_(5) setdest 452.869841 371.468100 5.944690"
-$ns_ at 61.000000 "$node_(6) setdest 475.369253 487.873233 19.985509"
-$ns_ at 61.000000 "$node_(7) setdest 420.177106 474.634595 11.485703"
-$ns_ at 61.000000 "$node_(8) setdest 468.519800 420.146652 19.971764"
-$ns_ at 61.000000 "$node_(9) setdest 456.064353 537.336055 17.909162"
-$ns_ at 61.000000 "$node_(10) setdest 480.398446 494.324173 19.937028"
-
-$ns_ at 62.000000 "$node_(1) setdest 514.243671 423.949759 18.804460"
-$ns_ at 62.000000 "$node_(2) setdest 558.597008 518.822165 17.741252"
-$ns_ at 62.000000 "$node_(3) setdest 478.289486 507.332608 10.056420"
-$ns_ at 62.000000 "$node_(4) setdest 459.228341 406.299144 19.989007"
-$ns_ at 62.000000 "$node_(5) setdest 448.065246 377.284900 7.544488"
-$ns_ at 62.000000 "$node_(6) setdest 483.292150 506.217705 19.982291"
-$ns_ at 62.000000 "$node_(7) setdest 431.806592 467.919195 13.429130"
-$ns_ at 62.000000 "$node_(8) setdest 473.157337 400.709492 19.982741"
-$ns_ at 62.000000 "$node_(9) setdest 471.569985 531.759731 16.477864"
-$ns_ at 62.000000 "$node_(10) setdest 493.533931 509.329068 19.942113"
-
-$ns_ at 63.000000 "$node_(1) setdest 526.606177 439.546625 19.902105"
-$ns_ at 63.000000 "$node_(2) setdest 563.865355 500.625921 18.943568"
-$ns_ at 63.000000 "$node_(3) setdest 488.865584 512.231308 11.655519"
-$ns_ at 63.000000 "$node_(4) setdest 443.896167 393.463964 19.995435"
-$ns_ at 63.000000 "$node_(5) setdest 443.134296 384.956898 9.119968"
-$ns_ at 63.000000 "$node_(6) setdest 483.704532 525.909424 19.696036"
-$ns_ at 63.000000 "$node_(7) setdest 441.488756 456.383377 15.060524"
-$ns_ at 63.000000 "$node_(8) setdest 471.609423 381.023538 19.746717"
-$ns_ at 63.000000 "$node_(9) setdest 484.411309 520.929706 16.798483"
-$ns_ at 63.000000 "$node_(10) setdest 509.195143 521.746549 19.986681"
-
-$ns_ at 64.000000 "$node_(1) setdest 540.433816 453.956062 19.970865"
-$ns_ at 64.000000 "$node_(2) setdest 568.124533 481.658093 19.440142"
-$ns_ at 64.000000 "$node_(3) setdest 501.350038 516.664198 13.248098"
-$ns_ at 64.000000 "$node_(4) setdest 433.455434 376.647829 19.793718"
-$ns_ at 64.000000 "$node_(5) setdest 440.254466 395.258128 10.696204"
-$ns_ at 64.000000 "$node_(6) setdest 469.652755 537.742107 18.370216"
-$ns_ at 64.000000 "$node_(7) setdest 449.511886 441.764181 16.676076"
-$ns_ at 64.000000 "$node_(8) setdest 457.550576 367.766860 19.323320"
-$ns_ at 64.000000 "$node_(9) setdest 498.202162 508.754862 18.396045"
-$ns_ at 64.000000 "$node_(10) setdest 527.839755 528.576108 19.856093"
-
-$ns_ at 65.000000 "$node_(1) setdest 536.004799 446.599409 8.586997"
-$ns_ at 65.000000 "$node_(2) setdest 564.983309 461.913673 19.992735"
-$ns_ at 65.000000 "$node_(3) setdest 500.747238 516.306833 0.700769"
-$ns_ at 65.000000 "$node_(4) setdest 438.545894 357.691580 19.627842"
-$ns_ at 65.000000 "$node_(5) setdest 441.586829 385.431591 9.916452"
-$ns_ at 65.000000 "$node_(6) setdest 457.118274 526.488725 16.844935"
-$ns_ at 65.000000 "$node_(7) setdest 457.806607 425.470338 18.283646"
-$ns_ at 65.000000 "$node_(8) setdest 439.123220 364.402269 18.732003"
-$ns_ at 65.000000 "$node_(9) setdest 510.416367 493.167415 19.802912"
-$ns_ at 65.000000 "$node_(10) setdest 547.813104 529.300629 19.986485"
-
-$ns_ at 66.000000 "$node_(1) setdest 535.511187 436.310624 10.300619"
-$ns_ at 66.000000 "$node_(2) setdest 562.492130 442.069901 19.999531"
-$ns_ at 66.000000 "$node_(3) setdest 500.517193 514.277017 2.042810"
-$ns_ at 66.000000 "$node_(4) setdest 445.642038 338.993091 19.999719"
-$ns_ at 66.000000 "$node_(5) setdest 444.691682 374.116179 11.733655"
-$ns_ at 66.000000 "$node_(6) setdest 455.508240 510.110942 16.456730"
-$ns_ at 66.000000 "$node_(7) setdest 468.428808 408.858654 19.717485"
-$ns_ at 66.000000 "$node_(8) setdest 419.931073 364.342807 19.192239"
-$ns_ at 66.000000 "$node_(9) setdest 524.816169 479.714481 19.706235"
-$ns_ at 66.000000 "$node_(10) setdest 567.683020 530.920241 19.935814"
-
-$ns_ at 67.000000 "$node_(1) setdest 534.977282 424.421906 11.900701"
-$ns_ at 67.000000 "$node_(2) setdest 560.569724 422.162987 19.999522"
-$ns_ at 67.000000 "$node_(3) setdest 500.250852 510.644079 3.642688"
-$ns_ at 67.000000 "$node_(4) setdest 452.955902 320.378413 19.999972"
-$ns_ at 67.000000 "$node_(5) setdest 448.073535 361.217857 13.334303"
-$ns_ at 67.000000 "$node_(6) setdest 451.399100 495.313815 15.357083"
-$ns_ at 67.000000 "$node_(7) setdest 481.733772 393.932468 19.995327"
-$ns_ at 67.000000 "$node_(8) setdest 408.322022 365.329378 11.650896"
-$ns_ at 67.000000 "$node_(9) setdest 539.158447 466.290889 19.644179"
-$ns_ at 67.000000 "$node_(10) setdest 586.678542 530.162271 19.010638"
-
-$ns_ at 68.000000 "$node_(1) setdest 534.442950 410.931909 13.500575"
-$ns_ at 68.000000 "$node_(2) setdest 558.901130 402.232965 19.999749"
-$ns_ at 68.000000 "$node_(3) setdest 500.103546 505.403612 5.242537"
-$ns_ at 68.000000 "$node_(4) setdest 460.080618 301.691006 19.999519"
-$ns_ at 68.000000 "$node_(5) setdest 452.196525 346.864412 14.933869"
-$ns_ at 68.000000 "$node_(6) setdest 438.416880 485.903560 16.034056"
-$ns_ at 68.000000 "$node_(7) setdest 492.545093 377.214664 19.909034"
-$ns_ at 68.000000 "$node_(8) setdest 416.839668 364.609333 8.548026"
-$ns_ at 68.000000 "$node_(9) setdest 555.040544 454.694707 19.665006"
-$ns_ at 68.000000 "$node_(10) setdest 586.825175 529.031950 1.139792"
-
-$ns_ at 69.000000 "$node_(1) setdest 534.282344 395.832941 15.099822"
-$ns_ at 69.000000 "$node_(2) setdest 557.329589 382.294855 19.999950"
-$ns_ at 69.000000 "$node_(3) setdest 500.199783 498.561725 6.842563"
-$ns_ at 69.000000 "$node_(4) setdest 466.364502 282.705492 19.998423"
-$ns_ at 69.000000 "$node_(5) setdest 457.330300 331.148052 16.533591"
-$ns_ at 69.000000 "$node_(6) setdest 422.274174 478.513804 17.753744"
-$ns_ at 69.000000 "$node_(7) setdest 503.862909 361.836359 19.094115"
-$ns_ at 69.000000 "$node_(8) setdest 427.020554 367.160258 10.495602"
-$ns_ at 69.000000 "$node_(9) setdest 571.735283 444.352269 19.638745"
-$ns_ at 69.000000 "$node_(10) setdest 585.455531 526.966140 2.478608"
-
-$ns_ at 70.000000 "$node_(1) setdest 534.838474 379.142686 16.699517"
-$ns_ at 70.000000 "$node_(2) setdest 555.525020 362.376742 19.999692"
-$ns_ at 70.000000 "$node_(3) setdest 500.519465 490.124854 8.442926"
-$ns_ at 70.000000 "$node_(4) setdest 471.472022 263.373599 19.995221"
-$ns_ at 70.000000 "$node_(5) setdest 463.120393 313.962864 18.134383"
-$ns_ at 70.000000 "$node_(6) setdest 408.213514 466.311334 18.617262"
-$ns_ at 70.000000 "$node_(7) setdest 507.696506 363.297112 4.102471"
-$ns_ at 70.000000 "$node_(8) setdest 439.013807 368.678079 12.088916"
-$ns_ at 70.000000 "$node_(9) setdest 589.464572 437.178961 19.125482"
-$ns_ at 70.000000 "$node_(10) setdest 583.204839 523.564669 4.078679"
-
-$ns_ at 71.000000 "$node_(1) setdest 536.112282 360.887514 18.299561"
-$ns_ at 71.000000 "$node_(2) setdest 553.523133 342.477773 19.999413"
-$ns_ at 71.000000 "$node_(3) setdest 501.048110 480.096108 10.042669"
-$ns_ at 71.000000 "$node_(4) setdest 475.511485 243.786853 19.998948"
-$ns_ at 71.000000 "$node_(5) setdest 469.394485 295.340571 19.650802"
-$ns_ at 71.000000 "$node_(6) setdest 409.735707 449.316228 17.063139"
-$ns_ at 71.000000 "$node_(7) setdest 509.753088 368.161673 5.281428"
-$ns_ at 71.000000 "$node_(8) setdest 452.539013 366.922685 13.638644"
-$ns_ at 71.000000 "$node_(9) setdest 593.411094 420.224329 17.407888"
-$ns_ at 71.000000 "$node_(10) setdest 580.200954 518.748793 5.675913"
-
-$ns_ at 72.000000 "$node_(1) setdest 538.243058 341.252788 19.750004"
-$ns_ at 72.000000 "$node_(2) setdest 552.067476 322.531052 19.999766"
-$ns_ at 72.000000 "$node_(3) setdest 502.043198 468.496468 11.642244"
-$ns_ at 72.000000 "$node_(4) setdest 478.483272 224.011916 19.996990"
-$ns_ at 72.000000 "$node_(5) setdest 475.540955 276.308901 19.999589"
-$ns_ at 72.000000 "$node_(6) setdest 417.775607 434.844392 16.555181"
-$ns_ at 72.000000 "$node_(7) setdest 510.902737 374.952179 6.887138"
-$ns_ at 72.000000 "$node_(8) setdest 467.088300 362.216077 15.291629"
-$ns_ at 72.000000 "$node_(9) setdest 588.386379 404.792399 16.229363"
-$ns_ at 72.000000 "$node_(10) setdest 576.937804 512.244383 7.277053"
-
-$ns_ at 73.000000 "$node_(1) setdest 540.337760 321.362851 19.999934"
-$ns_ at 73.000000 "$node_(2) setdest 550.508182 302.593413 19.998521"
-$ns_ at 73.000000 "$node_(3) setdest 503.738640 455.363500 13.241955"
-$ns_ at 73.000000 "$node_(4) setdest 480.607929 204.125582 19.999511"
-$ns_ at 73.000000 "$node_(5) setdest 482.491192 257.559586 19.996064"
-$ns_ at 73.000000 "$node_(6) setdest 424.060892 418.184577 17.806018"
-$ns_ at 73.000000 "$node_(7) setdest 511.222289 383.432144 8.485983"
-$ns_ at 73.000000 "$node_(8) setdest 483.575039 358.506602 16.898898"
-$ns_ at 73.000000 "$node_(9) setdest 581.016072 390.553508 16.033323"
-$ns_ at 73.000000 "$node_(10) setdest 573.633501 504.005362 8.876930"
-
-$ns_ at 74.000000 "$node_(1) setdest 542.640833 301.496124 19.999775"
-$ns_ at 74.000000 "$node_(2) setdest 547.211487 282.875900 19.991211"
-$ns_ at 74.000000 "$node_(3) setdest 506.228546 440.731667 14.842176"
-$ns_ at 74.000000 "$node_(4) setdest 483.949062 184.414401 19.992345"
-$ns_ at 74.000000 "$node_(5) setdest 490.772371 239.358717 19.996239"
-$ns_ at 74.000000 "$node_(6) setdest 428.971719 399.458697 19.359101"
-$ns_ at 74.000000 "$node_(7) setdest 510.977845 393.521870 10.092687"
-$ns_ at 74.000000 "$node_(8) setdest 501.649850 360.807649 18.220692"
-$ns_ at 74.000000 "$node_(9) setdest 574.169947 374.218269 17.711845"
-$ns_ at 74.000000 "$node_(10) setdest 569.666315 494.308359 10.477138"
-
-$ns_ at 75.000000 "$node_(1) setdest 545.286982 281.676690 19.995301"
-$ns_ at 75.000000 "$node_(2) setdest 541.579801 263.698851 19.986873"
-$ns_ at 75.000000 "$node_(3) setdest 509.521933 424.622555 16.442319"
-$ns_ at 75.000000 "$node_(4) setdest 489.316472 165.158057 19.990394"
-$ns_ at 75.000000 "$node_(5) setdest 499.170013 221.211394 19.996143"
-$ns_ at 75.000000 "$node_(6) setdest 433.995690 380.248856 19.855938"
-$ns_ at 75.000000 "$node_(7) setdest 509.830491 405.143663 11.678292"
-$ns_ at 75.000000 "$node_(8) setdest 514.956828 375.067165 19.504088"
-$ns_ at 75.000000 "$node_(9) setdest 563.225009 358.537277 19.122897"
-$ns_ at 75.000000 "$node_(10) setdest 564.059199 483.616863 12.072607"
-
-$ns_ at 76.000000 "$node_(1) setdest 550.377288 262.356101 19.979900"
-$ns_ at 76.000000 "$node_(2) setdest 533.540653 245.403103 19.984051"
-$ns_ at 76.000000 "$node_(3) setdest 513.154562 406.949557 18.042473"
-$ns_ at 76.000000 "$node_(4) setdest 496.890661 146.658823 19.989748"
-$ns_ at 76.000000 "$node_(5) setdest 507.041942 202.829163 19.996842"
-$ns_ at 76.000000 "$node_(6) setdest 441.406995 362.103882 19.600192"
-$ns_ at 76.000000 "$node_(7) setdest 506.263148 417.944045 13.288180"
-$ns_ at 76.000000 "$node_(8) setdest 523.622151 393.089514 19.997322"
-$ns_ at 76.000000 "$node_(9) setdest 562.694870 356.369564 2.231598"
-$ns_ at 76.000000 "$node_(10) setdest 556.855146 471.989381 13.678331"
-
-$ns_ at 77.000000 "$node_(1) setdest 559.088417 244.398391 19.959036"
-$ns_ at 77.000000 "$node_(2) setdest 521.840951 229.244414 19.949593"
-$ns_ at 77.000000 "$node_(3) setdest 516.301733 387.623702 19.580433"
-$ns_ at 77.000000 "$node_(4) setdest 505.320440 128.522356 19.999815"
-$ns_ at 77.000000 "$node_(5) setdest 515.254078 184.596382 19.996837"
-$ns_ at 77.000000 "$node_(6) setdest 437.257639 351.072545 11.785905"
-$ns_ at 77.000000 "$node_(7) setdest 500.846086 431.809163 14.885767"
-$ns_ at 77.000000 "$node_(8) setdest 529.413794 412.094108 19.867504"
-$ns_ at 77.000000 "$node_(9) setdest 565.572234 358.356299 3.496619"
-$ns_ at 77.000000 "$node_(10) setdest 548.808724 459.002515 15.277551"
-
-$ns_ at 78.000000 "$node_(1) setdest 568.615890 226.866730 19.953243"
-$ns_ at 78.000000 "$node_(2) setdest 506.765408 216.107743 19.996103"
-$ns_ at 78.000000 "$node_(3) setdest 518.586099 367.756661 19.997941"
-$ns_ at 78.000000 "$node_(4) setdest 511.394728 109.548785 19.922183"
-$ns_ at 78.000000 "$node_(5) setdest 521.978222 165.767794 19.993245"
-$ns_ at 78.000000 "$node_(6) setdest 429.959797 352.164602 7.379098"
-$ns_ at 78.000000 "$node_(7) setdest 494.140339 446.876872 16.492510"
-$ns_ at 78.000000 "$node_(8) setdest 525.963760 430.106023 18.339351"
-$ns_ at 78.000000 "$node_(9) setdest 569.000240 362.124933 5.094490"
-$ns_ at 78.000000 "$node_(10) setdest 540.470647 444.327845 16.878077"
-
-$ns_ at 79.000000 "$node_(1) setdest 574.185687 207.679959 19.978859"
-$ns_ at 79.000000 "$node_(2) setdest 491.733402 202.925804 19.993117"
-$ns_ at 79.000000 "$node_(3) setdest 519.783067 347.795031 19.997485"
-$ns_ at 79.000000 "$node_(4) setdest 508.990521 89.908093 19.787293"
-$ns_ at 79.000000 "$node_(5) setdest 526.722730 146.349523 19.989487"
-$ns_ at 79.000000 "$node_(6) setdest 421.402925 354.646309 8.909485"
-$ns_ at 79.000000 "$node_(7) setdest 484.722595 462.296802 18.068430"
-$ns_ at 79.000000 "$node_(8) setdest 513.980626 443.368125 17.873971"
-$ns_ at 79.000000 "$node_(9) setdest 572.479374 367.825573 6.678447"
-$ns_ at 79.000000 "$node_(10) setdest 529.744275 429.315243 18.450834"
-
-$ns_ at 80.000000 "$node_(1) setdest 576.539904 187.859407 19.959875"
-$ns_ at 80.000000 "$node_(2) setdest 480.207033 186.703672 19.900119"
-$ns_ at 80.000000 "$node_(3) setdest 519.812887 327.797852 19.997201"
-$ns_ at 80.000000 "$node_(4) setdest 497.292409 73.848971 19.868096"
-$ns_ at 80.000000 "$node_(5) setdest 528.886672 126.481962 19.985060"
-$ns_ at 80.000000 "$node_(6) setdest 415.020974 363.015006 10.524466"
-$ns_ at 80.000000 "$node_(7) setdest 471.817545 477.042190 19.595070"
-$ns_ at 80.000000 "$node_(8) setdest 503.184441 458.887502 18.905255"
-$ns_ at 80.000000 "$node_(9) setdest 575.661628 375.491501 8.300193"
-$ns_ at 80.000000 "$node_(10) setdest 514.499292 416.740217 19.762106"
-
-$ns_ at 81.000000 "$node_(1) setdest 574.626392 167.968199 19.983034"
-$ns_ at 81.000000 "$node_(2) setdest 475.821624 167.311287 19.882063"
-$ns_ at 81.000000 "$node_(3) setdest 518.646194 307.835016 19.996899"
-$ns_ at 81.000000 "$node_(4) setdest 483.578324 59.304461 19.990471"
-$ns_ at 81.000000 "$node_(5) setdest 527.651007 106.553198 19.967035"
-$ns_ at 81.000000 "$node_(6) setdest 410.440591 374.312692 12.190882"
-$ns_ at 81.000000 "$node_(7) setdest 456.292988 489.616829 19.978324"
-$ns_ at 81.000000 "$node_(8) setdest 498.005915 477.169448 19.001228"
-$ns_ at 81.000000 "$node_(9) setdest 579.725346 384.508368 9.890283"
-$ns_ at 81.000000 "$node_(10) setdest 495.634540 410.515884 19.865074"
-
-$ns_ at 82.000000 "$node_(1) setdest 573.744222 148.036265 19.951446"
-$ns_ at 82.000000 "$node_(2) setdest 474.558082 147.369780 19.981497"
-$ns_ at 82.000000 "$node_(3) setdest 516.187480 287.990063 19.996686"
-$ns_ at 82.000000 "$node_(4) setdest 474.515345 41.610136 19.880309"
-$ns_ at 82.000000 "$node_(5) setdest 522.091375 87.379602 19.963374"
-$ns_ at 82.000000 "$node_(6) setdest 414.780703 386.764139 13.186170"
-$ns_ at 82.000000 "$node_(7) setdest 438.763875 499.134151 19.946158"
-$ns_ at 82.000000 "$node_(8) setdest 500.792450 494.938482 17.986199"
-$ns_ at 82.000000 "$node_(9) setdest 588.726105 391.049918 11.126794"
-$ns_ at 82.000000 "$node_(10) setdest 475.806091 412.296842 19.908270"
-
-$ns_ at 83.000000 "$node_(1) setdest 577.404142 128.397041 19.977341"
-$ns_ at 83.000000 "$node_(2) setdest 471.772322 127.583434 19.981491"
-$ns_ at 83.000000 "$node_(3) setdest 512.431069 268.349770 19.996293"
-$ns_ at 83.000000 "$node_(4) setdest 467.791067 22.805362 19.970865"
-$ns_ at 83.000000 "$node_(5) setdest 513.352198 69.412545 19.979699"
-$ns_ at 83.000000 "$node_(6) setdest 426.772346 396.441652 15.409535"
-$ns_ at 83.000000 "$node_(7) setdest 419.593750 498.212291 19.192278"
-$ns_ at 83.000000 "$node_(8) setdest 513.064464 506.922013 17.152474"
-$ns_ at 83.000000 "$node_(9) setdest 594.729903 387.107313 7.182599"
-$ns_ at 83.000000 "$node_(10) setdest 456.101092 415.641689 19.986870"
-
-$ns_ at 84.000000 "$node_(1) setdest 583.213841 109.262849 19.996747"
-$ns_ at 84.000000 "$node_(2) setdest 476.419501 108.372979 19.764560"
-$ns_ at 84.000000 "$node_(3) setdest 507.266385 249.033080 19.995211"
-$ns_ at 84.000000 "$node_(4) setdest 462.492387 11.625346 12.372096"
-$ns_ at 84.000000 "$node_(5) setdest 502.089366 52.902858 19.985523"
-$ns_ at 84.000000 "$node_(6) setdest 437.511332 409.573265 16.963640"
-$ns_ at 84.000000 "$node_(7) setdest 412.014189 481.555847 18.299914"
-$ns_ at 84.000000 "$node_(8) setdest 526.654692 519.163066 18.290371"
-$ns_ at 84.000000 "$node_(9) setdest 592.714197 381.218901 6.223863"
-$ns_ at 84.000000 "$node_(10) setdest 436.259652 418.153011 19.999737"
-
-$ns_ at 85.000000 "$node_(1) setdest 587.867212 89.874667 19.938793"
-$ns_ at 85.000000 "$node_(2) setdest 489.338727 93.291200 19.858662"
-$ns_ at 85.000000 "$node_(3) setdest 500.466087 230.231287 19.993786"
-$ns_ at 85.000000 "$node_(4) setdest 463.199929 17.989912 6.403773"
-$ns_ at 85.000000 "$node_(5) setdest 487.155522 39.734993 19.910107"
-$ns_ at 85.000000 "$node_(6) setdest 443.956620 426.937800 18.522117"
-$ns_ at 85.000000 "$node_(7) setdest 404.982373 466.107830 16.973145"
-$ns_ at 85.000000 "$node_(8) setdest 537.501281 535.276226 19.423759"
-$ns_ at 85.000000 "$node_(9) setdest 588.601285 374.648766 7.751304"
-$ns_ at 85.000000 "$node_(10) setdest 417.844644 423.934655 19.301293"
-
-$ns_ at 86.000000 "$node_(1) setdest 583.707241 70.590453 19.727804"
-$ns_ at 86.000000 "$node_(2) setdest 507.837671 86.031211 19.872553"
-$ns_ at 86.000000 "$node_(3) setdest 492.487335 211.892008 19.999741"
-$ns_ at 86.000000 "$node_(4) setdest 460.684485 25.836346 8.239780"
-$ns_ at 86.000000 "$node_(5) setdest 468.395888 33.126211 19.889693"
-$ns_ at 86.000000 "$node_(6) setdest 439.617458 445.683926 19.241766"
-$ns_ at 86.000000 "$node_(7) setdest 405.686381 458.064025 8.074554"
-$ns_ at 86.000000 "$node_(8) setdest 552.956635 544.737738 18.121484"
-$ns_ at 86.000000 "$node_(9) setdest 579.604555 372.897661 9.165562"
-$ns_ at 86.000000 "$node_(10) setdest 417.084191 434.018891 10.112869"
-
-$ns_ at 87.000000 "$node_(1) setdest 568.163720 58.723273 19.555844"
-$ns_ at 87.000000 "$node_(2) setdest 527.597802 85.380885 19.770830"
-$ns_ at 87.000000 "$node_(3) setdest 484.486710 193.561998 19.999982"
-$ns_ at 87.000000 "$node_(4) setdest 458.575323 35.422524 9.815466"
-$ns_ at 87.000000 "$node_(5) setdest 448.529777 33.971581 19.884089"
-$ns_ at 87.000000 "$node_(6) setdest 425.906823 457.123064 17.855963"
-$ns_ at 87.000000 "$node_(7) setdest 408.452236 458.872840 2.881690"
-$ns_ at 87.000000 "$node_(8) setdest 568.879506 540.146677 16.571531"
-$ns_ at 87.000000 "$node_(9) setdest 569.851338 377.857203 10.941769"
-$ns_ at 87.000000 "$node_(10) setdest 421.850394 441.875446 9.189240"
-
-$ns_ at 88.000000 "$node_(1) setdest 548.683399 54.449519 19.943618"
-$ns_ at 88.000000 "$node_(2) setdest 546.933768 82.546059 19.542668"
-$ns_ at 88.000000 "$node_(3) setdest 476.681038 175.148773 19.999384"
-$ns_ at 88.000000 "$node_(4) setdest 461.366028 46.344763 11.273125"
-$ns_ at 88.000000 "$node_(5) setdest 430.847089 43.014463 19.860795"
-$ns_ at 88.000000 "$node_(6) setdest 410.587500 453.395095 15.766401"
-$ns_ at 88.000000 "$node_(7) setdest 412.362473 461.216708 4.558911"
-$ns_ at 88.000000 "$node_(8) setdest 582.276440 530.346179 16.599024"
-$ns_ at 88.000000 "$node_(9) setdest 560.884729 386.754776 12.631979"
-$ns_ at 88.000000 "$node_(10) setdest 424.841637 452.326111 10.870324"
-
-$ns_ at 89.000000 "$node_(1) setdest 529.270019 51.276340 19.671004"
-$ns_ at 89.000000 "$node_(2) setdest 565.972708 77.913315 19.594477"
-$ns_ at 89.000000 "$node_(3) setdest 469.023624 156.673222 19.999549"
-$ns_ at 89.000000 "$node_(4) setdest 471.973165 53.282586 12.674571"
-$ns_ at 89.000000 "$node_(5) setdest 419.286989 58.968693 19.702116"
-$ns_ at 89.000000 "$node_(6) setdest 404.803098 439.911564 14.671910"
-$ns_ at 89.000000 "$node_(7) setdest 416.934945 465.341967 6.158349"
-$ns_ at 89.000000 "$node_(8) setdest 595.673075 523.961962 14.840082"
-$ns_ at 89.000000 "$node_(9) setdest 554.608120 399.466950 14.177277"
-$ns_ at 89.000000 "$node_(10) setdest 428.943927 464.092911 12.461395"
-
-$ns_ at 90.000000 "$node_(1) setdest 510.446672 45.560687 19.671987"
-$ns_ at 90.000000 "$node_(2) setdest 581.900465 67.427062 19.069739"
-$ns_ at 90.000000 "$node_(3) setdest 460.852421 138.421298 19.997532"
-$ns_ at 90.000000 "$node_(4) setdest 486.548028 54.559831 14.630720"
-$ns_ at 90.000000 "$node_(5) setdest 417.520328 78.793399 19.903267"
-$ns_ at 90.000000 "$node_(6) setdest 412.989536 428.553731 14.000647"
-$ns_ at 90.000000 "$node_(7) setdest 421.706379 471.443160 7.745395"
-$ns_ at 90.000000 "$node_(8) setdest 596.698144 525.418757 1.781297"
-$ns_ at 90.000000 "$node_(9) setdest 552.296746 415.092034 15.795117"
-$ns_ at 90.000000 "$node_(10) setdest 437.002050 475.535203 13.994977"
-
-$ns_ at 91.000000 "$node_(1) setdest 491.216630 41.851459 19.584506"
-$ns_ at 91.000000 "$node_(2) setdest 597.391272 59.977823 17.188841"
-$ns_ at 91.000000 "$node_(3) setdest 451.041441 121.016462 19.979581"
-$ns_ at 91.000000 "$node_(4) setdest 502.763761 55.445814 16.239919"
-$ns_ at 91.000000 "$node_(5) setdest 420.064577 98.608541 19.977814"
-$ns_ at 91.000000 "$node_(6) setdest 427.036725 421.558974 15.692359"
-$ns_ at 91.000000 "$node_(7) setdest 425.224219 480.087841 9.333043"
-$ns_ at 91.000000 "$node_(8) setdest 595.078325 527.548271 2.675565"
-$ns_ at 91.000000 "$node_(9) setdest 555.215513 432.214111 17.369074"
-$ns_ at 91.000000 "$node_(10) setdest 450.540971 483.206577 15.561245"
-
-$ns_ at 92.000000 "$node_(1) setdest 471.659908 39.220660 19.732878"
-$ns_ at 92.000000 "$node_(2) setdest 599.260739 62.844430 3.422330"
-$ns_ at 92.000000 "$node_(3) setdest 437.200521 106.710742 19.905394"
-$ns_ at 92.000000 "$node_(4) setdest 520.463512 57.440346 17.811775"
-$ns_ at 92.000000 "$node_(5) setdest 425.407301 117.784600 19.906430"
-$ns_ at 92.000000 "$node_(6) setdest 441.106703 411.581456 17.248628"
-$ns_ at 92.000000 "$node_(7) setdest 426.330437 490.960272 10.928563"
-$ns_ at 92.000000 "$node_(8) setdest 592.410482 530.533599 4.003694"
-$ns_ at 92.000000 "$node_(9) setdest 564.412524 448.873432 19.029397"
-$ns_ at 92.000000 "$node_(10) setdest 467.267881 487.413523 17.247838"
-
-$ns_ at 93.000000 "$node_(1) setdest 453.466313 33.175001 19.171774"
-$ns_ at 93.000000 "$node_(2) setdest 598.291343 67.449039 4.705545"
-$ns_ at 93.000000 "$node_(3) setdest 420.425409 96.070528 19.865007"
-$ns_ at 93.000000 "$node_(4) setdest 539.462165 61.491498 19.425773"
-$ns_ at 93.000000 "$node_(5) setdest 434.020030 135.209813 19.437519"
-$ns_ at 93.000000 "$node_(6) setdest 455.272226 399.073428 18.897428"
-$ns_ at 93.000000 "$node_(7) setdest 427.424847 503.463387 12.550921"
-$ns_ at 93.000000 "$node_(8) setdest 593.809342 529.223559 1.916510"
-$ns_ at 93.000000 "$node_(9) setdest 576.244847 464.961799 19.970965"
-$ns_ at 93.000000 "$node_(10) setdest 485.902916 490.396138 18.872215"
-
-$ns_ at 94.000000 "$node_(1) setdest 440.069927 20.181823 18.662418"
-$ns_ at 94.000000 "$node_(2) setdest 596.289520 73.428855 6.305989"
-$ns_ at 94.000000 "$node_(3) setdest 418.138459 85.885901 10.438235"
-$ns_ at 94.000000 "$node_(4) setdest 559.121472 65.074947 19.983229"
-$ns_ at 94.000000 "$node_(5) setdest 433.752323 153.363814 18.155975"
-$ns_ at 94.000000 "$node_(6) setdest 468.907539 384.565199 19.910059"
-$ns_ at 94.000000 "$node_(7) setdest 423.892158 517.002474 13.992382"
-$ns_ at 94.000000 "$node_(8) setdest 594.496732 525.690274 3.599529"
-$ns_ at 94.000000 "$node_(9) setdest 587.176402 481.519615 19.840871"
-$ns_ at 94.000000 "$node_(10) setdest 505.557558 493.894481 19.963551"
-
-$ns_ at 95.000000 "$node_(1) setdest 427.052116 6.847278 18.635275"
-$ns_ at 95.000000 "$node_(2) setdest 594.485579 81.120759 7.900607"
-$ns_ at 95.000000 "$node_(3) setdest 420.911514 86.122459 2.783127"
-$ns_ at 95.000000 "$node_(4) setdest 579.042638 65.882017 19.937508"
-$ns_ at 95.000000 "$node_(5) setdest 419.915636 161.815294 16.213618"
-$ns_ at 95.000000 "$node_(6) setdest 479.384927 367.530238 19.999139"
-$ns_ at 95.000000 "$node_(7) setdest 413.636242 520.451794 10.820426"
-$ns_ at 95.000000 "$node_(8) setdest 595.480416 520.598937 5.185494"
-$ns_ at 95.000000 "$node_(9) setdest 588.142218 501.154215 19.658340"
-$ns_ at 95.000000 "$node_(10) setdest 525.501306 495.121901 19.981483"
-
-$ns_ at 96.000000 "$node_(1) setdest 410.783725 0.750524 17.373284"
-$ns_ at 96.000000 "$node_(2) setdest 593.127576 90.529264 9.506006"
-$ns_ at 96.000000 "$node_(3) setdest 424.469755 88.906562 4.517998"
-$ns_ at 96.000000 "$node_(4) setdest 589.252016 52.033514 17.205011"
-$ns_ at 96.000000 "$node_(5) setdest 406.673798 155.191050 14.806312"
-$ns_ at 96.000000 "$node_(6) setdest 483.266169 352.608643 15.418108"
-$ns_ at 96.000000 "$node_(7) setdest 410.018337 513.556034 7.787216"
-$ns_ at 96.000000 "$node_(8) setdest 595.625065 513.990687 6.609832"
-$ns_ at 96.000000 "$node_(9) setdest 576.073216 515.525770 18.767056"
-$ns_ at 96.000000 "$node_(10) setdest 544.912679 490.672198 19.914850"
-
-$ns_ at 97.000000 "$node_(1) setdest 419.156506 3.762852 8.898179"
-$ns_ at 97.000000 "$node_(2) setdest 591.679304 101.541365 11.106928"
-$ns_ at 97.000000 "$node_(3) setdest 429.445594 92.463295 6.116317"
-$ns_ at 97.000000 "$node_(4) setdest 580.554829 37.419012 17.006609"
-$ns_ at 97.000000 "$node_(5) setdest 406.950962 153.565137 1.649367"
-$ns_ at 97.000000 "$node_(6) setdest 479.856644 351.887222 3.485012"
-$ns_ at 97.000000 "$node_(7) setdest 408.684567 504.276932 9.374469"
-$ns_ at 97.000000 "$node_(8) setdest 590.406909 507.617288 8.237073"
-$ns_ at 97.000000 "$node_(9) setdest 559.752265 523.162622 18.019294"
-$ns_ at 97.000000 "$node_(10) setdest 561.124452 479.086372 19.926187"
-
-$ns_ at 98.000000 "$node_(1) setdest 429.488659 2.608879 10.396395"
-$ns_ at 98.000000 "$node_(2) setdest 589.054917 113.968791 12.701509"
-$ns_ at 98.000000 "$node_(3) setdest 436.124983 96.326552 7.716151"
-$ns_ at 98.000000 "$node_(4) setdest 574.740693 23.094755 15.459253"
-$ns_ at 98.000000 "$node_(5) setdest 409.384783 153.230897 2.456664"
-$ns_ at 98.000000 "$node_(6) setdest 474.746734 352.016833 5.111553"
-$ns_ at 98.000000 "$node_(7) setdest 413.021931 494.129886 11.035183"
-$ns_ at 98.000000 "$node_(8) setdest 580.882175 505.117671 9.847266"
-$ns_ at 98.000000 "$node_(9) setdest 542.784470 531.635980 18.965860"
-$ns_ at 98.000000 "$node_(10) setdest 575.265149 465.030323 19.938201"
-
-$ns_ at 99.000000 "$node_(1) setdest 441.489099 2.335719 12.003549"
-$ns_ at 99.000000 "$node_(2) setdest 586.056851 127.939810 14.289078"
-$ns_ at 99.000000 "$node_(3) setdest 444.433154 100.546506 9.318461"
-$ns_ at 99.000000 "$node_(4) setdest 563.604426 11.802092 15.860034"
-$ns_ at 99.000000 "$node_(5) setdest 413.431025 153.540340 4.058058"
-$ns_ at 99.000000 "$node_(6) setdest 468.323715 353.930297 6.701979"
-$ns_ at 99.000000 "$node_(7) setdest 422.987216 486.505659 12.547341"
-$ns_ at 99.000000 "$node_(8) setdest 569.510780 507.343850 11.587256"
-$ns_ at 99.000000 "$node_(9) setdest 530.489038 544.913627 18.096231"
-$ns_ at 99.000000 "$node_(10) setdest 581.656414 446.357042 19.736760"
-
-$ns_ at 100.000000 "$node_(1) setdest 454.447553 5.677176 13.382334"
-$ns_ at 100.000000 "$node_(2) setdest 586.790587 143.764948 15.842139"
-$ns_ at 100.000000 "$node_(3) setdest 454.264488 105.292106 10.916769"
-$ns_ at 100.000000 "$node_(4) setdest 547.205392 5.747685 17.480967"
-$ns_ at 100.000000 "$node_(5) setdest 419.055426 154.172769 5.659845"
-$ns_ at 100.000000 "$node_(6) setdest 468.513902 353.682612 0.312280"
-$ns_ at 100.000000 "$node_(7) setdest 425.531876 476.300999 10.517147"
-$ns_ at 100.000000 "$node_(8) setdest 568.125928 506.009333 1.923214"
-$ns_ at 100.000000 "$node_(9) setdest 534.125064 533.948308 11.552442"
-$ns_ at 100.000000 "$node_(10) setdest 574.270722 427.825799 19.948820"
-
-$ns_ at 101.000000 "$node_(1) setdest 463.974595 17.337902 15.057791"
-$ns_ at 101.000000 "$node_(2) setdest 588.818288 160.985039 17.339062"
-$ns_ at 101.000000 "$node_(3) setdest 465.953584 109.763324 12.515061"
-$ns_ at 101.000000 "$node_(4) setdest 528.686907 4.225543 18.580936"
-$ns_ at 101.000000 "$node_(5) setdest 426.301451 153.959775 7.249155"
-$ns_ at 101.000000 "$node_(6) setdest 468.409172 351.964764 1.721038"
-$ns_ at 101.000000 "$node_(7) setdest 425.627464 463.860769 12.440598"
-$ns_ at 101.000000 "$node_(8) setdest 568.230938 502.795685 3.215363"
-$ns_ at 101.000000 "$node_(9) setdest 534.843844 520.422103 13.545289"
-$ns_ at 101.000000 "$node_(10) setdest 565.376509 409.915463 19.997179"
-
-$ns_ at 102.000000 "$node_(1) setdest 469.266398 33.192266 16.714186"
-$ns_ at 102.000000 "$node_(2) setdest 583.250087 179.129202 18.979345"
-$ns_ at 102.000000 "$node_(3) setdest 479.708421 112.845067 14.095839"
-$ns_ at 102.000000 "$node_(4) setdest 513.846746 13.845484 17.685407"
-$ns_ at 102.000000 "$node_(5) setdest 434.772540 151.433158 8.839861"
-$ns_ at 102.000000 "$node_(6) setdest 467.957451 348.674042 3.321581"
-$ns_ at 102.000000 "$node_(7) setdest 425.462374 449.821538 14.040202"
-$ns_ at 102.000000 "$node_(8) setdest 568.504849 497.988118 4.815363"
-$ns_ at 102.000000 "$node_(9) setdest 536.479818 505.366286 15.144440"
-$ns_ at 102.000000 "$node_(10) setdest 555.303153 392.642708 19.995513"
-
-$ns_ at 103.000000 "$node_(1) setdest 465.730169 51.026601 18.181541"
-$ns_ at 103.000000 "$node_(2) setdest 566.879047 186.735999 18.051989"
-$ns_ at 103.000000 "$node_(3) setdest 495.386590 112.701027 15.678831"
-$ns_ at 103.000000 "$node_(4) setdest 498.374210 23.147625 18.053509"
-$ns_ at 103.000000 "$node_(5) setdest 443.971210 146.477076 10.448841"
-$ns_ at 103.000000 "$node_(6) setdest 467.040158 343.838883 4.921401"
-$ns_ at 103.000000 "$node_(7) setdest 424.846982 434.193648 15.640001"
-$ns_ at 103.000000 "$node_(8) setdest 568.959563 491.588797 6.415456"
-$ns_ at 103.000000 "$node_(9) setdest 539.291404 488.859842 16.744184"
-$ns_ at 103.000000 "$node_(10) setdest 543.978114 376.161913 19.996828"
-
-$ns_ at 104.000000 "$node_(1) setdest 453.885584 66.862210 19.775255"
-$ns_ at 104.000000 "$node_(2) setdest 550.420005 182.065219 17.108953"
-$ns_ at 104.000000 "$node_(3) setdest 512.035228 108.074256 17.279588"
-$ns_ at 104.000000 "$node_(4) setdest 480.422154 28.888008 18.847502"
-$ns_ at 104.000000 "$node_(5) setdest 453.481156 139.084396 12.045363"
-$ns_ at 104.000000 "$node_(6) setdest 465.522276 337.496223 6.521756"
-$ns_ at 104.000000 "$node_(7) setdest 423.890552 416.980065 17.240133"
-$ns_ at 104.000000 "$node_(8) setdest 569.408345 483.586152 8.015219"
-$ns_ at 104.000000 "$node_(9) setdest 542.421361 470.785101 18.343743"
-$ns_ at 104.000000 "$node_(10) setdest 532.315171 359.914903 19.999739"
-
-$ns_ at 105.000000 "$node_(1) setdest 441.554672 82.598803 19.992292"
-$ns_ at 105.000000 "$node_(2) setdest 539.013776 170.214626 16.448058"
-$ns_ at 105.000000 "$node_(3) setdest 529.234106 100.206225 18.913152"
-$ns_ at 105.000000 "$node_(4) setdest 461.595790 33.254097 19.326011"
-$ns_ at 105.000000 "$node_(5) setdest 463.150011 129.433979 13.660795"
-$ns_ at 105.000000 "$node_(6) setdest 464.066377 329.507246 8.120554"
-$ns_ at 105.000000 "$node_(7) setdest 423.478241 398.145310 18.839268"
-$ns_ at 105.000000 "$node_(8) setdest 569.653858 473.974181 9.615106"
-$ns_ at 105.000000 "$node_(9) setdest 544.689190 451.144354 19.771242"
-$ns_ at 105.000000 "$node_(10) setdest 521.557519 343.060211 19.995192"
-
-$ns_ at 106.000000 "$node_(1) setdest 426.035377 95.120154 19.940731"
-$ns_ at 106.000000 "$node_(2) setdest 527.796998 156.046188 18.070991"
-$ns_ at 106.000000 "$node_(3) setdest 546.577423 90.292431 19.976836"
-$ns_ at 106.000000 "$node_(4) setdest 442.458573 31.949902 19.181606"
-$ns_ at 106.000000 "$node_(5) setdest 473.667535 118.375737 15.261160"
-$ns_ at 106.000000 "$node_(6) setdest 463.038352 319.841988 9.719776"
-$ns_ at 106.000000 "$node_(7) setdest 424.022196 378.194573 19.958150"
-$ns_ at 106.000000 "$node_(8) setdest 569.813158 462.759869 11.215443"
-$ns_ at 106.000000 "$node_(9) setdest 547.190950 431.303404 19.998052"
-$ns_ at 106.000000 "$node_(10) setdest 512.059389 325.464003 19.996025"
-
-$ns_ at 107.000000 "$node_(1) setdest 413.339629 110.424764 19.884997"
-$ns_ at 107.000000 "$node_(2) setdest 522.889895 138.019659 18.682489"
-$ns_ at 107.000000 "$node_(3) setdest 562.785458 78.657080 19.951987"
-$ns_ at 107.000000 "$node_(4) setdest 424.326276 36.316554 18.650680"
-$ns_ at 107.000000 "$node_(5) setdest 485.278736 106.151196 16.859994"
-$ns_ at 107.000000 "$node_(6) setdest 462.686740 308.528017 11.319434"
-$ns_ at 107.000000 "$node_(7) setdest 425.056084 358.221365 19.999950"
-$ns_ at 107.000000 "$node_(8) setdest 570.011307 449.945947 12.815454"
-$ns_ at 107.000000 "$node_(9) setdest 550.802202 411.635114 19.997070"
-$ns_ at 107.000000 "$node_(10) setdest 504.100758 307.123887 19.992490"
-
-$ns_ at 108.000000 "$node_(1) setdest 403.484524 120.881194 14.368718"
-$ns_ at 108.000000 "$node_(2) setdest 522.671723 118.777356 19.243540"
-$ns_ at 108.000000 "$node_(3) setdest 566.030236 61.969468 17.000146"
-$ns_ at 108.000000 "$node_(4) setdest 406.729266 43.449566 18.987750"
-$ns_ at 108.000000 "$node_(5) setdest 498.299352 93.063657 18.461314"
-$ns_ at 108.000000 "$node_(6) setdest 463.350139 295.626592 12.918469"
-$ns_ at 108.000000 "$node_(7) setdest 425.713473 338.232633 19.999539"
-$ns_ at 108.000000 "$node_(8) setdest 570.151839 435.531284 14.415348"
-$ns_ at 108.000000 "$node_(9) setdest 553.849836 391.873169 19.995562"
-$ns_ at 108.000000 "$node_(10) setdest 497.862638 288.126445 19.995423"
-
-$ns_ at 109.000000 "$node_(1) setdest 403.989736 119.896423 1.106803"
-$ns_ at 109.000000 "$node_(2) setdest 528.443915 101.055487 18.638209"
-$ns_ at 109.000000 "$node_(3) setdest 555.086711 59.581719 11.200986"
-$ns_ at 109.000000 "$node_(4) setdest 419.658364 34.543594 15.699616"
-$ns_ at 109.000000 "$node_(5) setdest 512.018250 78.744240 19.830629"
-$ns_ at 109.000000 "$node_(6) setdest 465.226532 281.230082 14.518276"
-$ns_ at 109.000000 "$node_(7) setdest 425.892742 318.233998 19.999438"
-$ns_ at 109.000000 "$node_(8) setdest 569.845697 419.519895 16.014315"
-$ns_ at 109.000000 "$node_(9) setdest 555.287187 371.932228 19.992677"
-$ns_ at 109.000000 "$node_(10) setdest 493.133245 268.700773 19.993096"
-
-$ns_ at 110.000000 "$node_(1) setdest 405.689023 117.799747 2.698820"
-$ns_ at 110.000000 "$node_(2) setdest 542.452784 89.981334 17.857360"
-$ns_ at 110.000000 "$node_(3) setdest 541.878384 60.468639 13.238071"
-$ns_ at 110.000000 "$node_(4) setdest 431.508634 26.710829 14.204967"
-$ns_ at 110.000000 "$node_(5) setdest 525.437273 63.918876 19.996540"
-$ns_ at 110.000000 "$node_(6) setdest 468.870766 265.532533 16.115008"
-$ns_ at 110.000000 "$node_(7) setdest 425.465752 298.239034 19.999523"
-$ns_ at 110.000000 "$node_(8) setdest 568.423672 401.966936 17.610467"
-$ns_ at 110.000000 "$node_(9) setdest 554.604727 351.953670 19.990211"
-$ns_ at 110.000000 "$node_(10) setdest 490.462288 248.888314 19.991687"
-
-$ns_ at 111.000000 "$node_(1) setdest 409.267839 115.417933 4.298949"
-$ns_ at 111.000000 "$node_(2) setdest 559.897956 86.045463 17.883655"
-$ns_ at 111.000000 "$node_(3) setdest 527.059137 59.782209 14.835137"
-$ns_ at 111.000000 "$node_(4) setdest 443.573833 19.915640 13.847152"
-$ns_ at 111.000000 "$node_(5) setdest 538.192908 48.515225 19.999468"
-$ns_ at 111.000000 "$node_(6) setdest 473.714036 248.485385 17.721809"
-$ns_ at 111.000000 "$node_(7) setdest 424.698720 278.254092 19.999656"
-$ns_ at 111.000000 "$node_(8) setdest 566.060462 382.899839 19.212989"
-$ns_ at 111.000000 "$node_(9) setdest 551.708859 332.174554 19.989984"
-$ns_ at 111.000000 "$node_(10) setdest 489.396329 228.922479 19.994270"
-
-$ns_ at 112.000000 "$node_(1) setdest 414.950785 113.903111 5.881374"
-$ns_ at 112.000000 "$node_(2) setdest 578.124561 87.480642 18.283021"
-$ns_ at 112.000000 "$node_(3) setdest 510.636699 60.626058 16.444104"
-$ns_ at 112.000000 "$node_(4) setdest 457.652786 13.663710 15.404660"
-$ns_ at 112.000000 "$node_(5) setdest 551.827674 34.309326 19.690465"
-$ns_ at 112.000000 "$node_(6) setdest 478.228138 229.700152 19.319992"
-$ns_ at 112.000000 "$node_(7) setdest 422.398639 258.396580 19.990277"
-$ns_ at 112.000000 "$node_(8) setdest 565.174425 362.924990 19.994490"
-$ns_ at 112.000000 "$node_(9) setdest 546.871512 312.774624 19.993929"
-$ns_ at 112.000000 "$node_(10) setdest 491.447099 209.200491 19.828325"
-
-$ns_ at 113.000000 "$node_(1) setdest 422.446166 114.130760 7.498837"
-$ns_ at 113.000000 "$node_(2) setdest 591.915195 78.408014 16.507397"
-$ns_ at 113.000000 "$node_(3) setdest 492.624699 59.666840 18.037523"
-$ns_ at 113.000000 "$node_(4) setdest 472.214347 5.489961 16.698779"
-$ns_ at 113.000000 "$node_(5) setdest 551.486872 35.177611 0.932773"
-$ns_ at 113.000000 "$node_(6) setdest 482.217820 210.104151 19.998020"
-$ns_ at 113.000000 "$node_(7) setdest 417.831564 238.927314 19.997762"
-$ns_ at 113.000000 "$node_(8) setdest 564.744712 342.930184 19.999424"
-$ns_ at 113.000000 "$node_(9) setdest 540.209785 293.926814 19.990462"
-$ns_ at 113.000000 "$node_(10) setdest 504.489346 196.354667 18.306158"
-
-$ns_ at 114.000000 "$node_(1) setdest 431.271998 116.305610 9.089845"
-$ns_ at 114.000000 "$node_(2) setdest 588.736507 63.560605 15.183860"
-$ns_ at 114.000000 "$node_(3) setdest 473.963039 54.031040 19.494096"
-$ns_ at 114.000000 "$node_(4) setdest 473.434460 2.312632 3.403542"
-$ns_ at 114.000000 "$node_(5) setdest 548.218838 37.090081 3.786501"
-$ns_ at 114.000000 "$node_(6) setdest 484.657569 190.258834 19.994725"
-$ns_ at 114.000000 "$node_(7) setdest 414.150519 219.279742 19.989426"
-$ns_ at 114.000000 "$node_(8) setdest 563.955033 322.946138 19.999642"
-$ns_ at 114.000000 "$node_(9) setdest 531.976806 275.701992 19.998151"
-$ns_ at 114.000000 "$node_(10) setdest 520.244752 190.438199 16.829659"
-
-$ns_ at 115.000000 "$node_(1) setdest 440.908069 120.949190 10.696574"
-$ns_ at 115.000000 "$node_(2) setdest 580.431419 50.836504 15.194645"
-$ns_ at 115.000000 "$node_(3) setdest 456.876131 43.692246 19.971307"
-$ns_ at 115.000000 "$node_(4) setdest 472.869595 2.467477 0.585704"
-$ns_ at 115.000000 "$node_(5) setdest 543.700691 40.023340 5.386804"
-$ns_ at 115.000000 "$node_(6) setdest 485.938648 170.301151 19.998756"
-$ns_ at 115.000000 "$node_(7) setdest 414.076804 199.317789 19.962089"
-$ns_ at 115.000000 "$node_(8) setdest 563.190475 302.961948 19.998810"
-$ns_ at 115.000000 "$node_(9) setdest 522.369871 258.168219 19.993159"
-$ns_ at 115.000000 "$node_(10) setdest 534.924858 194.630099 15.266877"
-
-$ns_ at 116.000000 "$node_(1) setdest 451.284786 127.573697 12.310985"
-$ns_ at 116.000000 "$node_(2) setdest 569.402032 38.175636 16.791217"
-$ns_ at 116.000000 "$node_(3) setdest 440.770647 31.838598 19.997390"
-$ns_ at 116.000000 "$node_(4) setdest 472.841751 4.274661 1.807398"
-$ns_ at 116.000000 "$node_(5) setdest 537.436100 43.104717 6.981403"
-$ns_ at 116.000000 "$node_(6) setdest 486.954575 150.332081 19.994896"
-$ns_ at 116.000000 "$node_(7) setdest 417.830901 179.685288 19.988205"
-$ns_ at 116.000000 "$node_(8) setdest 563.641683 282.971460 19.995579"
-$ns_ at 116.000000 "$node_(9) setdest 511.298664 241.517648 19.995328"
-$ns_ at 116.000000 "$node_(10) setdest 550.011999 194.908027 15.089700"
-
-$ns_ at 117.000000 "$node_(1) setdest 462.138089 136.267655 13.906081"
-$ns_ at 117.000000 "$node_(2) setdest 556.634968 24.940619 18.389225"
-$ns_ at 117.000000 "$node_(3) setdest 425.324448 19.136132 19.998443"
-$ns_ at 117.000000 "$node_(4) setdest 473.314494 7.680851 3.438840"
-$ns_ at 117.000000 "$node_(5) setdest 529.438223 46.226951 8.585708"
-$ns_ at 117.000000 "$node_(6) setdest 490.129007 130.598208 19.987566"
-$ns_ at 117.000000 "$node_(7) setdest 423.966373 160.668563 19.981989"
-$ns_ at 117.000000 "$node_(8) setdest 565.740884 263.087161 19.994799"
-$ns_ at 117.000000 "$node_(9) setdest 499.055031 225.704650 19.998936"
-$ns_ at 117.000000 "$node_(10) setdest 563.557238 186.500635 15.942326"
-
-$ns_ at 118.000000 "$node_(1) setdest 473.241458 147.092544 15.506870"
-$ns_ at 118.000000 "$node_(2) setdest 539.814754 14.774438 19.653774"
-$ns_ at 118.000000 "$node_(3) setdest 409.111886 8.883379 19.182442"
-$ns_ at 118.000000 "$node_(4) setdest 473.692202 12.706450 5.039772"
-$ns_ at 118.000000 "$node_(5) setdest 519.739209 49.337753 10.185674"
-$ns_ at 118.000000 "$node_(6) setdest 496.431453 111.642085 19.976371"
-$ns_ at 118.000000 "$node_(7) setdest 432.569997 142.630498 19.984847"
-$ns_ at 118.000000 "$node_(8) setdest 568.702436 243.307677 19.999970"
-$ns_ at 118.000000 "$node_(9) setdest 485.443278 211.070870 19.985678"
-$ns_ at 118.000000 "$node_(10) setdest 570.192106 171.160831 16.713200"
-
-$ns_ at 119.000000 "$node_(1) setdest 487.251601 156.862702 17.080401"
-$ns_ at 119.000000 "$node_(2) setdest 520.683497 9.021841 19.977421"
-$ns_ at 119.000000 "$node_(3) setdest 417.073766 12.056418 8.570864"
-$ns_ at 119.000000 "$node_(4) setdest 474.036968 19.336302 6.638810"
-$ns_ at 119.000000 "$node_(5) setdest 508.315867 52.234824 11.784981"
-$ns_ at 119.000000 "$node_(6) setdest 506.265369 94.271345 19.961175"
-$ns_ at 119.000000 "$node_(7) setdest 443.201855 125.694874 19.996294"
-$ns_ at 119.000000 "$node_(8) setdest 571.628211 223.523019 19.999821"
-$ns_ at 119.000000 "$node_(9) setdest 470.395480 197.901690 19.996588"
-$ns_ at 119.000000 "$node_(10) setdest 581.059668 156.562270 18.199503"
-
-$ns_ at 120.000000 "$node_(1) setdest 504.954771 159.215359 17.858813"
-$ns_ at 120.000000 "$node_(2) setdest 501.192874 10.606251 19.554916"
-$ns_ at 120.000000 "$node_(3) setdest 423.571462 19.617907 9.969763"
-$ns_ at 120.000000 "$node_(4) setdest 474.472309 27.560057 8.235270"
-$ns_ at 120.000000 "$node_(5) setdest 495.207683 54.945946 13.385614"
-$ns_ at 120.000000 "$node_(6) setdest 520.516470 80.409235 19.880946"
-$ns_ at 120.000000 "$node_(7) setdest 453.570709 108.596480 19.996705"
-$ns_ at 120.000000 "$node_(8) setdest 573.762328 203.638794 19.998422"
-$ns_ at 120.000000 "$node_(9) setdest 453.975818 186.542303 19.965996"
-$ns_ at 120.000000 "$node_(10) setdest 592.135494 143.826225 16.878411"
-
-$ns_ at 121.000000 "$node_(1) setdest 509.718099 146.506082 13.572583"
-$ns_ at 121.000000 "$node_(2) setdest 484.117793 19.082124 19.063023"
-$ns_ at 121.000000 "$node_(3) setdest 433.058684 26.201559 11.547808"
-$ns_ at 121.000000 "$node_(4) setdest 476.147484 37.254243 9.837858"
-$ns_ at 121.000000 "$node_(5) setdest 480.493467 57.703401 14.970361"
-$ns_ at 121.000000 "$node_(6) setdest 537.165573 83.737558 16.978527"
-$ns_ at 121.000000 "$node_(7) setdest 464.612917 91.921714 19.999454"
-$ns_ at 121.000000 "$node_(8) setdest 575.622097 183.725674 19.999777"
-$ns_ at 121.000000 "$node_(9) setdest 435.402591 179.523497 19.855186"
-$ns_ at 121.000000 "$node_(10) setdest 589.495037 140.928854 3.920047"
-
-$ns_ at 122.000000 "$node_(1) setdest 501.618767 135.407562 13.739589"
-$ns_ at 122.000000 "$node_(2) setdest 468.354636 30.000884 19.175412"
-$ns_ at 122.000000 "$node_(3) setdest 444.780251 32.212762 13.173066"
-$ns_ at 122.000000 "$node_(4) setdest 478.682436 48.409195 11.439359"
-$ns_ at 122.000000 "$node_(5) setdest 465.298067 64.267961 16.552753"
-$ns_ at 122.000000 "$node_(6) setdest 544.950948 98.256877 16.474910"
-$ns_ at 122.000000 "$node_(7) setdest 475.946542 75.443825 19.999297"
-$ns_ at 122.000000 "$node_(8) setdest 576.534377 163.749996 19.996499"
-$ns_ at 122.000000 "$node_(9) setdest 434.434766 179.467028 0.969471"
-$ns_ at 122.000000 "$node_(10) setdest 584.521690 139.425209 5.195683"
-
-$ns_ at 123.000000 "$node_(1) setdest 492.075637 123.450755 15.298253"
-$ns_ at 123.000000 "$node_(2) setdest 455.863068 44.093278 18.831751"
-$ns_ at 123.000000 "$node_(3) setdest 458.619999 37.371581 14.769972"
-$ns_ at 123.000000 "$node_(4) setdest 482.138433 60.980026 13.037244"
-$ns_ at 123.000000 "$node_(5) setdest 449.568122 73.372764 18.174944"
-$ns_ at 123.000000 "$node_(6) setdest 555.460624 109.423500 15.334495"
-$ns_ at 123.000000 "$node_(7) setdest 488.072608 59.566099 19.978580"
-$ns_ at 123.000000 "$node_(8) setdest 575.616599 143.782691 19.988386"
-$ns_ at 123.000000 "$node_(9) setdest 437.345563 182.540188 4.232854"
-$ns_ at 123.000000 "$node_(10) setdest 578.082071 137.243055 6.799300"
-
-$ns_ at 124.000000 "$node_(1) setdest 481.629922 110.164467 16.900841"
-$ns_ at 124.000000 "$node_(2) setdest 442.838643 58.392410 19.341686"
-$ns_ at 124.000000 "$node_(3) setdest 474.615429 40.719637 16.342070"
-$ns_ at 124.000000 "$node_(4) setdest 486.172579 75.052483 14.639275"
-$ns_ at 124.000000 "$node_(5) setdest 430.524277 77.428350 19.470897"
-$ns_ at 124.000000 "$node_(6) setdest 570.380491 116.561320 16.539374"
-$ns_ at 124.000000 "$node_(7) setdest 503.421106 46.832482 19.942953"
-$ns_ at 124.000000 "$node_(8) setdest 571.969243 124.135771 19.982610"
-$ns_ at 124.000000 "$node_(9) setdest 437.850553 188.097996 5.580703"
-$ns_ at 124.000000 "$node_(10) setdest 570.292753 134.115544 8.393736"
-
-$ns_ at 125.000000 "$node_(1) setdest 468.764309 108.362457 12.991198"
-$ns_ at 125.000000 "$node_(2) setdest 424.365917 65.103086 19.653874"
-$ns_ at 125.000000 "$node_(3) setdest 458.785742 38.071495 16.049662"
-$ns_ at 125.000000 "$node_(4) setdest 485.862028 75.256264 0.371442"
-$ns_ at 125.000000 "$node_(5) setdest 410.538520 78.179722 19.999876"
-$ns_ at 125.000000 "$node_(6) setdest 586.519711 124.964926 18.196017"
-$ns_ at 125.000000 "$node_(7) setdest 522.204110 40.543630 19.807850"
-$ns_ at 125.000000 "$node_(8) setdest 565.283378 105.313652 19.974308"
-$ns_ at 125.000000 "$node_(9) setdest 438.236927 188.566948 0.607619"
-$ns_ at 125.000000 "$node_(10) setdest 561.454881 129.437687 9.999516"
-
-$ns_ at 126.000000 "$node_(1) setdest 453.894330 110.665395 15.047252"
-$ns_ at 126.000000 "$node_(2) setdest 404.988454 70.046829 19.998166"
-$ns_ at 126.000000 "$node_(3) setdest 440.858781 37.340840 17.941845"
-$ns_ at 126.000000 "$node_(4) setdest 484.107042 74.965456 1.778916"
-$ns_ at 126.000000 "$node_(5) setdest 390.542704 78.440085 19.997511"
-$ns_ at 126.000000 "$node_(6) setdest 592.964875 127.196911 6.820696"
-$ns_ at 126.000000 "$node_(7) setdest 542.036992 42.707094 19.950533"
-$ns_ at 126.000000 "$node_(8) setdest 554.346165 88.643407 19.937896"
-$ns_ at 126.000000 "$node_(9) setdest 438.863799 187.609138 1.144713"
-$ns_ at 126.000000 "$node_(10) setdest 550.853562 124.755186 11.589383"
-
-$ns_ at 127.000000 "$node_(1) setdest 437.536983 113.753231 16.646247"
-$ns_ at 127.000000 "$node_(2) setdest 385.400042 74.078678 19.999042"
-$ns_ at 127.000000 "$node_(3) setdest 421.408233 35.863244 19.506591"
-$ns_ at 127.000000 "$node_(4) setdest 480.756885 74.527052 3.378720"
-$ns_ at 127.000000 "$node_(5) setdest 370.587368 77.185177 19.994756"
-$ns_ at 127.000000 "$node_(6) setdest 591.806569 125.973434 1.684805"
-$ns_ at 127.000000 "$node_(7) setdest 561.938216 44.598425 19.990894"
-$ns_ at 127.000000 "$node_(8) setdest 538.791423 76.225827 19.903424"
-$ns_ at 127.000000 "$node_(9) setdest 439.851088 185.026858 2.764582"
-$ns_ at 127.000000 "$node_(10) setdest 538.598737 119.856049 13.197813"
-
-$ns_ at 128.000000 "$node_(1) setdest 419.670201 117.456660 18.246569"
-$ns_ at 128.000000 "$node_(2) setdest 365.724919 77.666346 19.999545"
-$ns_ at 128.000000 "$node_(3) setdest 401.445644 34.670369 19.998197"
-$ns_ at 128.000000 "$node_(4) setdest 475.797670 74.087926 4.978620"
-$ns_ at 128.000000 "$node_(5) setdest 350.726157 74.834010 19.999892"
-$ns_ at 128.000000 "$node_(6) setdest 589.270539 123.860295 3.301031"
-$ns_ at 128.000000 "$node_(7) setdest 581.791247 44.803262 19.854088"
-$ns_ at 128.000000 "$node_(8) setdest 520.702123 67.707079 19.994795"
-$ns_ at 128.000000 "$node_(9) setdest 441.303563 180.909826 4.365734"
-$ns_ at 128.000000 "$node_(10) setdest 525.473635 113.036002 14.791260"
-
-$ns_ at 129.000000 "$node_(1) setdest 400.190414 120.538102 19.722002"
-$ns_ at 129.000000 "$node_(2) setdest 345.957172 80.701765 19.999440"
-$ns_ at 129.000000 "$node_(3) setdest 381.449576 34.354000 19.998570"
-$ns_ at 129.000000 "$node_(4) setdest 469.225898 73.791977 6.578432"
-$ns_ at 129.000000 "$node_(5) setdest 330.797553 73.177839 19.997304"
-$ns_ at 129.000000 "$node_(6) setdest 585.243076 121.062983 4.903612"
-$ns_ at 129.000000 "$node_(7) setdest 588.511397 48.281694 7.567028"
-$ns_ at 129.000000 "$node_(8) setdest 502.905331 58.615452 19.984581"
-$ns_ at 129.000000 "$node_(9) setdest 443.695561 175.443621 5.966662"
-$ns_ at 129.000000 "$node_(10) setdest 511.499269 104.458277 16.396959"
-
-$ns_ at 130.000000 "$node_(1) setdest 380.319010 122.788460 19.998421"
-$ns_ at 130.000000 "$node_(2) setdest 326.114659 83.198800 19.999013"
-$ns_ at 130.000000 "$node_(3) setdest 361.450892 34.562067 19.999767"
-$ns_ at 130.000000 "$node_(4) setdest 461.047591 73.796428 8.178308"
-$ns_ at 130.000000 "$node_(5) setdest 310.805689 73.087262 19.992069"
-$ns_ at 130.000000 "$node_(6) setdest 580.472921 116.653619 6.495912"
-$ns_ at 130.000000 "$node_(7) setdest 586.575808 48.184730 1.938017"
-$ns_ at 130.000000 "$node_(8) setdest 485.758668 48.322000 19.999080"
-$ns_ at 130.000000 "$node_(9) setdest 446.859035 168.570017 7.566637"
-$ns_ at 130.000000 "$node_(10) setdest 497.658476 92.981586 17.980044"
-
-$ns_ at 131.000000 "$node_(1) setdest 360.365366 124.127494 19.998522"
-$ns_ at 131.000000 "$node_(2) setdest 306.164975 84.538799 19.994637"
-$ns_ at 131.000000 "$node_(3) setdest 341.453459 34.881321 19.999981"
-$ns_ at 131.000000 "$node_(4) setdest 451.277647 74.201781 9.778349"
-$ns_ at 131.000000 "$node_(5) setdest 290.929481 75.205162 19.988725"
-$ns_ at 131.000000 "$node_(6) setdest 575.708834 110.114534 8.090498"
-$ns_ at 131.000000 "$node_(7) setdest 583.023276 48.266735 3.553478"
-$ns_ at 131.000000 "$node_(8) setdest 468.711352 37.876329 19.993075"
-$ns_ at 131.000000 "$node_(9) setdest 451.428019 160.631101 9.159804"
-$ns_ at 131.000000 "$node_(10) setdest 485.035837 78.081245 19.528215"
-
-$ns_ at 132.000000 "$node_(1) setdest 340.372607 124.577953 19.997833"
-$ns_ at 132.000000 "$node_(2) setdest 286.178506 84.073191 19.991892"
-$ns_ at 132.000000 "$node_(3) setdest 321.454012 34.894377 19.999451"
-$ns_ at 132.000000 "$node_(4) setdest 439.923459 74.951472 11.378912"
-$ns_ at 132.000000 "$node_(5) setdest 271.481106 79.805860 19.985138"
-$ns_ at 132.000000 "$node_(6) setdest 571.726779 101.275821 9.694308"
-$ns_ at 132.000000 "$node_(7) setdest 577.934453 49.068828 5.151648"
-$ns_ at 132.000000 "$node_(8) setdest 450.507813 29.624318 19.986609"
-$ns_ at 132.000000 "$node_(9) setdest 457.527500 151.759105 10.766428"
-$ns_ at 132.000000 "$node_(10) setdest 474.583709 61.040590 19.990771"
-
-$ns_ at 133.000000 "$node_(1) setdest 320.380450 124.065568 19.998722"
-$ns_ at 133.000000 "$node_(2) setdest 266.383509 81.306673 19.987384"
-$ns_ at 133.000000 "$node_(3) setdest 301.478147 33.972686 19.997117"
-$ns_ at 133.000000 "$node_(4) setdest 426.974114 75.826178 12.978853"
-$ns_ at 133.000000 "$node_(5) setdest 252.963837 87.304381 19.977914"
-$ns_ at 133.000000 "$node_(6) setdest 568.310797 90.505002 11.299534"
-$ns_ at 133.000000 "$node_(7) setdest 571.352734 50.591970 6.755663"
-$ns_ at 133.000000 "$node_(8) setdest 430.748481 26.892605 19.947266"
-$ns_ at 133.000000 "$node_(9) setdest 464.585787 141.605483 12.365900"
-$ns_ at 133.000000 "$node_(10) setdest 461.707413 45.848981 19.914416"
-
-$ns_ at 134.000000 "$node_(1) setdest 300.449527 122.443033 19.996858"
-$ns_ at 134.000000 "$node_(2) setdest 247.068943 76.153410 19.990212"
-$ns_ at 134.000000 "$node_(3) setdest 281.620279 31.641423 19.994242"
-$ns_ at 134.000000 "$node_(4) setdest 412.407798 76.413196 14.578139"
-$ns_ at 134.000000 "$node_(5) setdest 236.182515 98.124469 19.967150"
-$ns_ at 134.000000 "$node_(6) setdest 565.493969 77.924687 12.891814"
-$ns_ at 134.000000 "$node_(7) setdest 563.139327 52.127120 8.355642"
-$ns_ at 134.000000 "$node_(8) setdest 416.947036 15.226109 18.071719"
-$ns_ at 134.000000 "$node_(9) setdest 472.330576 129.982714 13.966765"
-$ns_ at 134.000000 "$node_(10) setdest 445.040272 34.848403 19.970135"
-
-$ns_ at 135.000000 "$node_(1) setdest 280.660058 119.566270 19.997470"
-$ns_ at 135.000000 "$node_(2) setdest 228.579859 68.567935 19.984636"
-$ns_ at 135.000000 "$node_(3) setdest 261.870140 28.489966 19.999992"
-$ns_ at 135.000000 "$node_(4) setdest 396.230443 76.619532 16.178671"
-$ns_ at 135.000000 "$node_(5) setdest 221.570082 111.764000 19.988997"
-$ns_ at 135.000000 "$node_(6) setdest 565.462360 63.456976 14.467745"
-$ns_ at 135.000000 "$node_(7) setdest 553.580974 54.883009 9.947715"
-$ns_ at 135.000000 "$node_(8) setdest 426.301069 2.292969 15.961330"
-$ns_ at 135.000000 "$node_(9) setdest 481.564388 117.456807 15.561543"
-$ns_ at 135.000000 "$node_(10) setdest 426.598641 27.230647 19.953044"
-
-$ns_ at 136.000000 "$node_(1) setdest 260.964022 116.093665 19.999821"
-$ns_ at 136.000000 "$node_(2) setdest 211.157455 58.763950 19.991455"
-$ns_ at 136.000000 "$node_(3) setdest 242.069536 25.684400 19.998378"
-$ns_ at 136.000000 "$node_(4) setdest 378.451498 76.635633 17.778952"
-$ns_ at 136.000000 "$node_(5) setdest 207.405609 125.883222 19.999618"
-$ns_ at 136.000000 "$node_(6) setdest 570.550150 48.286694 16.000721"
-$ns_ at 136.000000 "$node_(7) setdest 543.178360 59.884928 11.542685"
-$ns_ at 136.000000 "$node_(8) setdest 439.426261 7.213786 14.017314"
-$ns_ at 136.000000 "$node_(9) setdest 492.799836 104.479486 17.165259"
-$ns_ at 136.000000 "$node_(10) setdest 416.515775 29.332216 10.299553"
-
-$ns_ at 137.000000 "$node_(1) setdest 241.166659 113.273096 19.997279"
-$ns_ at 137.000000 "$node_(2) setdest 193.607811 49.185768 19.993288"
-$ns_ at 137.000000 "$node_(3) setdest 222.148163 23.923978 19.999004"
-$ns_ at 137.000000 "$node_(4) setdest 359.072806 76.657629 19.378705"
-$ns_ at 137.000000 "$node_(5) setdest 192.886203 139.634471 19.997750"
-$ns_ at 137.000000 "$node_(6) setdest 583.970533 42.100482 14.777547"
-$ns_ at 137.000000 "$node_(7) setdest 532.296270 67.248819 13.139511"
-$ns_ at 137.000000 "$node_(8) setdest 453.839916 9.148842 14.542968"
-$ns_ at 137.000000 "$node_(9) setdest 505.861846 91.012627 18.760928"
-$ns_ at 137.000000 "$node_(10) setdest 417.284418 30.284041 1.223431"
-
-$ns_ at 138.000000 "$node_(1) setdest 221.227107 111.767797 19.996292"
-$ns_ at 138.000000 "$node_(2) setdest 175.271841 41.218919 19.991961"
-$ns_ at 138.000000 "$node_(3) setdest 202.333247 21.224188 19.997993"
-$ns_ at 138.000000 "$node_(4) setdest 339.081034 77.216611 19.999585"
-$ns_ at 138.000000 "$node_(5) setdest 177.604021 152.479213 19.963278"
-$ns_ at 138.000000 "$node_(6) setdest 588.327423 50.944124 9.858625"
-$ns_ at 138.000000 "$node_(7) setdest 521.858823 77.648040 14.733774"
-$ns_ at 138.000000 "$node_(8) setdest 470.072953 9.536007 16.237653"
-$ns_ at 138.000000 "$node_(9) setdest 520.526387 77.499927 19.940959"
-$ns_ at 138.000000 "$node_(10) setdest 420.076823 30.790374 2.837939"
-
-$ns_ at 139.000000 "$node_(1) setdest 201.240697 111.066682 19.998704"
-$ns_ at 139.000000 "$node_(2) setdest 164.466411 38.985513 11.033831"
-$ns_ at 139.000000 "$node_(3) setdest 184.238943 13.733066 19.583686"
-$ns_ at 139.000000 "$node_(4) setdest 319.132136 78.610994 19.997570"
-$ns_ at 139.000000 "$node_(5) setdest 159.330537 160.396138 19.914767"
-$ns_ at 139.000000 "$node_(6) setdest 588.282286 62.792033 11.847995"
-$ns_ at 139.000000 "$node_(7) setdest 512.243129 90.872745 16.350976"
-$ns_ at 139.000000 "$node_(8) setdest 487.878750 9.368775 17.806582"
-$ns_ at 139.000000 "$node_(9) setdest 536.534192 65.547922 19.977493"
-$ns_ at 139.000000 "$node_(10) setdest 424.324084 29.536639 4.428439"
-
-$ns_ at 140.000000 "$node_(1) setdest 181.242347 111.274656 19.999432"
-$ns_ at 140.000000 "$node_(2) setdest 175.502159 37.272010 11.167982"
-$ns_ at 140.000000 "$node_(3) setdest 182.074451 1.712658 12.213731"
-$ns_ at 140.000000 "$node_(4) setdest 299.283899 81.049008 19.997411"
-$ns_ at 140.000000 "$node_(5) setdest 139.532044 162.682204 19.930038"
-$ns_ at 140.000000 "$node_(6) setdest 589.138402 76.155223 13.390586"
-$ns_ at 140.000000 "$node_(7) setdest 501.789191 105.467392 17.952396"
-$ns_ at 140.000000 "$node_(8) setdest 505.637603 16.818056 19.257951"
-$ns_ at 140.000000 "$node_(9) setdest 554.813129 57.628754 19.920661"
-$ns_ at 140.000000 "$node_(10) setdest 429.800533 26.943825 6.059223"
-
-$ns_ at 141.000000 "$node_(1) setdest 161.247046 111.473323 19.996287"
-$ns_ at 141.000000 "$node_(2) setdest 185.373829 29.829709 12.362755"
-$ns_ at 141.000000 "$node_(3) setdest 183.778520 1.889613 1.713232"
-$ns_ at 141.000000 "$node_(4) setdest 279.550001 84.297092 19.999419"
-$ns_ at 141.000000 "$node_(5) setdest 119.793534 159.666849 19.967502"
-$ns_ at 141.000000 "$node_(6) setdest 592.156148 90.830024 14.981874"
-$ns_ at 141.000000 "$node_(7) setdest 488.189099 119.413179 19.479412"
-$ns_ at 141.000000 "$node_(8) setdest 523.321051 26.105433 19.973976"
-$ns_ at 141.000000 "$node_(9) setdest 571.486632 63.791740 17.776055"
-$ns_ at 141.000000 "$node_(10) setdest 436.921300 24.140901 7.652561"
-
-$ns_ at 142.000000 "$node_(1) setdest 141.772095 115.540184 19.895051"
-$ns_ at 142.000000 "$node_(2) setdest 196.339570 29.318053 10.977671"
-$ns_ at 142.000000 "$node_(3) setdest 184.812005 4.915605 3.197612"
-$ns_ at 142.000000 "$node_(4) setdest 259.803815 87.459443 19.997808"
-$ns_ at 142.000000 "$node_(5) setdest 100.096591 156.319135 19.979409"
-$ns_ at 142.000000 "$node_(6) setdest 590.692452 107.433540 16.667908"
-$ns_ at 142.000000 "$node_(7) setdest 471.797782 130.833795 19.977632"
-$ns_ at 142.000000 "$node_(8) setdest 541.126366 35.173355 19.981403"
-$ns_ at 142.000000 "$node_(9) setdest 567.782585 75.167477 11.963585"
-$ns_ at 142.000000 "$node_(10) setdest 446.013398 22.445407 9.248835"
-
-$ns_ at 143.000000 "$node_(1) setdest 127.450194 128.944032 19.615810"
-$ns_ at 143.000000 "$node_(2) setdest 197.147859 36.740438 7.466266"
-$ns_ at 143.000000 "$node_(3) setdest 185.893987 9.604906 4.812507"
-$ns_ at 143.000000 "$node_(4) setdest 239.858385 88.607005 19.978416"
-$ns_ at 143.000000 "$node_(5) setdest 80.175258 157.537770 19.958571"
-$ns_ at 143.000000 "$node_(6) setdest 585.791697 124.971994 18.210293"
-$ns_ at 143.000000 "$node_(7) setdest 454.924266 141.549003 19.988276"
-$ns_ at 143.000000 "$node_(8) setdest 556.871642 47.471369 19.978860"
-$ns_ at 143.000000 "$node_(9) setdest 558.206517 84.854499 13.621287"
-$ns_ at 143.000000 "$node_(10) setdest 456.841721 21.664948 10.856413"
-
-$ns_ at 144.000000 "$node_(1) setdest 118.524599 146.840858 19.999066"
-$ns_ at 144.000000 "$node_(2) setdest 196.591811 45.826445 9.103005"
-$ns_ at 144.000000 "$node_(3) setdest 187.092769 15.899568 6.407796"
-$ns_ at 144.000000 "$node_(4) setdest 220.066145 86.102236 19.950103"
-$ns_ at 144.000000 "$node_(5) setdest 60.964143 162.769298 19.910697"
-$ns_ at 144.000000 "$node_(6) setdest 574.313128 140.914141 19.644582"
-$ns_ at 144.000000 "$node_(7) setdest 441.557267 156.254138 19.872536"
-$ns_ at 144.000000 "$node_(8) setdest 571.374396 61.086555 19.892289"
-$ns_ at 144.000000 "$node_(9) setdest 552.626228 98.963335 15.172307"
-$ns_ at 144.000000 "$node_(10) setdest 469.299904 21.561095 12.458615"
-
-$ns_ at 145.000000 "$node_(1) setdest 112.115498 165.696718 19.915321"
-$ns_ at 145.000000 "$node_(2) setdest 190.250128 47.613148 6.588570"
-$ns_ at 145.000000 "$node_(3) setdest 187.313861 23.900730 8.004216"
-$ns_ at 145.000000 "$node_(4) setdest 203.065906 94.794565 19.093577"
-$ns_ at 145.000000 "$node_(5) setdest 45.972008 175.619703 19.745810"
-$ns_ at 145.000000 "$node_(6) setdest 560.255115 155.135300 19.996727"
-$ns_ at 145.000000 "$node_(7) setdest 438.601722 175.534770 19.505846"
-$ns_ at 145.000000 "$node_(8) setdest 588.750250 69.671374 19.380903"
-$ns_ at 145.000000 "$node_(9) setdest 551.878665 115.778256 16.831530"
-$ns_ at 145.000000 "$node_(10) setdest 483.345939 22.123346 14.057284"
-
-$ns_ at 146.000000 "$node_(1) setdest 111.731159 185.496144 19.803156"
-$ns_ at 146.000000 "$node_(2) setdest 183.547590 43.776632 7.722881"
-$ns_ at 146.000000 "$node_(3) setdest 185.862180 33.389020 9.598699"
-$ns_ at 146.000000 "$node_(4) setdest 190.626206 108.639388 18.612503"
-$ns_ at 146.000000 "$node_(5) setdest 47.072918 193.458445 17.872681"
-$ns_ at 146.000000 "$node_(6) setdest 545.916182 169.049201 19.980032"
-$ns_ at 146.000000 "$node_(7) setdest 444.782179 193.174570 18.691190"
-$ns_ at 146.000000 "$node_(8) setdest 586.255822 69.734557 2.495228"
-$ns_ at 146.000000 "$node_(9) setdest 554.631147 134.007561 18.435936"
-$ns_ at 146.000000 "$node_(10) setdest 498.884774 24.015570 15.653623"
-
-$ns_ at 147.000000 "$node_(1) setdest 111.899554 186.471049 0.989342"
-$ns_ at 147.000000 "$node_(2) setdest 175.795557 38.607572 9.317360"
-$ns_ at 147.000000 "$node_(3) setdest 182.523745 44.090935 11.210537"
-$ns_ at 147.000000 "$node_(4) setdest 179.070997 123.870067 19.117961"
-$ns_ at 147.000000 "$node_(5) setdest 62.376736 192.812895 15.317427"
-$ns_ at 147.000000 "$node_(6) setdest 531.919229 183.302102 19.976483"
-$ns_ at 147.000000 "$node_(7) setdest 436.724006 199.709287 10.374810"
-$ns_ at 147.000000 "$node_(8) setdest 576.168467 67.370369 10.360701"
-$ns_ at 147.000000 "$node_(9) setdest 562.586604 152.129905 19.791631"
-$ns_ at 147.000000 "$node_(10) setdest 515.441797 28.772088 17.226708"
-
-$ns_ at 148.000000 "$node_(1) setdest 108.990066 180.641200 6.515540"
-$ns_ at 148.000000 "$node_(2) setdest 167.327952 31.720295 10.914894"
-$ns_ at 148.000000 "$node_(3) setdest 179.086940 56.426752 12.805624"
-$ns_ at 148.000000 "$node_(4) setdest 163.850105 134.459779 18.542318"
-$ns_ at 148.000000 "$node_(5) setdest 69.482057 179.583763 15.016508"
-$ns_ at 148.000000 "$node_(6) setdest 513.623888 191.062746 19.873276"
-$ns_ at 148.000000 "$node_(7) setdest 426.833193 195.609739 10.706749"
-$ns_ at 148.000000 "$node_(8) setdest 564.268369 67.203121 11.901272"
-$ns_ at 148.000000 "$node_(9) setdest 570.951086 170.282477 19.987006"
-$ns_ at 148.000000 "$node_(10) setdest 531.755709 38.134043 18.809304"
-
-$ns_ at 149.000000 "$node_(1) setdest 104.753756 173.710069 8.123232"
-$ns_ at 149.000000 "$node_(2) setdest 156.878825 24.944390 12.453801"
-$ns_ at 149.000000 "$node_(3) setdest 176.599709 70.622921 14.412410"
-$ns_ at 149.000000 "$node_(4) setdest 146.434634 142.639565 19.240778"
-$ns_ at 149.000000 "$node_(5) setdest 75.707512 165.318603 15.564417"
-$ns_ at 149.000000 "$node_(6) setdest 493.935495 190.646337 19.692796"
-$ns_ at 149.000000 "$node_(7) setdest 417.399684 187.603159 12.373213"
-$ns_ at 149.000000 "$node_(8) setdest 551.157370 70.606676 13.545571"
-$ns_ at 149.000000 "$node_(9) setdest 576.243443 189.189175 19.633448"
-$ns_ at 149.000000 "$node_(10) setdest 546.734747 51.323269 19.958137"
-
-$ns_ at 150.000000 "$node_(1) setdest 99.278520 165.679385 9.719573"
-$ns_ at 150.000000 "$node_(2) setdest 143.075068 24.363392 13.815978"
-$ns_ at 150.000000 "$node_(3) setdest 173.400696 86.306718 16.006723"
-$ns_ at 150.000000 "$node_(4) setdest 130.649757 153.943580 19.415023"
-$ns_ at 150.000000 "$node_(5) setdest 88.488112 154.041636 17.044464"
-$ns_ at 150.000000 "$node_(6) setdest 475.349957 183.326049 19.975206"
-$ns_ at 150.000000 "$node_(7) setdest 414.624429 174.179041 13.707991"
-$ns_ at 150.000000 "$node_(8) setdest 537.189239 76.498837 15.160021"
-$ns_ at 150.000000 "$node_(9) setdest 575.465562 180.778988 8.446085"
-$ns_ at 150.000000 "$node_(10) setdest 560.401937 65.884227 19.970318"
-
-$ns_ at 151.000000 "$node_(1) setdest 91.813160 157.170777 11.319364"
-$ns_ at 151.000000 "$node_(2) setdest 138.004596 35.391633 12.138031"
-$ns_ at 151.000000 "$node_(3) setdest 168.114267 103.099736 17.605447"
-$ns_ at 151.000000 "$node_(4) setdest 119.996573 169.374810 18.751351"
-$ns_ at 151.000000 "$node_(5) setdest 105.657672 146.388340 18.798051"
-$ns_ at 151.000000 "$node_(6) setdest 459.956503 171.347805 19.504788"
-$ns_ at 151.000000 "$node_(7) setdest 416.813764 158.732695 15.600731"
-$ns_ at 151.000000 "$node_(8) setdest 521.788366 83.114604 16.761720"
-$ns_ at 151.000000 "$node_(9) setdest 577.687876 171.392622 9.645857"
-$ns_ at 151.000000 "$node_(10) setdest 569.087851 83.782994 19.894998"
-
-$ns_ at 152.000000 "$node_(1) setdest 82.097039 148.659628 12.916759"
-$ns_ at 152.000000 "$node_(2) setdest 146.119591 45.797946 13.196382"
-$ns_ at 152.000000 "$node_(3) setdest 160.937701 120.920891 19.211888"
-$ns_ at 152.000000 "$node_(4) setdest 105.936747 181.378621 18.487028"
-$ns_ at 152.000000 "$node_(5) setdest 124.801631 141.076851 19.867135"
-$ns_ at 152.000000 "$node_(6) setdest 448.544469 155.827294 19.264495"
-$ns_ at 152.000000 "$node_(7) setdest 417.880719 141.561761 17.204051"
-$ns_ at 152.000000 "$node_(8) setdest 503.612706 85.135031 18.287612"
-$ns_ at 152.000000 "$node_(9) setdest 582.520079 161.274967 11.212365"
-$ns_ at 152.000000 "$node_(10) setdest 569.702380 103.596801 19.823334"
-
-$ns_ at 153.000000 "$node_(1) setdest 70.379904 140.091185 14.515835"
-$ns_ at 153.000000 "$node_(2) setdest 158.134566 54.430381 14.794545"
-$ns_ at 153.000000 "$node_(3) setdest 156.219850 140.328761 19.973071"
-$ns_ at 153.000000 "$node_(4) setdest 88.725972 189.580626 19.065247"
-$ns_ at 153.000000 "$node_(5) setdest 144.327183 138.526583 19.691395"
-$ns_ at 153.000000 "$node_(6) setdest 442.382049 137.609253 19.232068"
-$ns_ at 153.000000 "$node_(7) setdest 416.376540 122.816638 18.805376"
-$ns_ at 153.000000 "$node_(8) setdest 483.914674 83.287628 19.784472"
-$ns_ at 153.000000 "$node_(9) setdest 586.204849 149.285184 12.543222"
-$ns_ at 153.000000 "$node_(10) setdest 559.010783 119.996465 19.577008"
-
-$ns_ at 154.000000 "$node_(1) setdest 55.997138 132.866034 16.095551"
-$ns_ at 154.000000 "$node_(2) setdest 172.406373 62.536019 16.412977"
-$ns_ at 154.000000 "$node_(3) setdest 151.635699 159.667002 19.874155"
-$ns_ at 154.000000 "$node_(4) setdest 78.054821 195.479620 12.193096"
-$ns_ at 154.000000 "$node_(5) setdest 163.592391 140.383876 19.354528"
-$ns_ at 154.000000 "$node_(6) setdest 441.383428 118.459568 19.175706"
-$ns_ at 154.000000 "$node_(7) setdest 412.338720 103.315957 19.914330"
-$ns_ at 154.000000 "$node_(8) setdest 464.344857 79.349340 19.962160"
-$ns_ at 154.000000 "$node_(9) setdest 576.816577 139.350201 13.669073"
-$ns_ at 154.000000 "$node_(10) setdest 540.866973 128.225326 19.922651"
-
-$ns_ at 155.000000 "$node_(1) setdest 41.252307 123.224103 17.617516"
-$ns_ at 155.000000 "$node_(2) setdest 186.611964 72.729002 17.484157"
-$ns_ at 155.000000 "$node_(3) setdest 144.090830 165.764530 9.700768"
-$ns_ at 155.000000 "$node_(4) setdest 84.150229 193.306525 6.471193"
-$ns_ at 155.000000 "$node_(5) setdest 178.718241 150.366969 18.123286"
-$ns_ at 155.000000 "$node_(6) setdest 439.600336 99.066105 19.475263"
-$ns_ at 155.000000 "$node_(7) setdest 407.087226 84.024775 19.993196"
-$ns_ at 155.000000 "$node_(8) setdest 447.207539 69.162889 19.936185"
-$ns_ at 155.000000 "$node_(9) setdest 561.438062 134.917972 16.004480"
-$ns_ at 155.000000 "$node_(10) setdest 526.487380 140.831521 19.122992"
-
-$ns_ at 156.000000 "$node_(1) setdest 34.078752 105.954513 18.700231"
-$ns_ at 156.000000 "$node_(2) setdest 187.094893 73.875178 1.243760"
-$ns_ at 156.000000 "$node_(3) setdest 141.135685 162.335572 4.526658"
-$ns_ at 156.000000 "$node_(4) setdest 92.326017 193.380787 8.176125"
-$ns_ at 156.000000 "$node_(5) setdest 191.326981 163.978216 18.553877"
-$ns_ at 156.000000 "$node_(6) setdest 441.938872 80.015861 19.193242"
-$ns_ at 156.000000 "$node_(7) setdest 410.869511 64.803585 19.589788"
-$ns_ at 156.000000 "$node_(8) setdest 431.974289 56.242401 19.974757"
-$ns_ at 156.000000 "$node_(9) setdest 545.448883 127.932357 17.448572"
-$ns_ at 156.000000 "$node_(10) setdest 515.851572 156.904956 19.273705"
-
-$ns_ at 157.000000 "$node_(1) setdest 43.916030 90.582641 18.250109"
-$ns_ at 157.000000 "$node_(2) setdest 185.047818 73.249294 2.140618"
-$ns_ at 157.000000 "$node_(3) setdest 137.743986 157.188007 6.164499"
-$ns_ at 157.000000 "$node_(4) setdest 102.029528 194.793971 9.805877"
-$ns_ at 157.000000 "$node_(5) setdest 189.463671 163.013794 2.098103"
-$ns_ at 157.000000 "$node_(6) setdest 447.800127 61.558044 19.366087"
-$ns_ at 157.000000 "$node_(7) setdest 421.274390 47.730933 19.993423"
-$ns_ at 157.000000 "$node_(8) setdest 417.596276 42.348809 19.993978"
-$ns_ at 157.000000 "$node_(9) setdest 533.516072 113.369140 18.827619"
-$ns_ at 157.000000 "$node_(10) setdest 508.458281 174.872098 19.428817"
-
-$ns_ at 158.000000 "$node_(1) setdest 55.511989 78.080336 17.052094"
-$ns_ at 158.000000 "$node_(2) setdest 181.442077 72.235518 3.745545"
-$ns_ at 158.000000 "$node_(3) setdest 134.731133 150.035278 7.761367"
-$ns_ at 158.000000 "$node_(4) setdest 113.388357 195.826949 11.405702"
-$ns_ at 158.000000 "$node_(5) setdest 189.430347 155.904971 7.108901"
-$ns_ at 158.000000 "$node_(6) setdest 451.172245 42.328961 19.522521"
-$ns_ at 158.000000 "$node_(7) setdest 430.947390 30.485112 19.773347"
-$ns_ at 158.000000 "$node_(8) setdest 416.344354 24.696906 17.696242"
-$ns_ at 158.000000 "$node_(9) setdest 532.772610 95.462924 17.921644"
-$ns_ at 158.000000 "$node_(10) setdest 499.709975 191.961210 19.198193"
-
-$ns_ at 159.000000 "$node_(1) setdest 62.113656 61.761513 17.603579"
-$ns_ at 159.000000 "$node_(2) setdest 176.123023 71.889821 5.330276"
-$ns_ at 159.000000 "$node_(3) setdest 131.954733 141.086339 9.369734"
-$ns_ at 159.000000 "$node_(4) setdest 126.380996 196.373692 13.004139"
-$ns_ at 159.000000 "$node_(5) setdest 187.683229 147.360821 8.720947"
-$ns_ at 159.000000 "$node_(6) setdest 451.279335 22.737061 19.592193"
-$ns_ at 159.000000 "$node_(7) setdest 436.024525 11.839659 19.324342"
-$ns_ at 159.000000 "$node_(8) setdest 426.226077 23.617931 9.940454"
-$ns_ at 159.000000 "$node_(9) setdest 526.035117 80.351338 16.545509"
-$ns_ at 159.000000 "$node_(10) setdest 503.894359 181.756466 11.029318"
-
-$ns_ at 160.000000 "$node_(1) setdest 65.960718 43.172044 18.983367"
-$ns_ at 160.000000 "$node_(2) setdest 169.348075 73.331064 6.926551"
-$ns_ at 160.000000 "$node_(3) setdest 128.796997 130.584343 10.966459"
-$ns_ at 160.000000 "$node_(4) setdest 140.930810 195.800748 14.561090"
-$ns_ at 160.000000 "$node_(5) setdest 187.045369 137.058154 10.322393"
-$ns_ at 160.000000 "$node_(6) setdest 444.402909 18.604950 8.022441"
-$ns_ at 160.000000 "$node_(7) setdest 434.909325 14.365720 2.761278"
-$ns_ at 160.000000 "$node_(8) setdest 424.301771 22.863179 2.067028"
-$ns_ at 160.000000 "$node_(9) setdest 512.812174 79.050168 13.286808"
-$ns_ at 160.000000 "$node_(10) setdest 495.740867 177.608074 9.148147"
-
-$ns_ at 161.000000 "$node_(1) setdest 72.042419 24.842076 19.312556"
-$ns_ at 161.000000 "$node_(2) setdest 161.871350 77.405615 8.514892"
-$ns_ at 161.000000 "$node_(3) setdest 126.355196 118.254232 12.569568"
-$ns_ at 161.000000 "$node_(4) setdest 150.057613 187.830197 12.117269"
-$ns_ at 161.000000 "$node_(5) setdest 187.048576 125.133800 11.924355"
-$ns_ at 161.000000 "$node_(6) setdest 434.736032 18.300064 9.671684"
-$ns_ at 161.000000 "$node_(7) setdest 431.202382 15.736051 3.952118"
-$ns_ at 161.000000 "$node_(8) setdest 421.173291 24.251968 3.422882"
-$ns_ at 161.000000 "$node_(9) setdest 497.627026 80.566955 15.260713"
-$ns_ at 161.000000 "$node_(10) setdest 485.182776 174.616363 10.973770"
-
-$ns_ at 162.000000 "$node_(1) setdest 76.823348 6.990102 18.481078"
-$ns_ at 162.000000 "$node_(2) setdest 155.188412 84.965774 10.090474"
-$ns_ at 162.000000 "$node_(3) setdest 123.148854 104.452853 14.168934"
-$ns_ at 162.000000 "$node_(4) setdest 146.530739 184.039119 5.177945"
-$ns_ at 162.000000 "$node_(5) setdest 185.580284 111.692807 13.520953"
-$ns_ at 162.000000 "$node_(6) setdest 423.465948 18.099012 11.271878"
-$ns_ at 162.000000 "$node_(7) setdest 426.070562 17.854362 5.551829"
-$ns_ at 162.000000 "$node_(8) setdest 416.609786 26.350567 5.022917"
-$ns_ at 162.000000 "$node_(9) setdest 480.789422 81.428650 16.859639"
-$ns_ at 162.000000 "$node_(10) setdest 473.049914 171.315733 12.573802"
-
-$ns_ at 163.000000 "$node_(1) setdest 74.663686 11.270534 4.794396"
-$ns_ at 163.000000 "$node_(2) setdest 150.947840 95.880837 11.709870"
-$ns_ at 163.000000 "$node_(3) setdest 117.765575 89.646315 15.754785"
-$ns_ at 163.000000 "$node_(4) setdest 140.287067 180.992837 6.947177"
-$ns_ at 163.000000 "$node_(5) setdest 184.617717 96.618690 15.104819"
-$ns_ at 163.000000 "$node_(6) setdest 410.594549 18.024662 12.871613"
-$ns_ at 163.000000 "$node_(7) setdest 419.556244 20.806580 7.152058"
-$ns_ at 163.000000 "$node_(8) setdest 410.491787 28.885939 6.622539"
-$ns_ at 163.000000 "$node_(9) setdest 462.331560 81.229685 18.458934"
-$ns_ at 163.000000 "$node_(10) setdest 459.326921 167.770043 14.173654"
-
-$ns_ at 164.000000 "$node_(1) setdest 77.700460 16.056801 5.668364"
-$ns_ at 164.000000 "$node_(2) setdest 148.502806 108.986321 13.331613"
-$ns_ at 164.000000 "$node_(3) setdest 109.149818 74.597894 17.340307"
-$ns_ at 164.000000 "$node_(4) setdest 131.820856 181.190189 8.468511"
-$ns_ at 164.000000 "$node_(5) setdest 185.147114 79.901197 16.725873"
-$ns_ at 164.000000 "$node_(6) setdest 396.123158 17.912799 14.471824"
-$ns_ at 164.000000 "$node_(7) setdest 411.667762 24.597608 8.752145"
-$ns_ at 164.000000 "$node_(8) setdest 402.783503 31.748758 8.222735"
-$ns_ at 164.000000 "$node_(9) setdest 442.549827 79.886156 19.827305"
-$ns_ at 164.000000 "$node_(10) setdest 443.980346 164.127469 15.772942"
-
-$ns_ at 165.000000 "$node_(1) setdest 80.751011 22.632665 7.248989"
-$ns_ at 165.000000 "$node_(2) setdest 147.928686 123.907075 14.931795"
-$ns_ at 165.000000 "$node_(3) setdest 96.035595 60.970960 18.912329"
-$ns_ at 165.000000 "$node_(4) setdest 122.502042 185.210639 10.149105"
-$ns_ at 165.000000 "$node_(5) setdest 185.141179 61.579353 18.321845"
-$ns_ at 165.000000 "$node_(6) setdest 380.051979 17.762097 16.071885"
-$ns_ at 165.000000 "$node_(7) setdest 402.404607 29.219681 10.352276"
-$ns_ at 165.000000 "$node_(8) setdest 393.507649 34.981420 9.823012"
-$ns_ at 165.000000 "$node_(9) setdest 422.735375 77.199676 19.995742"
-$ns_ at 165.000000 "$node_(10) setdest 426.942629 160.730540 17.373052"
-
-$ns_ at 166.000000 "$node_(1) setdest 82.726194 31.276530 8.866665"
-$ns_ at 166.000000 "$node_(2) setdest 148.987588 140.420750 16.547590"
-$ns_ at 166.000000 "$node_(3) setdest 78.637722 51.317801 19.896468"
-$ns_ at 166.000000 "$node_(4) setdest 111.343377 182.740860 11.428718"
-$ns_ at 166.000000 "$node_(5) setdest 183.940304 41.880407 19.735515"
-$ns_ at 166.000000 "$node_(6) setdest 362.380169 17.752944 17.671813"
-$ns_ at 166.000000 "$node_(7) setdest 391.653384 34.440900 11.951984"
-$ns_ at 166.000000 "$node_(8) setdest 382.669885 38.590161 11.422790"
-$ns_ at 166.000000 "$node_(9) setdest 403.199353 72.940877 19.994837"
-$ns_ at 166.000000 "$node_(10) setdest 408.274085 157.340788 18.973796"
-
-$ns_ at 167.000000 "$node_(1) setdest 83.836001 41.676120 10.458640"
-$ns_ at 167.000000 "$node_(2) setdest 153.399183 157.898562 18.025984"
-$ns_ at 167.000000 "$node_(3) setdest 58.975217 50.354423 19.686091"
-$ns_ at 167.000000 "$node_(4) setdest 103.966143 171.791634 13.202619"
-$ns_ at 167.000000 "$node_(5) setdest 192.412042 25.101152 18.796642"
-$ns_ at 167.000000 "$node_(6) setdest 343.128857 18.513654 19.266336"
-$ns_ at 167.000000 "$node_(7) setdest 379.364734 40.154703 13.552065"
-$ns_ at 167.000000 "$node_(8) setdest 370.163237 42.213745 13.021007"
-$ns_ at 167.000000 "$node_(9) setdest 384.109842 66.996327 19.993677"
-$ns_ at 167.000000 "$node_(10) setdest 388.699756 153.273291 19.992471"
-
-$ns_ at 168.000000 "$node_(1) setdest 84.894126 53.682119 12.052537"
-$ns_ at 168.000000 "$node_(2) setdest 167.272527 171.355308 19.327536"
-$ns_ at 168.000000 "$node_(3) setdest 50.795974 63.637111 15.599033"
-$ns_ at 168.000000 "$node_(4) setdest 99.748116 157.437131 14.961400"
-$ns_ at 168.000000 "$node_(5) setdest 198.947067 22.026635 7.222133"
-$ns_ at 168.000000 "$node_(6) setdest 323.346757 21.396871 19.991109"
-$ns_ at 168.000000 "$node_(7) setdest 365.975599 47.239433 15.148014"
-$ns_ at 168.000000 "$node_(8) setdest 355.878352 45.327028 14.620207"
-$ns_ at 168.000000 "$node_(9) setdest 365.020316 61.038320 19.997696"
-$ns_ at 168.000000 "$node_(10) setdest 369.105098 149.269829 19.999458"
-
-$ns_ at 169.000000 "$node_(1) setdest 89.451531 66.521653 13.624375"
-$ns_ at 169.000000 "$node_(2) setdest 185.788334 169.598855 18.598931"
-$ns_ at 169.000000 "$node_(3) setdest 57.023606 66.857513 7.011019"
-$ns_ at 169.000000 "$node_(4) setdest 94.375213 141.785412 16.548244"
-$ns_ at 169.000000 "$node_(5) setdest 197.685641 21.098308 1.566202"
-$ns_ at 169.000000 "$node_(6) setdest 303.800583 25.627234 19.998722"
-$ns_ at 169.000000 "$node_(7) setdest 351.976358 56.428967 16.745934"
-$ns_ at 169.000000 "$node_(8) setdest 339.845401 47.794114 16.221653"
-$ns_ at 169.000000 "$node_(9) setdest 345.625203 56.166910 19.997526"
-$ns_ at 169.000000 "$node_(10) setdest 349.412594 145.778646 19.999576"
-
-$ns_ at 170.000000 "$node_(1) setdest 98.595971 78.660537 15.197805"
-$ns_ at 170.000000 "$node_(2) setdest 191.824229 152.854155 17.799355"
-$ns_ at 170.000000 "$node_(3) setdest 65.505872 65.288800 8.626105"
-$ns_ at 170.000000 "$node_(4) setdest 84.771789 126.399680 18.136882"
-$ns_ at 170.000000 "$node_(5) setdest 194.447590 20.748193 3.256924"
-$ns_ at 170.000000 "$node_(6) setdest 284.422089 30.561769 19.996891"
-$ns_ at 170.000000 "$node_(7) setdest 336.488392 66.266943 18.348375"
-$ns_ at 170.000000 "$node_(8) setdest 322.137911 49.798598 17.820583"
-$ns_ at 170.000000 "$node_(9) setdest 325.954317 52.576373 19.995892"
-$ns_ at 170.000000 "$node_(10) setdest 329.735957 142.201287 19.999189"
-
-$ns_ at 171.000000 "$node_(1) setdest 112.977297 87.271027 16.761953"
-$ns_ at 171.000000 "$node_(2) setdest 191.611035 136.352639 16.502893"
-$ns_ at 171.000000 "$node_(3) setdest 75.600405 63.592078 10.236135"
-$ns_ at 171.000000 "$node_(4) setdest 69.325659 114.455881 19.525298"
-$ns_ at 171.000000 "$node_(5) setdest 189.626370 20.167736 4.856036"
-$ns_ at 171.000000 "$node_(6) setdest 265.427300 36.816797 19.998184"
-$ns_ at 171.000000 "$node_(7) setdest 319.125355 75.725898 19.772377"
-$ns_ at 171.000000 "$node_(8) setdest 302.740361 50.564467 19.412663"
-$ns_ at 171.000000 "$node_(9) setdest 306.097225 50.200000 19.998782"
-$ns_ at 171.000000 "$node_(10) setdest 310.324303 137.409564 19.994322"
-
-$ns_ at 172.000000 "$node_(1) setdest 130.889740 91.652087 18.440426"
-$ns_ at 172.000000 "$node_(2) setdest 188.195099 119.984720 16.720568"
-$ns_ at 172.000000 "$node_(3) setdest 87.261624 61.566337 11.835863"
-$ns_ at 172.000000 "$node_(4) setdest 50.408455 108.069384 19.966171"
-$ns_ at 172.000000 "$node_(5) setdest 183.210315 19.462493 6.454698"
-$ns_ at 172.000000 "$node_(6) setdest 246.804372 44.105199 19.998357"
-$ns_ at 172.000000 "$node_(7) setdest 300.903681 83.960245 19.995847"
-$ns_ at 172.000000 "$node_(8) setdest 282.761368 49.802834 19.993506"
-$ns_ at 172.000000 "$node_(9) setdest 286.178420 48.427559 19.997508"
-$ns_ at 172.000000 "$node_(10) setdest 291.419852 130.900985 19.993495"
-
-$ns_ at 173.000000 "$node_(1) setdest 150.117221 96.445478 19.815968"
-$ns_ at 173.000000 "$node_(2) setdest 186.605797 101.739334 18.314476"
-$ns_ at 173.000000 "$node_(3) setdest 100.596739 59.980711 13.429055"
-$ns_ at 173.000000 "$node_(4) setdest 30.490170 107.030632 19.945353"
-$ns_ at 173.000000 "$node_(5) setdest 175.384564 17.552862 8.055375"
-$ns_ at 173.000000 "$node_(6) setdest 228.279753 51.641445 19.998913"
-$ns_ at 173.000000 "$node_(7) setdest 282.201859 91.043224 19.998168"
-$ns_ at 173.000000 "$node_(8) setdest 263.086759 46.344289 19.976279"
-$ns_ at 173.000000 "$node_(9) setdest 266.189461 47.940458 19.994893"
-$ns_ at 173.000000 "$node_(10) setdest 273.195059 122.679443 19.993419"
-
-$ns_ at 174.000000 "$node_(1) setdest 168.902350 103.226473 19.971554"
-$ns_ at 174.000000 "$node_(2) setdest 184.513754 82.093305 19.757102"
-$ns_ at 174.000000 "$node_(3) setdest 115.623096 60.000922 15.026371"
-$ns_ at 174.000000 "$node_(4) setdest 11.378375 105.199769 19.199290"
-$ns_ at 174.000000 "$node_(5) setdest 165.905684 15.739495 9.650776"
-$ns_ at 174.000000 "$node_(6) setdest 210.524312 60.821660 19.988297"
-$ns_ at 174.000000 "$node_(7) setdest 263.237099 97.391304 19.999006"
-$ns_ at 174.000000 "$node_(8) setdest 244.452806 39.179900 19.963784"
-$ns_ at 174.000000 "$node_(9) setdest 246.259591 49.492870 19.990241"
-$ns_ at 174.000000 "$node_(10) setdest 255.875893 112.695630 19.990749"
-
-$ns_ at 175.000000 "$node_(1) setdest 179.680069 118.492693 18.687341"
-$ns_ at 175.000000 "$node_(2) setdest 180.258778 62.740869 19.814682"
-$ns_ at 175.000000 "$node_(3) setdest 132.021670 62.570627 16.598693"
-$ns_ at 175.000000 "$node_(4) setdest 5.755446 88.484328 17.635853"
-$ns_ at 175.000000 "$node_(5) setdest 155.223912 16.670444 10.722262"
-$ns_ at 175.000000 "$node_(6) setdest 194.092342 72.196532 19.984929"
-$ns_ at 175.000000 "$node_(7) setdest 244.024859 102.944527 19.998711"
-$ns_ at 175.000000 "$node_(8) setdest 226.039257 31.479843 19.958700"
-$ns_ at 175.000000 "$node_(9) setdest 226.666973 53.441639 19.986582"
-$ns_ at 175.000000 "$node_(10) setdest 239.867016 100.730485 19.986216"
-
-$ns_ at 176.000000 "$node_(1) setdest 178.455056 113.826735 4.824088"
-$ns_ at 176.000000 "$node_(2) setdest 170.317497 46.270492 19.238045"
-$ns_ at 176.000000 "$node_(3) setdest 148.852278 69.512159 18.205884"
-$ns_ at 176.000000 "$node_(4) setdest 7.747696 72.189753 16.415914"
-$ns_ at 176.000000 "$node_(5) setdest 155.067960 17.267330 0.616923"
-$ns_ at 176.000000 "$node_(6) setdest 179.520253 85.870172 19.982848"
-$ns_ at 176.000000 "$node_(7) setdest 224.758061 108.308526 19.999549"
-$ns_ at 176.000000 "$node_(8) setdest 206.348654 28.206572 19.960815"
-$ns_ at 176.000000 "$node_(9) setdest 207.773501 59.963121 19.987322"
-$ns_ at 176.000000 "$node_(10) setdest 225.733708 86.607919 19.979922"
-
-$ns_ at 177.000000 "$node_(1) setdest 175.246544 108.496016 6.221826"
-$ns_ at 177.000000 "$node_(2) setdest 157.726290 31.362125 19.514044"
-$ns_ at 177.000000 "$node_(3) setdest 164.683417 81.103727 19.621148"
-$ns_ at 177.000000 "$node_(4) setdest 17.513917 60.031501 15.594941"
-$ns_ at 177.000000 "$node_(5) setdest 156.535342 17.780235 1.554439"
-$ns_ at 177.000000 "$node_(6) setdest 167.122891 101.545865 19.985543"
-$ns_ at 177.000000 "$node_(7) setdest 205.299075 112.923724 19.998805"
-$ns_ at 177.000000 "$node_(8) setdest 186.493072 30.105946 19.946222"
-$ns_ at 177.000000 "$node_(9) setdest 189.928589 68.956396 19.982989"
-$ns_ at 177.000000 "$node_(10) setdest 213.261658 71.046403 19.942738"
-
-$ns_ at 178.000000 "$node_(1) setdest 172.424003 101.197065 7.825690"
-$ns_ at 178.000000 "$node_(2) setdest 142.888376 19.133692 19.227539"
-$ns_ at 178.000000 "$node_(3) setdest 174.810337 98.211073 19.880034"
-$ns_ at 178.000000 "$node_(4) setdest 31.152481 49.569283 17.189195"
-$ns_ at 178.000000 "$node_(5) setdest 159.699097 18.019297 3.172774"
-$ns_ at 178.000000 "$node_(6) setdest 157.052647 118.802745 19.980234"
-$ns_ at 178.000000 "$node_(7) setdest 185.768249 117.229326 19.999784"
-$ns_ at 178.000000 "$node_(8) setdest 167.818405 37.111714 19.945525"
-$ns_ at 178.000000 "$node_(9) setdest 173.871013 80.833808 19.972948"
-$ns_ at 178.000000 "$node_(10) setdest 196.419365 70.738967 16.845098"
-
-$ns_ at 179.000000 "$node_(1) setdest 170.753363 91.918408 9.427858"
-$ns_ at 179.000000 "$node_(2) setdest 125.010723 12.749372 18.983414"
-$ns_ at 179.000000 "$node_(3) setdest 181.874760 116.920836 19.999033"
-$ns_ at 179.000000 "$node_(4) setdest 46.551054 38.789818 18.796620"
-$ns_ at 179.000000 "$node_(5) setdest 163.906434 16.048997 4.645834"
-$ns_ at 179.000000 "$node_(6) setdest 150.159618 137.551322 19.975559"
-$ns_ at 179.000000 "$node_(7) setdest 166.344084 121.993628 19.999919"
-$ns_ at 179.000000 "$node_(8) setdest 150.738069 47.480338 19.981147"
-$ns_ at 179.000000 "$node_(9) setdest 160.581359 95.722920 19.957469"
-$ns_ at 179.000000 "$node_(10) setdest 195.672687 84.091040 13.372934"
-
-$ns_ at 180.000000 "$node_(1) setdest 170.379290 80.898702 11.026053"
-$ns_ at 180.000000 "$node_(2) setdest 106.108663 11.307135 18.957001"
-$ns_ at 180.000000 "$node_(3) setdest 186.831517 136.224536 19.929934"
-$ns_ at 180.000000 "$node_(4) setdest 63.824239 28.948857 19.879825"
-$ns_ at 180.000000 "$node_(5) setdest 169.419179 13.556525 6.050023"
-$ns_ at 180.000000 "$node_(6) setdest 147.828308 157.269197 19.855216"
-$ns_ at 180.000000 "$node_(7) setdest 147.059157 127.267473 19.993046"
-$ns_ at 180.000000 "$node_(8) setdest 134.966214 59.765581 19.991963"
-$ns_ at 180.000000 "$node_(9) setdest 151.747848 113.601200 19.941509"
-$ns_ at 180.000000 "$node_(10) setdest 189.493134 92.502152 10.437130"
-
-$ns_ at 181.000000 "$node_(1) setdest 171.163052 68.288192 12.634842"
-$ns_ at 181.000000 "$node_(2) setdest 91.123305 20.053465 17.351060"
-$ns_ at 181.000000 "$node_(3) setdest 188.637831 156.141046 19.998253"
-$ns_ at 181.000000 "$node_(4) setdest 82.685943 28.747684 18.862777"
-$ns_ at 181.000000 "$node_(5) setdest 172.747269 19.290485 6.629817"
-$ns_ at 181.000000 "$node_(6) setdest 160.476531 170.330272 18.181563"
-$ns_ at 181.000000 "$node_(7) setdest 128.509912 134.706388 19.985292"
-$ns_ at 181.000000 "$node_(8) setdest 117.253969 68.951910 19.952752"
-$ns_ at 181.000000 "$node_(9) setdest 145.153561 132.482364 19.999575"
-$ns_ at 181.000000 "$node_(10) setdest 178.683836 98.024600 12.138302"
-
-$ns_ at 182.000000 "$node_(1) setdest 172.888706 54.198358 14.195116"
-$ns_ at 182.000000 "$node_(2) setdest 83.890009 35.949121 17.464032"
-$ns_ at 182.000000 "$node_(3) setdest 190.094980 176.021799 19.934083"
-$ns_ at 182.000000 "$node_(4) setdest 96.855632 39.340425 17.691417"
-$ns_ at 182.000000 "$node_(5) setdest 173.027925 27.952089 8.666149"
-$ns_ at 182.000000 "$node_(6) setdest 177.244737 175.603016 17.577672"
-$ns_ at 182.000000 "$node_(7) setdest 111.416146 145.032855 19.970798"
-$ns_ at 182.000000 "$node_(8) setdest 97.650034 72.426294 19.909435"
-$ns_ at 182.000000 "$node_(9) setdest 139.260466 151.590578 19.996310"
-$ns_ at 182.000000 "$node_(10) setdest 167.962697 106.536181 13.689040"
-
-$ns_ at 183.000000 "$node_(1) setdest 180.428826 40.405392 15.719393"
-$ns_ at 183.000000 "$node_(2) setdest 80.665629 54.207418 18.540821"
-$ns_ at 183.000000 "$node_(3) setdest 196.076606 187.662698 13.087794"
-$ns_ at 183.000000 "$node_(4) setdest 113.096835 43.407822 16.742771"
-$ns_ at 183.000000 "$node_(5) setdest 175.004921 38.052270 10.291850"
-$ns_ at 183.000000 "$node_(6) setdest 192.567746 173.044954 15.535067"
-$ns_ at 183.000000 "$node_(7) setdest 94.933105 156.301721 19.966922"
-$ns_ at 183.000000 "$node_(8) setdest 78.202415 68.303846 19.879749"
-$ns_ at 183.000000 "$node_(9) setdest 128.466810 168.153105 19.769176"
-$ns_ at 183.000000 "$node_(10) setdest 155.692441 115.659456 15.290302"
-
-$ns_ at 184.000000 "$node_(1) setdest 194.682139 32.290056 16.401695"
-$ns_ at 184.000000 "$node_(2) setdest 71.721236 70.341996 18.447948"
-$ns_ at 184.000000 "$node_(3) setdest 195.005636 184.210017 3.614967"
-$ns_ at 184.000000 "$node_(4) setdest 131.373418 43.329977 18.276749"
-$ns_ at 184.000000 "$node_(5) setdest 177.681189 49.641032 11.893773"
-$ns_ at 184.000000 "$node_(6) setdest 192.538130 172.725928 0.320398"
-$ns_ at 184.000000 "$node_(7) setdest 76.208559 163.180223 19.947993"
-$ns_ at 184.000000 "$node_(8) setdest 59.386392 61.528995 19.998534"
-$ns_ at 184.000000 "$node_(9) setdest 119.659162 170.816167 9.201443"
-$ns_ at 184.000000 "$node_(10) setdest 139.468774 119.990598 16.791848"
-
-$ns_ at 185.000000 "$node_(1) setdest 195.613467 33.069178 1.214250"
-$ns_ at 185.000000 "$node_(2) setdest 72.027737 89.787372 19.447792"
-$ns_ at 185.000000 "$node_(3) setdest 194.672645 188.582756 4.385400"
-$ns_ at 185.000000 "$node_(4) setdest 134.492679 47.692958 5.363338"
-$ns_ at 185.000000 "$node_(5) setdest 173.964993 62.431439 13.319333"
-$ns_ at 185.000000 "$node_(6) setdest 191.099665 172.527656 1.452065"
-$ns_ at 185.000000 "$node_(7) setdest 56.380453 165.404161 19.952436"
-$ns_ at 185.000000 "$node_(8) setdest 40.804330 54.137082 19.998335"
-$ns_ at 185.000000 "$node_(9) setdest 119.805941 169.859912 0.967454"
-$ns_ at 185.000000 "$node_(10) setdest 121.371407 116.477413 18.435216"
-
-$ns_ at 186.000000 "$node_(1) setdest 195.523460 35.547228 2.479684"
-$ns_ at 186.000000 "$node_(2) setdest 72.860222 109.769952 19.999913"
-$ns_ at 186.000000 "$node_(3) setdest 193.465576 194.532746 6.071194"
-$ns_ at 186.000000 "$node_(4) setdest 134.472696 54.482129 6.789201"
-$ns_ at 186.000000 "$node_(5) setdest 169.445995 76.675295 14.943519"
-$ns_ at 186.000000 "$node_(6) setdest 188.017704 172.548818 3.082034"
-$ns_ at 186.000000 "$node_(7) setdest 36.936529 161.362410 19.859555"
-$ns_ at 186.000000 "$node_(8) setdest 21.592497 48.640305 19.982719"
-$ns_ at 186.000000 "$node_(9) setdest 120.575903 167.393762 2.583551"
-$ns_ at 186.000000 "$node_(10) setdest 104.372214 106.231584 19.848162"
-
-$ns_ at 187.000000 "$node_(1) setdest 195.465659 39.626432 4.079614"
-$ns_ at 187.000000 "$node_(2) setdest 73.033876 129.767033 19.997835"
-$ns_ at 187.000000 "$node_(3) setdest 192.328990 202.117959 7.669894"
-$ns_ at 187.000000 "$node_(4) setdest 134.718626 62.867220 8.388696"
-$ns_ at 187.000000 "$node_(5) setdest 165.002660 92.609977 16.542591"
-$ns_ at 187.000000 "$node_(6) setdest 183.363363 172.076516 4.678243"
-$ns_ at 187.000000 "$node_(7) setdest 27.040671 147.302132 17.193587"
-$ns_ at 187.000000 "$node_(8) setdest 15.086590 34.481154 15.582310"
-$ns_ at 187.000000 "$node_(9) setdest 122.262624 163.566603 4.182365"
-$ns_ at 187.000000 "$node_(10) setdest 87.019330 96.377428 19.955625"
-
-$ns_ at 188.000000 "$node_(1) setdest 195.493442 45.306014 5.679650"
-$ns_ at 188.000000 "$node_(2) setdest 72.088632 149.742168 19.997487"
-$ns_ at 188.000000 "$node_(3) setdest 191.694603 211.364885 9.268662"
-$ns_ at 188.000000 "$node_(4) setdest 135.397225 72.832879 9.988737"
-$ns_ at 188.000000 "$node_(5) setdest 160.860419 110.273346 18.142567"
-$ns_ at 188.000000 "$node_(6) setdest 177.331385 170.366266 6.269746"
-$ns_ at 188.000000 "$node_(7) setdest 33.339932 142.144690 8.141247"
-$ns_ at 188.000000 "$node_(8) setdest 25.950932 28.357513 12.471284"
-$ns_ at 188.000000 "$node_(9) setdest 125.574753 158.840877 5.770848"
-$ns_ at 188.000000 "$node_(10) setdest 73.723879 81.531864 19.928868"
-
-$ns_ at 189.000000 "$node_(1) setdest 195.501926 52.585695 7.279686"
-$ns_ at 189.000000 "$node_(2) setdest 70.118723 169.643281 19.998371"
-$ns_ at 189.000000 "$node_(3) setdest 191.784503 222.234607 10.870094"
-$ns_ at 189.000000 "$node_(4) setdest 136.587465 84.360558 11.588963"
-$ns_ at 189.000000 "$node_(5) setdest 157.134792 129.574013 19.656960"
-$ns_ at 189.000000 "$node_(6) setdest 170.511875 166.445811 7.866110"
-$ns_ at 189.000000 "$node_(7) setdest 42.075135 137.545000 9.872230"
-$ns_ at 189.000000 "$node_(8) setdest 39.756298 24.207709 14.415582"
-$ns_ at 189.000000 "$node_(9) setdest 131.266657 154.174797 7.360033"
-$ns_ at 189.000000 "$node_(10) setdest 62.437001 65.038639 19.985497"
-
-$ns_ at 190.000000 "$node_(1) setdest 195.416493 61.464644 8.879359"
-$ns_ at 190.000000 "$node_(2) setdest 67.278825 189.439428 19.998811"
-$ns_ at 190.000000 "$node_(3) setdest 192.074302 234.702462 12.471222"
-$ns_ at 190.000000 "$node_(4) setdest 138.172614 97.454006 13.189051"
-$ns_ at 190.000000 "$node_(5) setdest 154.020435 149.328771 19.998742"
-$ns_ at 190.000000 "$node_(6) setdest 163.520779 160.060724 9.468092"
-$ns_ at 190.000000 "$node_(7) setdest 51.690561 131.290754 11.470484"
-$ns_ at 190.000000 "$node_(8) setdest 55.087819 19.437284 16.056541"
-$ns_ at 190.000000 "$node_(9) setdest 139.311546 150.191848 8.976865"
-$ns_ at 190.000000 "$node_(10) setdest 59.419189 45.948052 19.327640"
-
-$ns_ at 191.000000 "$node_(1) setdest 195.032236 71.937101 10.479504"
-$ns_ at 191.000000 "$node_(2) setdest 63.774126 209.129366 19.999414"
-$ns_ at 191.000000 "$node_(3) setdest 192.134525 248.773197 14.070864"
-$ns_ at 191.000000 "$node_(4) setdest 140.151210 112.110209 14.789156"
-$ns_ at 191.000000 "$node_(5) setdest 151.528492 169.172266 19.999351"
-$ns_ at 191.000000 "$node_(6) setdest 156.653106 151.371539 11.075507"
-$ns_ at 191.000000 "$node_(7) setdest 61.020362 122.160481 13.054006"
-$ns_ at 191.000000 "$node_(8) setdest 72.246356 15.431568 17.619908"
-$ns_ at 191.000000 "$node_(9) setdest 149.037901 146.020315 10.583179"
-$ns_ at 191.000000 "$node_(10) setdest 62.233515 26.981985 19.173735"
-
-$ns_ at 192.000000 "$node_(1) setdest 194.328858 83.995651 12.079047"
-$ns_ at 192.000000 "$node_(2) setdest 60.068139 228.782066 19.999074"
-$ns_ at 192.000000 "$node_(3) setdest 191.210367 264.413225 15.667308"
-$ns_ at 192.000000 "$node_(4) setdest 142.034412 128.390629 16.388976"
-$ns_ at 192.000000 "$node_(5) setdest 149.209226 189.037194 19.999859"
-$ns_ at 192.000000 "$node_(6) setdest 149.885588 140.648727 12.679826"
-$ns_ at 192.000000 "$node_(7) setdest 70.178665 110.699923 14.670341"
-$ns_ at 192.000000 "$node_(8) setdest 91.480263 14.579377 19.252776"
-$ns_ at 192.000000 "$node_(9) setdest 160.621424 145.650484 11.589425"
-$ns_ at 192.000000 "$node_(10) setdest 71.531198 10.851366 18.618372"
-
-$ns_ at 193.000000 "$node_(1) setdest 193.150556 97.624358 13.679549"
-$ns_ at 193.000000 "$node_(2) setdest 56.962041 248.539067 19.999673"
-$ns_ at 193.000000 "$node_(3) setdest 188.728422 281.499973 17.266065"
-$ns_ at 193.000000 "$node_(4) setdest 143.661611 146.305417 17.988535"
-$ns_ at 193.000000 "$node_(5) setdest 146.639128 208.871240 19.999870"
-$ns_ at 193.000000 "$node_(6) setdest 141.678111 128.965386 14.278065"
-$ns_ at 193.000000 "$node_(7) setdest 77.526460 96.240451 16.219323"
-$ns_ at 193.000000 "$node_(8) setdest 111.285642 11.901841 19.985551"
-$ns_ at 193.000000 "$node_(9) setdest 162.320582 151.191100 5.795306"
-$ns_ at 193.000000 "$node_(10) setdest 69.434904 14.512209 4.218556"
-
-$ns_ at 194.000000 "$node_(1) setdest 191.331293 112.793988 15.278331"
-$ns_ at 194.000000 "$node_(2) setdest 54.045499 268.325206 19.999938"
-$ns_ at 194.000000 "$node_(3) setdest 184.809887 299.958796 18.870163"
-$ns_ at 194.000000 "$node_(4) setdest 144.576980 165.824228 19.540263"
-$ns_ at 194.000000 "$node_(5) setdest 143.541952 228.628802 19.998844"
-$ns_ at 194.000000 "$node_(6) setdest 132.011405 116.363647 15.882350"
-$ns_ at 194.000000 "$node_(7) setdest 81.390315 78.832201 17.831897"
-$ns_ at 194.000000 "$node_(8) setdest 130.995388 8.526521 19.996672"
-$ns_ at 194.000000 "$node_(9) setdest 158.304055 156.109234 6.349844"
-$ns_ at 194.000000 "$node_(10) setdest 64.357297 23.822765 10.605120"
-
-$ns_ at 195.000000 "$node_(1) setdest 188.282059 129.392447 16.876216"
-$ns_ at 195.000000 "$node_(2) setdest 51.150472 288.114471 19.999904"
-$ns_ at 195.000000 "$node_(3) setdest 179.637007 319.243200 19.966145"
-$ns_ at 195.000000 "$node_(4) setdest 144.982177 185.819869 19.999746"
-$ns_ at 195.000000 "$node_(5) setdest 139.870629 248.288518 19.999576"
-$ns_ at 195.000000 "$node_(6) setdest 122.921583 101.453520 17.462438"
-$ns_ at 195.000000 "$node_(7) setdest 80.824768 59.414565 19.425870"
-$ns_ at 195.000000 "$node_(8) setdest 150.685052 6.112369 19.837111"
-$ns_ at 195.000000 "$node_(9) setdest 153.669623 162.564787 7.946831"
-$ns_ at 195.000000 "$node_(10) setdest 62.963882 36.031903 12.288395"
-
-$ns_ at 196.000000 "$node_(1) setdest 183.957321 147.358510 18.479253"
-$ns_ at 196.000000 "$node_(2) setdest 48.611087 307.952411 19.999809"
-$ns_ at 196.000000 "$node_(3) setdest 172.922634 338.070779 19.989011"
-$ns_ at 196.000000 "$node_(4) setdest 145.105736 205.819344 19.999857"
-$ns_ at 196.000000 "$node_(5) setdest 135.716006 267.851495 19.999273"
-$ns_ at 196.000000 "$node_(6) setdest 114.965812 84.111046 19.080244"
-$ns_ at 196.000000 "$node_(7) setdest 77.199943 39.771797 19.974427"
-$ns_ at 196.000000 "$node_(8) setdest 170.172454 10.569598 19.990641"
-$ns_ at 196.000000 "$node_(9) setdest 146.820750 169.209669 9.542616"
-$ns_ at 196.000000 "$node_(10) setdest 65.562221 49.704614 13.917413"
-
-$ns_ at 197.000000 "$node_(1) setdest 179.424231 166.672897 19.839215"
-$ns_ at 197.000000 "$node_(2) setdest 46.811525 327.868842 19.997566"
-$ns_ at 197.000000 "$node_(3) setdest 163.939414 355.929108 19.990452"
-$ns_ at 197.000000 "$node_(4) setdest 145.006109 225.818471 19.999375"
-$ns_ at 197.000000 "$node_(5) setdest 130.662166 287.197475 19.995206"
-$ns_ at 197.000000 "$node_(6) setdest 106.357417 66.062345 19.996501"
-$ns_ at 197.000000 "$node_(7) setdest 75.946021 20.181201 19.630684"
-$ns_ at 197.000000 "$node_(8) setdest 188.099728 18.417830 19.569923"
-$ns_ at 197.000000 "$node_(9) setdest 138.645810 176.738594 11.113701"
-$ns_ at 197.000000 "$node_(10) setdest 71.277978 64.136289 15.522342"
-
-$ns_ at 198.000000 "$node_(1) setdest 175.356307 186.254820 19.999992"
-$ns_ at 198.000000 "$node_(2) setdest 45.427324 347.820835 19.999951"
-$ns_ at 198.000000 "$node_(3) setdest 152.416252 372.246071 19.975649"
-$ns_ at 198.000000 "$node_(4) setdest 143.832197 245.780166 19.996183"
-$ns_ at 198.000000 "$node_(5) setdest 123.549176 305.874927 19.986041"
-$ns_ at 198.000000 "$node_(6) setdest 95.007893 49.716550 19.899666"
-$ns_ at 198.000000 "$node_(7) setdest 89.910882 8.256505 18.363434"
-$ns_ at 198.000000 "$node_(8) setdest 186.767229 35.321285 16.955895"
-$ns_ at 198.000000 "$node_(9) setdest 140.360459 185.666801 9.091364"
-$ns_ at 198.000000 "$node_(10) setdest 79.585340 79.054188 17.075010"
-
-$ns_ at 199.000000 "$node_(1) setdest 171.310371 205.841290 19.999985"
-$ns_ at 199.000000 "$node_(2) setdest 45.246485 367.808943 19.988926"
-$ns_ at 199.000000 "$node_(3) setdest 141.026187 379.353825 13.425861"
-$ns_ at 199.000000 "$node_(4) setdest 141.471649 265.638334 19.997976"
-$ns_ at 199.000000 "$node_(5) setdest 113.615585 323.205618 19.975712"
-$ns_ at 199.000000 "$node_(6) setdest 77.769915 49.534854 17.238935"
-$ns_ at 199.000000 "$node_(7) setdest 106.824065 10.366785 17.044326"
-$ns_ at 199.000000 "$node_(8) setdest 175.640526 47.155431 16.243476"
-$ns_ at 199.000000 "$node_(9) setdest 145.881782 184.022631 5.760929"
-$ns_ at 199.000000 "$node_(10) setdest 88.755604 95.337817 18.688240"
-
-$ns_ at 200.000000 "$node_(1) setdest 167.224719 225.419522 19.999993"
-$ns_ at 200.000000 "$node_(2) setdest 49.050666 387.354600 19.912420"
-$ns_ at 200.000000 "$node_(3) setdest 144.119591 377.312601 3.706177"
-$ns_ at 200.000000 "$node_(4) setdest 138.256986 285.377161 19.998884"
-$ns_ at 200.000000 "$node_(5) setdest 100.527566 338.285629 19.967548"
-$ns_ at 200.000000 "$node_(6) setdest 72.091162 65.514596 16.958785"
-$ns_ at 200.000000 "$node_(7) setdest 122.081158 16.304017 16.371610"
-$ns_ at 200.000000 "$node_(8) setdest 160.926667 51.839992 15.441592"
-$ns_ at 200.000000 "$node_(9) setdest 149.142428 177.126205 7.628401"
-$ns_ at 200.000000 "$node_(10) setdest 99.613365 111.937528 19.835356"
-
-$ns_ at 201.000000 "$node_(1) setdest 163.241486 245.018750 19.999897"
-$ns_ at 201.000000 "$node_(2) setdest 61.654558 402.610167 19.788644"
-$ns_ at 201.000000 "$node_(3) setdest 149.076068 375.294812 5.351461"
-$ns_ at 201.000000 "$node_(4) setdest 134.200711 304.958942 19.997488"
-$ns_ at 201.000000 "$node_(5) setdest 84.538504 350.240382 19.964123"
-$ns_ at 201.000000 "$node_(6) setdest 67.136324 80.376662 15.666251"
-$ns_ at 201.000000 "$node_(7) setdest 139.717702 18.648063 17.791633"
-$ns_ at 201.000000 "$node_(8) setdest 145.832431 59.287246 16.831446"
-$ns_ at 201.000000 "$node_(9) setdest 152.552155 168.551362 9.227902"
-$ns_ at 201.000000 "$node_(10) setdest 117.014782 121.404332 19.809839"
-
-$ns_ at 202.000000 "$node_(1) setdest 159.391115 264.644218 19.999609"
-$ns_ at 202.000000 "$node_(2) setdest 78.236392 413.777419 19.991617"
-$ns_ at 202.000000 "$node_(3) setdest 155.820516 373.560161 6.963950"
-$ns_ at 202.000000 "$node_(4) setdest 129.372934 324.366691 19.999203"
-$ns_ at 202.000000 "$node_(5) setdest 66.671342 359.206049 19.990464"
-$ns_ at 202.000000 "$node_(6) setdest 59.005599 94.783951 16.543236"
-$ns_ at 202.000000 "$node_(7) setdest 158.694781 17.342255 19.021952"
-$ns_ at 202.000000 "$node_(8) setdest 128.180124 62.164422 17.885247"
-$ns_ at 202.000000 "$node_(9) setdest 155.239978 158.052038 10.837906"
-$ns_ at 202.000000 "$node_(10) setdest 136.907991 122.875448 19.947530"
-
-$ns_ at 203.000000 "$node_(1) setdest 156.090421 284.369430 19.999465"
-$ns_ at 203.000000 "$node_(2) setdest 95.064626 424.526948 19.968521"
-$ns_ at 203.000000 "$node_(3) setdest 163.970693 371.055823 8.526259"
-$ns_ at 203.000000 "$node_(4) setdest 123.550868 343.497632 19.997233"
-$ns_ at 203.000000 "$node_(5) setdest 47.626658 365.068247 19.926499"
-$ns_ at 203.000000 "$node_(6) setdest 44.129184 104.390756 17.708711"
-$ns_ at 203.000000 "$node_(7) setdest 173.699979 7.360376 18.022038"
-$ns_ at 203.000000 "$node_(8) setdest 113.299302 53.211896 17.366248"
-$ns_ at 203.000000 "$node_(9) setdest 158.404079 146.023580 12.437658"
-$ns_ at 203.000000 "$node_(10) setdest 156.369232 118.860713 19.871034"
-
-$ns_ at 204.000000 "$node_(1) setdest 153.023861 304.132837 19.999901"
-$ns_ at 204.000000 "$node_(2) setdest 111.823384 435.393263 19.973301"
-$ns_ at 204.000000 "$node_(3) setdest 169.826488 362.901841 10.038813"
-$ns_ at 204.000000 "$node_(4) setdest 116.289633 362.124419 19.992067"
-$ns_ at 204.000000 "$node_(5) setdest 28.522161 370.489417 19.858773"
-$ns_ at 204.000000 "$node_(6) setdest 27.051512 112.644070 18.967447"
-$ns_ at 204.000000 "$node_(7) setdest 180.486356 8.534284 6.887160"
-$ns_ at 204.000000 "$node_(8) setdest 98.103987 42.322359 18.694375"
-$ns_ at 204.000000 "$node_(9) setdest 161.029362 132.243002 14.028416"
-$ns_ at 204.000000 "$node_(10) setdest 172.443816 107.486758 19.691600"
-
-$ns_ at 205.000000 "$node_(1) setdest 149.277393 323.777154 19.998380"
-$ns_ at 205.000000 "$node_(2) setdest 129.394110 444.945228 19.999261"
-$ns_ at 205.000000 "$node_(3) setdest 168.110917 364.353857 2.247562"
-$ns_ at 205.000000 "$node_(4) setdest 106.734376 379.674290 19.982515"
-$ns_ at 205.000000 "$node_(5) setdest 24.594624 377.857992 8.349937"
-$ns_ at 205.000000 "$node_(6) setdest 9.174780 116.138563 18.215078"
-$ns_ at 205.000000 "$node_(7) setdest 181.039157 13.299606 4.797278"
-$ns_ at 205.000000 "$node_(8) setdest 82.787587 30.297708 19.472656"
-$ns_ at 205.000000 "$node_(9) setdest 162.200630 116.656242 15.630705"
-$ns_ at 205.000000 "$node_(10) setdest 181.116590 90.598550 18.984958"
-
-$ns_ at 206.000000 "$node_(1) setdest 144.598638 343.219337 19.997231"
-$ns_ at 206.000000 "$node_(2) setdest 147.113812 454.211788 19.996424"
-$ns_ at 206.000000 "$node_(3) setdest 161.975039 369.257123 7.854363"
-$ns_ at 206.000000 "$node_(4) setdest 94.731875 395.657510 19.988080"
-$ns_ at 206.000000 "$node_(5) setdest 28.110519 380.700946 4.521493"
-$ns_ at 206.000000 "$node_(6) setdest 5.389523 111.880557 5.697261"
-$ns_ at 206.000000 "$node_(7) setdest 182.643028 19.505356 6.409660"
-$ns_ at 206.000000 "$node_(8) setdest 66.703839 19.152674 19.567798"
-$ns_ at 206.000000 "$node_(9) setdest 163.096529 99.441502 17.238037"
-$ns_ at 206.000000 "$node_(10) setdest 185.879217 71.902868 19.292773"
-
-$ns_ at 207.000000 "$node_(1) setdest 138.750622 362.341225 19.996146"
-$ns_ at 207.000000 "$node_(2) setdest 163.876030 465.070012 19.971805"
-$ns_ at 207.000000 "$node_(3) setdest 153.481555 373.421602 9.459501"
-$ns_ at 207.000000 "$node_(4) setdest 81.367103 410.535184 19.999058"
-$ns_ at 207.000000 "$node_(5) setdest 33.182405 384.121656 6.117622"
-$ns_ at 207.000000 "$node_(6) setdest 7.670427 109.002037 3.672656"
-$ns_ at 207.000000 "$node_(7) setdest 183.240979 27.459965 7.977052"
-$ns_ at 207.000000 "$node_(8) setdest 48.471800 15.353912 18.623584"
-$ns_ at 207.000000 "$node_(9) setdest 164.150679 80.632580 18.838438"
-$ns_ at 207.000000 "$node_(10) setdest 185.014933 52.993766 18.928844"
-
-$ns_ at 208.000000 "$node_(1) setdest 131.154711 380.829290 19.987657"
-$ns_ at 208.000000 "$node_(2) setdest 180.272876 476.520635 19.999333"
-$ns_ at 208.000000 "$node_(3) setdest 143.368479 377.932962 11.073692"
-$ns_ at 208.000000 "$node_(4) setdest 69.391507 426.525693 19.977769"
-$ns_ at 208.000000 "$node_(5) setdest 39.946435 387.849275 7.723163"
-$ns_ at 208.000000 "$node_(6) setdest 10.931499 104.858445 5.272945"
-$ns_ at 208.000000 "$node_(7) setdest 180.816137 36.719425 9.571701"
-$ns_ at 208.000000 "$node_(8) setdest 30.381523 9.369616 19.054393"
-$ns_ at 208.000000 "$node_(9) setdest 164.385587 60.684667 19.949297"
-$ns_ at 208.000000 "$node_(10) setdest 174.507313 38.662418 17.770695"
-
-$ns_ at 209.000000 "$node_(1) setdest 121.092963 398.095887 19.984348"
-$ns_ at 209.000000 "$node_(2) setdest 189.211708 490.664051 16.731375"
-$ns_ at 209.000000 "$node_(3) setdest 131.945788 383.417256 12.671044"
-$ns_ at 209.000000 "$node_(4) setdest 59.975120 444.153298 19.985015"
-$ns_ at 209.000000 "$node_(5) setdest 48.328073 391.937141 9.325369"
-$ns_ at 209.000000 "$node_(6) setdest 14.411675 98.942625 6.863568"
-$ns_ at 209.000000 "$node_(7) setdest 175.728098 46.705469 11.207551"
-$ns_ at 209.000000 "$node_(8) setdest 12.204122 7.859309 18.240037"
-$ns_ at 209.000000 "$node_(9) setdest 159.026552 41.578356 19.843648"
-$ns_ at 209.000000 "$node_(10) setdest 163.369819 23.521448 18.796083"
-
-$ns_ at 210.000000 "$node_(1) setdest 108.982057 413.993854 19.985480"
-$ns_ at 210.000000 "$node_(2) setdest 180.764820 496.526252 10.281795"
-$ns_ at 210.000000 "$node_(3) setdest 119.741871 390.808564 14.267692"
-$ns_ at 210.000000 "$node_(4) setdest 53.047125 462.900705 19.986555"
-$ns_ at 210.000000 "$node_(5) setdest 57.929229 397.148381 10.924249"
-$ns_ at 210.000000 "$node_(6) setdest 16.629371 90.783736 8.454918"
-$ns_ at 210.000000 "$node_(7) setdest 170.109979 58.216735 12.809079"
-$ns_ at 210.000000 "$node_(8) setdest 7.612919 9.823576 4.993745"
-$ns_ at 210.000000 "$node_(9) setdest 144.943214 27.647777 19.809125"
-$ns_ at 210.000000 "$node_(10) setdest 151.654646 8.351943 19.166615"
-
-$ns_ at 211.000000 "$node_(1) setdest 94.765433 428.045068 19.988722"
-$ns_ at 211.000000 "$node_(2) setdest 169.488840 501.292361 12.241876"
-$ns_ at 211.000000 "$node_(3) setdest 106.907423 400.126968 15.860507"
-$ns_ at 211.000000 "$node_(4) setdest 49.262673 482.502882 19.964153"
-$ns_ at 211.000000 "$node_(5) setdest 68.775716 403.409497 12.523891"
-$ns_ at 211.000000 "$node_(6) setdest 18.101119 80.820271 10.071578"
-$ns_ at 211.000000 "$node_(7) setdest 164.220636 71.367090 14.408894"
-$ns_ at 211.000000 "$node_(8) setdest 8.398181 10.582628 1.092152"
-$ns_ at 211.000000 "$node_(9) setdest 126.252440 20.979851 19.844553"
-$ns_ at 211.000000 "$node_(10) setdest 150.671362 7.925031 1.071962"
-
-$ns_ at 212.000000 "$node_(1) setdest 79.694798 440.482197 19.539862"
-$ns_ at 212.000000 "$node_(2) setdest 158.086396 509.199851 13.876027"
-$ns_ at 212.000000 "$node_(3) setdest 93.891593 411.784206 17.472923"
-$ns_ at 212.000000 "$node_(4) setdest 51.602803 502.238394 19.873768"
-$ns_ at 212.000000 "$node_(5) setdest 79.786377 412.225707 14.105326"
-$ns_ at 212.000000 "$node_(6) setdest 18.082994 69.169270 11.651015"
-$ns_ at 212.000000 "$node_(7) setdest 156.452151 85.357032 16.002119"
-$ns_ at 212.000000 "$node_(8) setdest 10.252534 12.543807 2.699046"
-$ns_ at 212.000000 "$node_(9) setdest 106.444082 18.349570 19.982227"
-$ns_ at 212.000000 "$node_(10) setdest 150.561643 9.241322 1.320856"
-
-$ns_ at 213.000000 "$node_(1) setdest 74.331248 439.156532 5.524948"
-$ns_ at 213.000000 "$node_(2) setdest 147.109484 520.059714 15.441154"
-$ns_ at 213.000000 "$node_(3) setdest 78.802986 423.444845 19.069257"
-$ns_ at 213.000000 "$node_(4) setdest 64.714464 515.886813 18.926040"
-$ns_ at 213.000000 "$node_(5) setdest 90.367257 423.848581 15.717704"
-$ns_ at 213.000000 "$node_(6) setdest 15.231940 56.211466 13.267750"
-$ns_ at 213.000000 "$node_(7) setdest 146.294162 99.736602 17.605590"
-$ns_ at 213.000000 "$node_(8) setdest 12.764348 16.030199 4.296992"
-$ns_ at 213.000000 "$node_(9) setdest 87.094251 13.355646 19.983875"
-$ns_ at 213.000000 "$node_(10) setdest 150.265932 12.167440 2.941022"
-
-$ns_ at 214.000000 "$node_(1) setdest 75.387413 435.963971 3.362726"
-$ns_ at 214.000000 "$node_(2) setdest 134.637490 531.303365 16.791972"
-$ns_ at 214.000000 "$node_(3) setdest 63.111503 435.821747 19.985253"
-$ns_ at 214.000000 "$node_(4) setdest 82.741655 517.689625 18.117113"
-$ns_ at 214.000000 "$node_(5) setdest 100.190863 438.094362 17.304495"
-$ns_ at 214.000000 "$node_(6) setdest 11.435316 41.831751 14.872477"
-$ns_ at 214.000000 "$node_(7) setdest 134.405054 114.825240 19.209838"
-$ns_ at 214.000000 "$node_(8) setdest 15.786921 21.097420 5.900227"
-$ns_ at 214.000000 "$node_(9) setdest 67.206233 11.386313 19.985283"
-$ns_ at 214.000000 "$node_(10) setdest 150.233247 16.709509 4.542186"
-
-$ns_ at 215.000000 "$node_(1) setdest 78.105600 431.749429 5.015068"
-$ns_ at 215.000000 "$node_(2) setdest 119.211728 527.255675 15.947976"
-$ns_ at 215.000000 "$node_(3) setdest 48.423135 449.394750 19.999364"
-$ns_ at 215.000000 "$node_(4) setdest 100.521552 517.808971 17.780297"
-$ns_ at 215.000000 "$node_(5) setdest 109.423660 454.614792 18.925357"
-$ns_ at 215.000000 "$node_(6) setdest 16.762073 29.826767 13.133696"
-$ns_ at 215.000000 "$node_(7) setdest 121.638439 130.219167 19.998986"
-$ns_ at 215.000000 "$node_(8) setdest 20.223833 27.143327 7.499279"
-$ns_ at 215.000000 "$node_(9) setdest 47.635785 14.277190 19.782811"
-$ns_ at 215.000000 "$node_(10) setdest 149.981298 22.846536 6.142197"
-
-$ns_ at 216.000000 "$node_(1) setdest 82.316111 426.647880 6.614696"
-$ns_ at 216.000000 "$node_(2) setdest 110.714063 514.069971 15.686717"
-$ns_ at 216.000000 "$node_(3) setdest 34.234170 463.437881 19.963373"
-$ns_ at 216.000000 "$node_(4) setdest 119.756878 518.623367 19.252559"
-$ns_ at 216.000000 "$node_(5) setdest 118.021417 472.643823 19.974168"
-$ns_ at 216.000000 "$node_(6) setdest 24.439905 33.577223 8.544883"
-$ns_ at 216.000000 "$node_(7) setdest 109.264356 145.928934 19.997868"
-$ns_ at 216.000000 "$node_(8) setdest 26.436807 33.784570 9.094347"
-$ns_ at 216.000000 "$node_(9) setdest 34.763093 28.005283 18.819318"
-$ns_ at 216.000000 "$node_(10) setdest 149.466985 30.571752 7.742318"
-
-$ns_ at 217.000000 "$node_(1) setdest 87.966643 420.681429 8.217484"
-$ns_ at 217.000000 "$node_(2) setdest 106.139891 497.477479 17.211446"
-$ns_ at 217.000000 "$node_(3) setdest 24.871837 481.006527 19.907551"
-$ns_ at 217.000000 "$node_(4) setdest 139.198045 521.043816 19.591262"
-$ns_ at 217.000000 "$node_(5) setdest 125.144910 491.320562 19.989115"
-$ns_ at 217.000000 "$node_(6) setdest 29.906717 42.714611 10.647906"
-$ns_ at 217.000000 "$node_(7) setdest 95.624683 160.464758 19.933160"
-$ns_ at 217.000000 "$node_(8) setdest 35.012079 40.154365 10.682209"
-$ns_ at 217.000000 "$node_(9) setdest 26.794592 44.498695 18.317469"
-$ns_ at 217.000000 "$node_(10) setdest 148.822317 39.891733 9.342250"
-
-$ns_ at 218.000000 "$node_(1) setdest 95.567803 414.482141 9.808608"
-$ns_ at 218.000000 "$node_(2) setdest 101.751650 479.151427 18.844119"
-$ns_ at 218.000000 "$node_(3) setdest 21.772410 500.718610 19.954264"
-$ns_ at 218.000000 "$node_(4) setdest 156.440799 529.170085 19.061711"
-$ns_ at 218.000000 "$node_(5) setdest 136.804828 507.434328 19.889875"
-$ns_ at 218.000000 "$node_(6) setdest 34.936287 53.901566 12.265583"
-$ns_ at 218.000000 "$node_(7) setdest 77.559907 162.800620 18.215168"
-$ns_ at 218.000000 "$node_(8) setdest 46.265277 45.048070 12.271219"
-$ns_ at 218.000000 "$node_(9) setdest 18.369496 61.553834 19.022618"
-$ns_ at 218.000000 "$node_(10) setdest 148.315037 50.819341 10.939376"
-
-$ns_ at 219.000000 "$node_(1) setdest 105.384019 408.666566 11.409602"
-$ns_ at 219.000000 "$node_(2) setdest 105.257830 460.439311 19.037767"
-$ns_ at 219.000000 "$node_(3) setdest 20.836622 520.669754 19.973078"
-$ns_ at 219.000000 "$node_(4) setdest 169.726291 541.962081 18.442870"
-$ns_ at 219.000000 "$node_(5) setdest 151.392428 509.951508 14.803185"
-$ns_ at 219.000000 "$node_(6) setdest 39.985524 66.816926 13.867275"
-$ns_ at 219.000000 "$node_(7) setdest 65.983518 149.611440 17.548997"
-$ns_ at 219.000000 "$node_(8) setdest 60.002002 46.833409 13.852258"
-$ns_ at 219.000000 "$node_(9) setdest 12.671632 79.346833 18.683052"
-$ns_ at 219.000000 "$node_(10) setdest 149.329428 63.307247 12.529038"
-
-$ns_ at 220.000000 "$node_(1) setdest 117.372851 403.595980 13.017025"
-$ns_ at 220.000000 "$node_(2) setdest 114.312002 443.838623 18.909280"
-$ns_ at 220.000000 "$node_(3) setdest 32.633983 533.959274 17.770455"
-$ns_ at 220.000000 "$node_(4) setdest 186.809428 545.300049 17.406194"
-$ns_ at 220.000000 "$node_(5) setdest 154.136381 499.903314 10.416116"
-$ns_ at 220.000000 "$node_(6) setdest 38.966285 82.245893 15.462596"
-$ns_ at 220.000000 "$node_(7) setdest 74.429529 163.526860 16.278023"
-$ns_ at 220.000000 "$node_(8) setdest 62.748658 50.955781 4.953592"
-$ns_ at 220.000000 "$node_(9) setdest 16.722542 97.580963 18.678688"
-$ns_ at 220.000000 "$node_(10) setdest 147.564335 77.337282 14.140630"
-
-$ns_ at 221.000000 "$node_(1) setdest 130.510749 397.211113 14.607220"
-$ns_ at 221.000000 "$node_(2) setdest 126.001789 428.533431 19.258765"
-$ns_ at 221.000000 "$node_(3) setdest 47.085796 524.976442 17.016055"
-$ns_ at 221.000000 "$node_(4) setdest 195.470877 545.496075 8.663667"
-$ns_ at 221.000000 "$node_(5) setdest 153.537843 487.668110 12.249835"
-$ns_ at 221.000000 "$node_(6) setdest 37.659369 99.258980 17.063211"
-$ns_ at 221.000000 "$node_(7) setdest 81.550077 180.240654 18.167363"
-$ns_ at 221.000000 "$node_(8) setdest 62.598894 57.433367 6.479317"
-$ns_ at 221.000000 "$node_(9) setdest 23.470822 116.374653 19.968527"
-$ns_ at 221.000000 "$node_(10) setdest 144.701469 92.814988 15.740247"
-
-$ns_ at 222.000000 "$node_(1) setdest 145.829089 392.029894 16.170856"
-$ns_ at 222.000000 "$node_(2) setdest 140.217574 415.094347 19.562657"
-$ns_ at 222.000000 "$node_(3) setdest 60.241100 516.107987 15.865420"
-$ns_ at 222.000000 "$node_(4) setdest 195.175480 544.049314 1.476611"
-$ns_ at 222.000000 "$node_(5) setdest 153.773151 473.824698 13.845411"
-$ns_ at 222.000000 "$node_(6) setdest 36.836689 117.903151 18.662312"
-$ns_ at 222.000000 "$node_(7) setdest 88.469997 198.652396 19.669203"
-$ns_ at 222.000000 "$node_(8) setdest 62.213896 65.503403 8.079215"
-$ns_ at 222.000000 "$node_(9) setdest 31.284840 134.781911 19.997150"
-$ns_ at 222.000000 "$node_(10) setdest 140.588071 109.660694 17.340642"
-
-$ns_ at 223.000000 "$node_(1) setdest 163.506752 392.575980 17.686096"
-$ns_ at 223.000000 "$node_(2) setdest 154.063643 401.028161 19.737558"
-$ns_ at 223.000000 "$node_(3) setdest 74.782464 518.041618 14.669363"
-$ns_ at 223.000000 "$node_(4) setdest 194.480877 541.034819 3.093486"
-$ns_ at 223.000000 "$node_(5) setdest 154.461775 458.388033 15.452018"
-$ns_ at 223.000000 "$node_(6) setdest 36.889515 137.817056 19.913975"
-$ns_ at 223.000000 "$node_(7) setdest 93.285752 218.049531 19.986004"
-$ns_ at 223.000000 "$node_(8) setdest 61.558857 75.160595 9.679381"
-$ns_ at 223.000000 "$node_(9) setdest 40.120888 152.722334 19.998363"
-$ns_ at 223.000000 "$node_(10) setdest 135.370957 127.870138 18.942073"
-
-$ns_ at 224.000000 "$node_(1) setdest 181.923802 396.004220 18.733408"
-$ns_ at 224.000000 "$node_(2) setdest 167.390779 386.339495 19.833544"
-$ns_ at 224.000000 "$node_(3) setdest 88.812375 526.590208 16.429145"
-$ns_ at 224.000000 "$node_(4) setdest 193.757794 536.395966 4.694870"
-$ns_ at 224.000000 "$node_(5) setdest 155.534575 441.369278 17.052534"
-$ns_ at 224.000000 "$node_(6) setdest 37.937125 157.787942 19.998344"
-$ns_ at 224.000000 "$node_(7) setdest 95.263234 237.932451 19.981015"
-$ns_ at 224.000000 "$node_(8) setdest 60.618285 86.400311 11.279002"
-$ns_ at 224.000000 "$node_(9) setdest 49.705686 170.274483 19.998657"
-$ns_ at 224.000000 "$node_(10) setdest 129.766491 147.053821 19.985588"
-
-$ns_ at 225.000000 "$node_(1) setdest 169.232343 395.048481 12.727394"
-$ns_ at 225.000000 "$node_(2) setdest 178.021040 369.992559 19.499353"
-$ns_ at 225.000000 "$node_(3) setdest 105.697669 532.818640 17.997403"
-$ns_ at 225.000000 "$node_(4) setdest 193.626695 530.109972 6.287361"
-$ns_ at 225.000000 "$node_(5) setdest 157.030780 422.777712 18.651674"
-$ns_ at 225.000000 "$node_(6) setdest 39.945670 177.684547 19.997729"
-$ns_ at 225.000000 "$node_(7) setdest 93.862395 257.856020 19.972755"
-$ns_ at 225.000000 "$node_(8) setdest 59.031456 99.180711 12.878534"
-$ns_ at 225.000000 "$node_(9) setdest 59.205275 187.873059 19.998802"
-$ns_ at 225.000000 "$node_(10) setdest 124.063931 166.223553 19.999945"
-
-$ns_ at 226.000000 "$node_(1) setdest 156.800156 391.440287 12.945205"
-$ns_ at 226.000000 "$node_(2) setdest 181.618992 357.273651 13.218014"
-$ns_ at 226.000000 "$node_(3) setdest 124.505138 538.184199 19.557865"
-$ns_ at 226.000000 "$node_(4) setdest 193.643917 522.227082 7.882909"
-$ns_ at 226.000000 "$node_(5) setdest 158.657327 402.933793 19.910469"
-$ns_ at 226.000000 "$node_(6) setdest 43.108409 197.429911 19.997057"
-$ns_ at 226.000000 "$node_(7) setdest 88.502871 277.089742 19.966486"
-$ns_ at 226.000000 "$node_(8) setdest 56.808037 113.487980 14.479003"
-$ns_ at 226.000000 "$node_(9) setdest 67.791820 205.933327 19.997551"
-$ns_ at 226.000000 "$node_(10) setdest 117.964834 185.269423 19.998604"
-
-$ns_ at 227.000000 "$node_(1) setdest 142.278798 390.812500 14.534922"
-$ns_ at 227.000000 "$node_(2) setdest 180.809611 361.122439 3.932972"
-$ns_ at 227.000000 "$node_(3) setdest 139.353761 542.830733 15.558660"
-$ns_ at 227.000000 "$node_(4) setdest 190.918757 513.212438 9.417553"
-$ns_ at 227.000000 "$node_(5) setdest 158.201943 382.958722 19.980261"
-$ns_ at 227.000000 "$node_(6) setdest 47.461748 216.947467 19.997164"
-$ns_ at 227.000000 "$node_(7) setdest 79.883191 295.123722 19.988080"
-$ns_ at 227.000000 "$node_(8) setdest 54.120836 129.341065 16.079222"
-$ns_ at 227.000000 "$node_(9) setdest 75.603470 224.344458 19.999791"
-$ns_ at 227.000000 "$node_(10) setdest 111.317961 204.132478 19.999894"
-
-$ns_ at 228.000000 "$node_(1) setdest 126.803939 394.954915 16.019702"
-$ns_ at 228.000000 "$node_(2) setdest 181.453885 366.636563 5.551636"
-$ns_ at 228.000000 "$node_(3) setdest 139.679950 541.809477 1.072084"
-$ns_ at 228.000000 "$node_(4) setdest 182.221684 506.884617 10.755483"
-$ns_ at 228.000000 "$node_(5) setdest 147.532398 367.471383 18.806830"
-$ns_ at 228.000000 "$node_(6) setdest 53.185240 236.106169 19.995355"
-$ns_ at 228.000000 "$node_(7) setdest 69.135376 311.964610 19.978263"
-$ns_ at 228.000000 "$node_(8) setdest 50.220110 146.582020 17.676713"
-$ns_ at 228.000000 "$node_(9) setdest 83.229589 242.832888 19.999493"
-$ns_ at 228.000000 "$node_(10) setdest 104.487873 222.930048 19.999968"
-
-$ns_ at 229.000000 "$node_(1) setdest 112.719153 405.732941 17.735474"
-$ns_ at 229.000000 "$node_(2) setdest 184.190891 373.250673 7.158048"
-$ns_ at 229.000000 "$node_(3) setdest 138.130687 540.190583 2.240767"
-$ns_ at 229.000000 "$node_(4) setdest 170.893314 511.903508 12.390368"
-$ns_ at 229.000000 "$node_(5) setdest 131.769906 373.894402 17.020909"
-$ns_ at 229.000000 "$node_(6) setdest 60.421096 254.745402 19.994464"
-$ns_ at 229.000000 "$node_(7) setdest 55.227342 326.293985 19.969086"
-$ns_ at 229.000000 "$node_(8) setdest 46.727716 165.535396 19.272448"
-$ns_ at 229.000000 "$node_(9) setdest 90.276455 261.550003 19.999718"
-$ns_ at 229.000000 "$node_(10) setdest 98.003508 241.846149 19.996647"
-
-$ns_ at 230.000000 "$node_(1) setdest 96.091336 415.488575 19.278400"
-$ns_ at 230.000000 "$node_(2) setdest 183.469209 381.617058 8.397453"
-$ns_ at 230.000000 "$node_(3) setdest 135.135321 537.790149 3.838527"
-$ns_ at 230.000000 "$node_(4) setdest 159.237705 520.178185 14.294178"
-$ns_ at 230.000000 "$node_(5) setdest 126.003487 389.332246 16.479642"
-$ns_ at 230.000000 "$node_(6) setdest 69.231636 272.693606 19.994091"
-$ns_ at 230.000000 "$node_(7) setdest 39.927801 339.173368 19.998862"
-$ns_ at 230.000000 "$node_(8) setdest 44.917086 185.446450 19.993211"
-$ns_ at 230.000000 "$node_(9) setdest 96.877144 280.425405 19.996247"
-$ns_ at 230.000000 "$node_(10) setdest 92.829898 261.161671 19.996390"
-
-$ns_ at 231.000000 "$node_(1) setdest 76.542960 419.096553 19.878544"
-$ns_ at 231.000000 "$node_(2) setdest 176.455767 382.214395 7.038833"
-$ns_ at 231.000000 "$node_(3) setdest 130.270647 535.384863 5.426828"
-$ns_ at 231.000000 "$node_(4) setdest 147.767236 531.122795 15.854216"
-$ns_ at 231.000000 "$node_(5) setdest 120.093704 403.690952 15.527329"
-$ns_ at 231.000000 "$node_(6) setdest 79.612346 289.781035 19.993483"
-$ns_ at 231.000000 "$node_(7) setdest 24.003817 350.585990 19.591355"
-$ns_ at 231.000000 "$node_(8) setdest 44.961975 205.440954 19.994554"
-$ns_ at 231.000000 "$node_(9) setdest 99.747344 300.145262 19.927640"
-$ns_ at 231.000000 "$node_(10) setdest 89.013268 280.789285 19.995247"
-
-$ns_ at 232.000000 "$node_(1) setdest 57.010907 414.931045 19.971292"
-$ns_ at 232.000000 "$node_(2) setdest 170.625082 375.887436 8.603912"
-$ns_ at 232.000000 "$node_(3) setdest 123.401898 533.915668 7.024119"
-$ns_ at 232.000000 "$node_(4) setdest 133.831007 536.334199 14.878750"
-$ns_ at 232.000000 "$node_(5) setdest 112.784511 418.983603 16.949616"
-$ns_ at 232.000000 "$node_(6) setdest 91.565883 305.808159 19.993893"
-$ns_ at 232.000000 "$node_(7) setdest 24.991666 366.397074 15.841913"
-$ns_ at 232.000000 "$node_(8) setdest 46.668910 225.364489 19.996521"
-$ns_ at 232.000000 "$node_(9) setdest 95.297668 319.497789 19.857489"
-$ns_ at 232.000000 "$node_(10) setdest 86.767611 300.658389 19.995606"
-
-$ns_ at 233.000000 "$node_(1) setdest 39.647141 405.570459 19.726149"
-$ns_ at 233.000000 "$node_(2) setdest 163.274148 368.970881 10.093313"
-$ns_ at 233.000000 "$node_(3) setdest 114.780291 533.380993 8.638170"
-$ns_ at 233.000000 "$node_(4) setdest 131.539148 532.333883 4.610330"
-$ns_ at 233.000000 "$node_(5) setdest 104.102864 435.367253 18.541710"
-$ns_ at 233.000000 "$node_(6) setdest 103.303347 321.997575 19.996631"
-$ns_ at 233.000000 "$node_(7) setdest 30.412033 380.296306 14.918748"
-$ns_ at 233.000000 "$node_(8) setdest 49.123918 245.211852 19.998622"
-$ns_ at 233.000000 "$node_(9) setdest 83.212825 335.267364 19.867635"
-$ns_ at 233.000000 "$node_(10) setdest 86.025912 320.638077 19.993450"
-
-$ns_ at 234.000000 "$node_(1) setdest 27.316123 390.616503 19.382332"
-$ns_ at 234.000000 "$node_(2) setdest 152.190026 371.188100 11.303708"
-$ns_ at 234.000000 "$node_(3) setdest 104.559734 533.881666 10.232813"
-$ns_ at 234.000000 "$node_(4) setdest 134.437047 528.843275 4.536757"
-$ns_ at 234.000000 "$node_(5) setdest 99.490371 454.660971 19.837405"
-$ns_ at 234.000000 "$node_(6) setdest 113.260598 339.320990 19.981180"
-$ns_ at 234.000000 "$node_(7) setdest 34.878867 395.284625 15.639767"
-$ns_ at 234.000000 "$node_(8) setdest 52.561370 264.911186 19.996995"
-$ns_ at 234.000000 "$node_(9) setdest 66.066130 345.377223 19.905235"
-$ns_ at 234.000000 "$node_(10) setdest 87.285070 340.587013 19.988635"
-
-$ns_ at 235.000000 "$node_(1) setdest 20.218846 372.865040 19.117682"
-$ns_ at 235.000000 "$node_(2) setdest 142.051256 379.923957 13.383193"
-$ns_ at 235.000000 "$node_(3) setdest 92.840981 535.571717 11.839993"
-$ns_ at 235.000000 "$node_(4) setdest 138.217326 524.011125 6.135160"
-$ns_ at 235.000000 "$node_(5) setdest 91.141238 472.512581 19.707562"
-$ns_ at 235.000000 "$node_(6) setdest 120.629818 357.902574 19.989513"
-$ns_ at 235.000000 "$node_(7) setdest 37.667906 412.302677 17.245082"
-$ns_ at 235.000000 "$node_(8) setdest 57.399640 284.312240 19.995243"
-$ns_ at 235.000000 "$node_(9) setdest 47.135371 351.684805 19.953928"
-$ns_ at 235.000000 "$node_(10) setdest 91.171326 360.189136 19.983649"
-
-$ns_ at 236.000000 "$node_(1) setdest 24.598928 356.149629 17.279760"
-$ns_ at 236.000000 "$node_(2) setdest 133.409494 392.148552 14.970664"
-$ns_ at 236.000000 "$node_(3) setdest 79.429653 536.017371 13.418731"
-$ns_ at 236.000000 "$node_(4) setdest 141.644180 517.087121 7.725617"
-$ns_ at 236.000000 "$node_(5) setdest 82.659254 489.792059 19.249010"
-$ns_ at 236.000000 "$node_(6) setdest 124.911845 377.382671 19.945173"
-$ns_ at 236.000000 "$node_(7) setdest 36.308163 431.068874 18.815394"
-$ns_ at 236.000000 "$node_(8) setdest 63.770885 303.263885 19.993940"
-$ns_ at 236.000000 "$node_(9) setdest 27.530214 350.712658 19.629245"
-$ns_ at 236.000000 "$node_(10) setdest 98.063978 378.939773 19.977363"
-
-$ns_ at 237.000000 "$node_(1) setdest 40.321183 353.037350 16.027339"
-$ns_ at 237.000000 "$node_(2) setdest 125.329380 406.653920 16.604033"
-$ns_ at 237.000000 "$node_(3) setdest 64.843715 532.584356 14.984497"
-$ns_ at 237.000000 "$node_(4) setdest 144.634350 508.245730 9.333344"
-$ns_ at 237.000000 "$node_(5) setdest 82.909106 508.254419 18.464050"
-$ns_ at 237.000000 "$node_(6) setdest 118.133725 394.817452 18.706002"
-$ns_ at 237.000000 "$node_(7) setdest 29.233267 449.643599 19.876483"
-$ns_ at 237.000000 "$node_(8) setdest 71.818285 321.564343 19.991683"
-$ns_ at 237.000000 "$node_(9) setdest 29.921966 351.885394 2.663792"
-$ns_ at 237.000000 "$node_(10) setdest 108.291461 396.089794 19.968090"
-
-$ns_ at 238.000000 "$node_(1) setdest 45.596210 362.703271 11.011628"
-$ns_ at 238.000000 "$node_(2) setdest 116.291703 422.438321 18.188648"
-$ns_ at 238.000000 "$node_(3) setdest 50.905662 523.641287 16.560429"
-$ns_ at 238.000000 "$node_(4) setdest 147.083186 497.586315 10.937090"
-$ns_ at 238.000000 "$node_(5) setdest 86.823206 527.075434 19.223704"
-$ns_ at 238.000000 "$node_(6) setdest 100.295091 394.820595 17.838634"
-$ns_ at 238.000000 "$node_(7) setdest 14.754694 462.701263 19.496965"
-$ns_ at 238.000000 "$node_(8) setdest 82.106778 338.696777 19.984329"
-$ns_ at 238.000000 "$node_(9) setdest 29.384525 352.572171 0.872069"
-$ns_ at 238.000000 "$node_(10) setdest 121.581838 411.004409 19.976983"
-
-$ns_ at 239.000000 "$node_(1) setdest 43.050325 374.782260 12.344371"
-$ns_ at 239.000000 "$node_(2) setdest 109.603123 440.967025 19.698985"
-$ns_ at 239.000000 "$node_(3) setdest 40.281591 508.934509 18.142774"
-$ns_ at 239.000000 "$node_(4) setdest 150.186991 485.439022 12.537557"
-$ns_ at 239.000000 "$node_(5) setdest 88.363743 540.891623 13.901811"
-$ns_ at 239.000000 "$node_(6) setdest 83.872867 392.609649 16.570387"
-$ns_ at 239.000000 "$node_(7) setdest 2.120167 462.131925 12.647348"
-$ns_ at 239.000000 "$node_(8) setdest 94.881055 354.058754 19.979301"
-$ns_ at 239.000000 "$node_(9) setdest 28.147365 354.727230 2.484924"
-$ns_ at 239.000000 "$node_(10) setdest 137.437686 423.128242 19.959841"
-
-$ns_ at 240.000000 "$node_(1) setdest 38.556092 388.011135 13.971445"
-$ns_ at 240.000000 "$node_(2) setdest 102.994537 459.843356 19.999731"
-$ns_ at 240.000000 "$node_(3) setdest 34.511155 490.212704 19.590914"
-$ns_ at 240.000000 "$node_(4) setdest 153.699183 471.745840 14.136432"
-$ns_ at 240.000000 "$node_(5) setdest 87.677276 538.921027 2.086741"
-$ns_ at 240.000000 "$node_(6) setdest 67.844685 393.430187 16.049172"
-$ns_ at 240.000000 "$node_(7) setdest 2.807388 458.762773 3.438526"
-$ns_ at 240.000000 "$node_(8) setdest 109.948493 367.184167 19.982596"
-$ns_ at 240.000000 "$node_(9) setdest 26.581030 358.478450 4.065102"
-$ns_ at 240.000000 "$node_(10) setdest 155.787822 430.945677 19.945921"
-
-$ns_ at 241.000000 "$node_(1) setdest 36.249641 403.358559 15.519767"
-$ns_ at 241.000000 "$node_(2) setdest 95.054734 478.197050 19.997464"
-$ns_ at 241.000000 "$node_(3) setdest 38.588756 470.902314 19.736210"
-$ns_ at 241.000000 "$node_(4) setdest 158.039693 456.618076 15.738147"
-$ns_ at 241.000000 "$node_(5) setdest 85.810743 535.721185 3.704447"
-$ns_ at 241.000000 "$node_(6) setdest 50.254348 394.635888 17.631610"
-$ns_ at 241.000000 "$node_(7) setdest 5.492504 454.380668 5.139327"
-$ns_ at 241.000000 "$node_(8) setdest 125.740547 379.432191 19.985071"
-$ns_ at 241.000000 "$node_(9) setdest 26.686133 364.112657 5.635187"
-$ns_ at 241.000000 "$node_(10) setdest 175.328309 429.760207 19.576413"
-
-$ns_ at 242.000000 "$node_(1) setdest 37.522192 420.480349 17.169015"
-$ns_ at 242.000000 "$node_(2) setdest 90.631305 497.645680 19.945323"
-$ns_ at 242.000000 "$node_(3) setdest 50.739464 455.055826 19.968748"
-$ns_ at 242.000000 "$node_(4) setdest 162.672725 439.910564 17.337991"
-$ns_ at 242.000000 "$node_(5) setdest 82.862827 531.310088 5.305468"
-$ns_ at 242.000000 "$node_(6) setdest 31.030156 394.391413 19.225746"
-$ns_ at 242.000000 "$node_(7) setdest 9.560885 449.014231 6.734268"
-$ns_ at 242.000000 "$node_(8) setdest 138.863619 394.470220 19.958891"
-$ns_ at 242.000000 "$node_(9) setdest 30.044622 370.532583 7.245336"
-$ns_ at 242.000000 "$node_(10) setdest 184.068040 414.234527 17.816555"
-
-$ns_ at 243.000000 "$node_(1) setdest 37.985476 439.243636 18.769005"
-$ns_ at 243.000000 "$node_(2) setdest 87.433717 517.377092 19.988827"
-$ns_ at 243.000000 "$node_(3) setdest 62.449094 438.866145 19.980520"
-$ns_ at 243.000000 "$node_(4) setdest 167.366807 421.571460 18.930323"
-$ns_ at 243.000000 "$node_(5) setdest 79.256025 525.421283 6.905580"
-$ns_ at 243.000000 "$node_(6) setdest 11.506341 396.543000 19.642013"
-$ns_ at 243.000000 "$node_(7) setdest 15.539098 443.203051 8.337197"
-$ns_ at 243.000000 "$node_(8) setdest 147.973211 412.218070 19.949207"
-$ns_ at 243.000000 "$node_(9) setdest 36.059140 377.050285 8.868758"
-$ns_ at 243.000000 "$node_(10) setdest 177.685561 398.128349 17.324694"
-
-$ns_ at 244.000000 "$node_(1) setdest 39.206090 459.137583 19.931358"
-$ns_ at 244.000000 "$node_(2) setdest 83.154377 536.500088 19.595961"
-$ns_ at 244.000000 "$node_(3) setdest 78.636311 427.281132 19.905741"
-$ns_ at 244.000000 "$node_(4) setdest 170.390886 401.818715 19.982892"
-$ns_ at 244.000000 "$node_(5) setdest 74.252665 518.545692 8.503374"
-$ns_ at 244.000000 "$node_(6) setdest 7.973051 410.375276 14.276414"
-$ns_ at 244.000000 "$node_(7) setdest 23.323807 437.026222 9.937551"
-$ns_ at 244.000000 "$node_(8) setdest 153.374916 431.467556 19.993027"
-$ns_ at 244.000000 "$node_(9) setdest 44.032723 383.856539 10.483469"
-$ns_ at 244.000000 "$node_(10) setdest 172.718843 382.551826 16.349201"
-
-$ns_ at 245.000000 "$node_(1) setdest 34.618867 478.486864 19.885606"
-$ns_ at 245.000000 "$node_(2) setdest 84.300844 531.592510 5.039713"
-$ns_ at 245.000000 "$node_(3) setdest 94.940590 415.825326 19.926490"
-$ns_ at 245.000000 "$node_(4) setdest 172.304961 394.881002 7.196912"
-$ns_ at 245.000000 "$node_(5) setdest 68.133382 510.504064 10.105117"
-$ns_ at 245.000000 "$node_(6) setdest 17.059711 420.972002 13.959154"
-$ns_ at 245.000000 "$node_(7) setdest 32.971174 430.706107 11.533236"
-$ns_ at 245.000000 "$node_(8) setdest 157.601063 450.999458 19.983881"
-$ns_ at 245.000000 "$node_(9) setdest 53.145590 391.780127 12.075909"
-$ns_ at 245.000000 "$node_(10) setdest 169.004729 365.196387 17.748406"
-
-$ns_ at 246.000000 "$node_(1) setdest 23.314948 494.915448 19.941839"
-$ns_ at 246.000000 "$node_(2) setdest 80.388414 526.333405 6.554791"
-$ns_ at 246.000000 "$node_(3) setdest 105.925896 399.190915 19.934407"
-$ns_ at 246.000000 "$node_(4) setdest 172.261920 400.073454 5.192630"
-$ns_ at 246.000000 "$node_(5) setdest 60.662128 501.492990 11.705516"
-$ns_ at 246.000000 "$node_(6) setdest 25.067644 434.285222 15.536049"
-$ns_ at 246.000000 "$node_(7) setdest 44.416211 424.250797 13.140012"
-$ns_ at 246.000000 "$node_(8) setdest 157.547382 470.971881 19.972495"
-$ns_ at 246.000000 "$node_(9) setdest 61.816142 402.356439 13.676142"
-$ns_ at 246.000000 "$node_(10) setdest 159.697284 354.841814 13.922848"
-
-$ns_ at 247.000000 "$node_(1) setdest 11.471594 510.982443 19.960295"
-$ns_ at 247.000000 "$node_(2) setdest 73.667647 521.515333 8.269373"
-$ns_ at 247.000000 "$node_(3) setdest 115.687404 381.745967 19.990329"
-$ns_ at 247.000000 "$node_(4) setdest 172.542353 406.883343 6.815660"
-$ns_ at 247.000000 "$node_(5) setdest 53.043729 490.595790 13.296201"
-$ns_ at 247.000000 "$node_(6) setdest 35.532652 447.799237 17.092249"
-$ns_ at 247.000000 "$node_(7) setdest 57.583686 417.635230 14.735946"
-$ns_ at 247.000000 "$node_(8) setdest 155.807521 490.895157 19.999102"
-$ns_ at 247.000000 "$node_(9) setdest 70.586313 414.874960 15.284936"
-$ns_ at 247.000000 "$node_(10) setdest 150.705382 353.022498 9.174106"
-
-$ns_ at 248.000000 "$node_(1) setdest 6.250205 530.216206 19.929890"
-$ns_ at 248.000000 "$node_(2) setdest 64.550481 517.738746 9.868400"
-$ns_ at 248.000000 "$node_(3) setdest 129.575043 368.902786 18.915967"
-$ns_ at 248.000000 "$node_(4) setdest 172.766820 415.295599 8.415251"
-$ns_ at 248.000000 "$node_(5) setdest 45.664917 477.649441 14.901504"
-$ns_ at 248.000000 "$node_(6) setdest 49.236481 460.622756 18.767994"
-$ns_ at 248.000000 "$node_(7) setdest 72.542200 411.059556 16.340032"
-$ns_ at 248.000000 "$node_(8) setdest 154.151119 510.826019 19.999573"
-$ns_ at 248.000000 "$node_(9) setdest 80.048453 428.859710 16.885062"
-$ns_ at 248.000000 "$node_(10) setdest 150.693495 353.348529 0.326248"
-
-$ns_ at 249.000000 "$node_(1) setdest 15.633937 545.116140 17.608591"
-$ns_ at 249.000000 "$node_(2) setdest 53.897778 513.466205 11.477573"
-$ns_ at 249.000000 "$node_(3) setdest 147.143605 364.268821 18.169425"
-$ns_ at 249.000000 "$node_(4) setdest 172.715108 425.310616 10.015150"
-$ns_ at 249.000000 "$node_(5) setdest 40.276620 462.090927 16.465147"
-$ns_ at 249.000000 "$node_(6) setdest 66.591813 470.358500 19.899554"
-$ns_ at 249.000000 "$node_(7) setdest 89.011277 403.945945 17.939731"
-$ns_ at 249.000000 "$node_(8) setdest 153.637467 522.766334 11.951358"
-$ns_ at 249.000000 "$node_(9) setdest 90.366944 444.196722 18.484999"
-$ns_ at 249.000000 "$node_(10) setdest 152.055411 354.274810 1.647062"
-
-$ns_ at 250.000000 "$node_(1) setdest 32.767440 547.185729 17.258045"
-$ns_ at 250.000000 "$node_(2) setdest 42.327370 507.405581 13.061605"
-$ns_ at 250.000000 "$node_(3) setdest 166.110136 361.566966 19.158010"
-$ns_ at 250.000000 "$node_(4) setdest 171.517760 436.860424 11.611706"
-$ns_ at 250.000000 "$node_(5) setdest 39.663162 444.108944 17.992445"
-$ns_ at 250.000000 "$node_(6) setdest 82.640473 482.268268 19.985046"
-$ns_ at 250.000000 "$node_(7) setdest 106.691634 395.709099 19.504889"
-$ns_ at 250.000000 "$node_(8) setdest 156.539558 511.951326 11.197613"
-$ns_ at 250.000000 "$node_(9) setdest 102.661633 459.753615 19.828673"
-$ns_ at 250.000000 "$node_(10) setdest 155.016298 355.644768 3.262459"
-
diff --git a/gui/configs/sample5-mgen.imn b/gui/configs/sample5-mgen.imn
deleted file mode 100644
index d80a58a6..00000000
--- a/gui/configs/sample5-mgen.imn
+++ /dev/null
@@ -1,127 +0,0 @@
-node n1 {
- type router
- model router
- network-config {
- hostname n1
- !
- interface eth0
- ip address 10.0.0.2/24
- ipv6 address a:0::2/64
- !
- router ospf
- router-id 10.0.0.2
- network 10.0.0.0/24 area 0
- !
- router ospf6
- router-id 10.0.0.2
- interface eth0 area 0.0.0.0
- !
- }
- canvas c1
- iconcoords {312.0 120.0}
- labelcoords {312.0 148.0}
- interface-peer {eth0 n2}
- custom-config {
- custom-config-id service:UserDefined:mgen.sh
- custom-command mgen.sh
- config {
- #!/bin/sh
- SCRIPTDIR=$SESSION_DIR
- LOGDIR=/var/log
- if [ `uname` = "Linux" ]; then
- cd $SCRIPTDIR
- else
- cd /tmp/e0_`hostname`
- fi
- (
- cat << 'EOF'
- # mgen receiver script
- 15.0 LISTEN UDP 5001
- EOF
- ) > recv.mgn
- mgen input recv.mgn output $LOGDIR/mgen.log > /dev/null 2> /dev/null < /dev/null &
- }
- }
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('mgen.sh', )
- startidx=35
- cmdup=('sh mgen.sh', )
- }
- }
- services {zebra OSPFv2 OSPFv3 IPForward UserDefined}
-}
-
-node n2 {
- type router
- model router
- network-config {
- hostname n2
- !
- interface eth0
- ip address 10.0.0.1/24
- ipv6 address a:0::1/64
- !
- }
- canvas c1
- iconcoords {72.0 48.0}
- labelcoords {72.0 76.0}
- interface-peer {eth0 n1}
- custom-config {
- custom-config-id service:UserDefined
- custom-command UserDefined
- config {
- files=('mgen.sh', )
- startidx=35
- cmdup=('sh mgen.sh', )
- }
- }
- custom-config {
- custom-config-id service:UserDefined:mgen.sh
- custom-command mgen.sh
- config {
- #!/bin/sh
- HN=`hostname`
- SCRIPTDIR=$SESSION_DIR
- LOGDIR=/var/log
-
- cd $SCRIPTDIR
- (
- cat << 'EOF'
- # mgen sender script: send UDP traffic to UDP port 5001 after 15 seconds
- 15.0 ON 1 UDP SRC 5000 DST 10.0.0.2/5001 PERIODIC [1 4096]
- EOF
- ) > send_$HN.mgn
- mgen input send_$HN.mgn output $LOGDIR/mgen_$HN.log > /dev/null 2> /dev/null < /dev/null &
- }
- }
- services {zebra OSPFv2 OSPFv3 IPForward UserDefined}
-}
-
-link l1 {
- nodes {n2 n1}
- bandwidth 0
-}
-
-canvas c1 {
- name {Canvas1}
-}
-
-option global {
- interface_names no
- ip_addresses yes
- ipv6_addresses yes
- node_labels yes
- link_labels yes
- show_api no
- background_images no
- annotations yes
- grid yes
- traffic_start 0
-}
-
-option session {
-}
-
diff --git a/gui/configs/sample6-emane-rfpipe.imn b/gui/configs/sample6-emane-rfpipe.imn
deleted file mode 100644
index 9e0cc045..00000000
--- a/gui/configs/sample6-emane-rfpipe.imn
+++ /dev/null
@@ -1,271 +0,0 @@
-node n1 {
- type router
- model mdr
- network-config {
- hostname n1
- !
- interface eth0
- ip address 10.0.0.1/32
- ipv6 address a:0::1/128
- !
- }
- iconcoords {263.148836492 76.94184084899999}
- labelcoords {263.148836492 100.94184084899999}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n2 {
- type router
- model mdr
- network-config {
- hostname n2
- !
- interface eth0
- ip address 10.0.0.2/32
- ipv6 address a:0::2/128
- !
- }
- iconcoords {184.35166313500002 532.524009667}
- labelcoords {184.35166313500002 556.524009667}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n3 {
- type router
- model mdr
- network-config {
- hostname n3
- !
- interface eth0
- ip address 10.0.0.3/32
- ipv6 address a:0::3/128
- !
- }
- iconcoords {121.17243156500001 313.104176223}
- labelcoords {121.17243156500001 337.104176223}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n4 {
- type router
- model mdr
- network-config {
- hostname n4
- !
- interface eth0
- ip address 10.0.0.4/32
- ipv6 address a:0::4/128
- !
- }
- iconcoords {443.031505695 586.805480735}
- labelcoords {443.031505695 610.805480735}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n5 {
- type router
- model mdr
- network-config {
- hostname n5
- !
- interface eth0
- ip address 10.0.0.5/32
- ipv6 address a:0::5/128
- !
- }
- iconcoords {548.817758443 209.207353139}
- labelcoords {548.817758443 233.207353139}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n6 {
- type router
- model mdr
- network-config {
- hostname n6
- !
- interface eth0
- ip address 10.0.0.6/32
- ipv6 address a:0::6/128
- !
- }
- iconcoords {757.062318769 61.533941783}
- labelcoords {757.062318769 85.533941783}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n7 {
- type router
- model mdr
- network-config {
- hostname n7
- !
- interface eth0
- ip address 10.0.0.7/32
- ipv6 address a:0::7/128
- !
- }
- iconcoords {778.142667152 489.227596061}
- labelcoords {778.142667152 513.227596061}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n8 {
- type router
- model mdr
- network-config {
- hostname n8
- !
- interface eth0
- ip address 10.0.0.8/32
- ipv6 address a:0::8/128
- !
- }
- iconcoords {93.895107521 135.228007484}
- labelcoords {93.895107521 159.228007484}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n9 {
- type router
- model mdr
- network-config {
- hostname n9
- !
- interface eth0
- ip address 10.0.0.9/32
- ipv6 address a:0::9/128
- !
- }
- iconcoords {528.693178831 84.9814304098}
- labelcoords {528.693178831 108.9814304098}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n10 {
- type router
- model mdr
- network-config {
- hostname n10
- !
- interface eth0
- ip address 10.0.0.10/32
- ipv6 address a:0::10/128
- !
- }
- iconcoords {569.534639911 475.46828902}
- labelcoords {569.534639911 499.46828902}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n11 {
- bandwidth 54000000
- type wlan
- range 275
- network-config {
- hostname wlan11
- !
- interface wireless
- ip address 10.0.0.0/32
- ipv6 address a:0::0/128
- !
- mobmodel
- coreapi
- emane_rfpipe
- !
- }
- canvas c1
- iconcoords {65.0 558.0}
- labelcoords {65.0 582.0}
- interface-peer {e0 n1}
- interface-peer {e1 n2}
- interface-peer {e2 n3}
- interface-peer {e3 n4}
- interface-peer {e4 n5}
- interface-peer {e5 n6}
- interface-peer {e6 n7}
- interface-peer {e7 n8}
- interface-peer {e8 n9}
- interface-peer {e9 n10}
-}
-
-link l1 {
- nodes {n11 n1}
- bandwidth 54000000
-}
-
-link l2 {
- nodes {n11 n2}
- bandwidth 54000000
-}
-
-link l3 {
- nodes {n11 n3}
- bandwidth 54000000
-}
-
-link l4 {
- nodes {n11 n4}
- bandwidth 54000000
-}
-
-link l5 {
- nodes {n11 n5}
- bandwidth 54000000
-}
-
-link l6 {
- nodes {n11 n6}
- bandwidth 54000000
-}
-
-link l7 {
- nodes {n11 n7}
- bandwidth 54000000
-}
-
-link l8 {
- nodes {n11 n8}
- bandwidth 54000000
-}
-
-link l9 {
- nodes {n11 n9}
- bandwidth 54000000
-}
-
-link l10 {
- nodes {n11 n10}
- bandwidth 54000000
-}
-
-canvas c1 {
- name {Canvas1}
-}
-
-option global {
- interface_names no
- ip_addresses yes
- ipv6_addresses yes
- node_labels yes
- link_labels yes
- ipsec_configs yes
- remote_exec no
- exec_errors yes
- show_api no
- background_images no
- annotations yes
- grid yes
- traffic_start 0
-}
-
diff --git a/gui/configs/sample7-emane-ieee80211abg.imn b/gui/configs/sample7-emane-ieee80211abg.imn
deleted file mode 100644
index b1323f6f..00000000
--- a/gui/configs/sample7-emane-ieee80211abg.imn
+++ /dev/null
@@ -1,274 +0,0 @@
-node n1 {
- type router
- model mdr
- network-config {
- hostname n1
- !
- interface eth0
- ip address 10.0.0.1/32
- ipv6 address a:0::1/128
- !
- }
- iconcoords {115.14883649199999 139.941840849}
- labelcoords {115.14883649199999 167.941840849}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n2 {
- type router
- model mdr
- network-config {
- hostname n2
- !
- interface eth0
- ip address 10.0.0.2/32
- ipv6 address a:0::2/128
- !
- }
- iconcoords {190.35166313500002 519.524009667}
- labelcoords {190.35166313500002 547.524009667}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n3 {
- type router
- model mdr
- network-config {
- hostname n3
- !
- interface eth0
- ip address 10.0.0.3/32
- ipv6 address a:0::3/128
- !
- }
- iconcoords {142.172431565 307.104176223}
- labelcoords {142.172431565 335.104176223}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n4 {
- type router
- model mdr
- network-config {
- hostname n4
- !
- interface eth0
- ip address 10.0.0.4/32
- ipv6 address a:0::4/128
- !
- }
- iconcoords {395.031505695 589.805480735}
- labelcoords {395.031505695 617.805480735}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n5 {
- type router
- model mdr
- network-config {
- hostname n5
- !
- interface eth0
- ip address 10.0.0.5/32
- ipv6 address a:0::5/128
- !
- }
- iconcoords {250.817758443 27.20735313899999}
- labelcoords {250.817758443 55.20735313899999}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n6 {
- type router
- model mdr
- network-config {
- hostname n6
- !
- interface eth0
- ip address 10.0.0.6/32
- ipv6 address a:0::6/128
- !
- }
- iconcoords {757.062318769 61.533941783}
- labelcoords {757.062318769 89.533941783}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n7 {
- type router
- model mdr
- network-config {
- hostname n7
- !
- interface eth0
- ip address 10.0.0.7/32
- ipv6 address a:0::7/128
- !
- }
- iconcoords {909.142667152 593.227596061}
- labelcoords {909.142667152 621.227596061}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n8 {
- type router
- model mdr
- network-config {
- hostname n8
- !
- interface eth0
- ip address 10.0.0.8/32
- ipv6 address a:0::8/128
- !
- }
- iconcoords {351.895107521 337.228007484}
- labelcoords {351.895107521 365.228007484}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n9 {
- type router
- model mdr
- network-config {
- hostname n9
- !
- interface eth0
- ip address 10.0.0.9/32
- ipv6 address a:0::9/128
- !
- }
- iconcoords {528.693178831 84.9814304098}
- labelcoords {528.693178831 112.98143041}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n10 {
- type router
- model mdr
- network-config {
- hostname n10
- !
- interface eth0
- ip address 10.0.0.10/32
- ipv6 address a:0::10/128
- !
- }
- iconcoords {568.534639911 526.4682890199999}
- labelcoords {568.534639911 554.4682890199999}
- canvas c1
- interface-peer {eth0 n11}
-}
-
-node n11 {
- bandwidth 54000000
- type wlan
- range 275
- network-config {
- hostname wlan11
- !
- interface wireless
- ip address 10.0.0.0/32
- ipv6 address a:0::0/128
- !
- mobmodel
- coreapi
- emane_ieee80211abg
- !
- }
- canvas c1
- iconcoords {65.0 558.0}
- labelcoords {65.0 590.0}
- interface-peer {e0 n1}
- interface-peer {e1 n2}
- interface-peer {e2 n3}
- interface-peer {e3 n4}
- interface-peer {e4 n5}
- interface-peer {e5 n6}
- interface-peer {e6 n7}
- interface-peer {e7 n8}
- interface-peer {e8 n9}
- interface-peer {e9 n10}
-}
-
-link l1 {
- nodes {n11 n1}
- bandwidth 54000000
-}
-
-link l2 {
- nodes {n11 n2}
- bandwidth 54000000
-}
-
-link l3 {
- nodes {n11 n3}
- bandwidth 54000000
-}
-
-link l4 {
- nodes {n11 n4}
- bandwidth 54000000
-}
-
-link l5 {
- nodes {n11 n5}
- bandwidth 54000000
-}
-
-link l6 {
- nodes {n11 n6}
- bandwidth 54000000
-}
-
-link l7 {
- nodes {n11 n7}
- bandwidth 54000000
-}
-
-link l8 {
- nodes {n11 n8}
- bandwidth 54000000
-}
-
-link l9 {
- nodes {n11 n9}
- bandwidth 54000000
-}
-
-link l10 {
- nodes {n11 n10}
- bandwidth 54000000
-}
-
-canvas c1 {
- name {Canvas1}
- refpt {0 0 47.5791667 -122.132322 2.0}
- scale 350.0
- size {1000 750}
-}
-
-option global {
- interface_names no
- ip_addresses yes
- ipv6_addresses yes
- node_labels yes
- link_labels yes
- ipsec_configs yes
- remote_exec no
- exec_errors yes
- show_api no
- background_images no
- annotations yes
- grid yes
- traffic_start 0
-}
-
diff --git a/gui/configs/sample8-ipsec-service.imn b/gui/configs/sample8-ipsec-service.imn
deleted file mode 100644
index ba409185..00000000
--- a/gui/configs/sample8-ipsec-service.imn
+++ /dev/null
@@ -1,952 +0,0 @@
-comments {
-Sample scenario showing IPsec service configuration.
-
-There are three red routers having the IPsec service enabled. The IPsec service
-must be customized with the tunnel hosts (peers) and their keys, and the subnet
-addresses that should be tunneled.
-
-For simplicity, the same keys and certificates are used in each of the three
-IPsec gateways. These are written to node n1's configuration directory. Keys
-can be generated using the openssl utility.
-
-Note that this scenario may require at patched kernel in order to work; see the
-kernels subdirectory of the CORE source for kernel patches.
-
-The racoon keying daemon and setkey from the ipsec-tools package should also be
-installed.
-}
-
-node n1 {
- type router
- model router
- network-config {
- hostname n1
- !
- interface eth3
- ip address 192.168.6.1/24
- ipv6 address 2001:6::1/64
- !
- interface eth2
- ip address 192.168.5.1/24
- ipv6 address 2001:5::1/64
- !
- interface eth1
- ip address 192.168.1.1/24
- ipv6 address 2001:1::1/64
- !
- interface eth0
- ip address 192.168.0.1/24
- ipv6 address 2001:0::1/64
- !
- }
- canvas c1
- iconcoords {210.0 172.0}
- labelcoords {210.0 200.0}
- interface-peer {eth0 n2}
- interface-peer {eth1 n3}
- interface-peer {eth2 n7}
- interface-peer {eth3 n8}
- custom-config {
- custom-config-id service:IPsec:copycerts.sh
- custom-command copycerts.sh
- config {
- #!/bin/sh
-
- FILES="test1.pem test1.key ca-cert.pem"
-
- mkdir -p /tmp/certs
-
- for f in $FILES; do
- cp $f /tmp/certs
- done
- }
- }
- custom-config {
- custom-config-id service:IPsec:ca-cert.pem
- custom-command ca-cert.pem
- config {
- Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 16615976057451940887 (0xe697ce3064d18c17)
- Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=US, ST=WA, O=CORE CA/emailAddress=root@localhost
- Validity
- Not Before: Sep 9 17:18:04 2013 GMT
- Not After : Sep 7 17:18:04 2023 GMT
- Subject: C=US, ST=WA, O=CORE CA/emailAddress=root@localhost
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- Public-Key: (1024 bit)
- Modulus:
- 00:d3:0d:ab:91:72:50:ca:10:43:8d:18:d8:92:05:
- 9d:d9:aa:16:2b:d1:25:f8:be:52:48:e4:e7:7a:83:
- 9b:b4:3b:26:12:fa:46:23:df:09:cb:34:ba:6f:f6:
- 5e:38:9c:d4:90:ea:44:ad:65:f6:bd:85:6f:ac:9f:
- 4c:83:d4:10:ab:0a:0e:cd:ba:99:1a:ae:f7:b7:e2:
- c3:00:0b:c1:02:69:16:c7:55:e3:cf:4c:c3:72:77:
- 10:be:da:66:ce:91:b2:cc:92:e1:a8:f0:74:fe:b9:
- 03:38:fc:49:97:73:bb:40:55:1b:7d:3e:41:63:02:
- b5:ad:f4:33:95:76:fd:7b:61
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 9A:EF:A7:36:28:06:4A:0A:2F:F9:2E:99:BE:6F:06:E1:83:9C:A2:0E
- X509v3 Authority Key Identifier:
- keyid:9A:EF:A7:36:28:06:4A:0A:2F:F9:2E:99:BE:6F:06:E1:83:9C:A2:0E
-
- X509v3 Basic Constraints:
- CA:TRUE
- Signature Algorithm: sha1WithRSAEncryption
- 2d:88:84:20:19:9b:97:90:2d:18:86:7d:db:6c:d0:5e:ae:c2:
- 55:61:af:ca:86:5b:3b:e8:15:c5:31:de:ea:d3:7e:9e:39:61:
- 2e:b4:a0:93:43:bf:a2:95:f8:b6:13:b3:2f:cb:f8:fb:72:8c:
- 40:95:50:db:03:cc:f7:b8:a5:d8:fb:77:88:c4:f5:f9:65:85:
- 29:c8:0c:e9:ce:c9:fa:1d:4e:b2:3f:92:dc:b5:2e:73:50:c3:
- c8:3e:90:9e:9a:34:ef:fd:ed:de:74:0b:19:73:6a:95:de:90:
- 3b:ee:db:b0:be:14:fd:bf:3e:c6:7b:cd:7d:3c:ba:45:3c:f1:
- 46:d7
- -----BEGIN CERTIFICATE-----
- MIICZDCCAc2gAwIBAgIJAOaXzjBk0YwXMA0GCSqGSIb3DQEBBQUAMEsxCzAJBgNV
- BAYTAlVTMQswCQYDVQQIDAJXQTEQMA4GA1UECgwHQ09SRSBDQTEdMBsGCSqGSIb3
- DQEJARYOcm9vdEBsb2NhbGhvc3QwHhcNMTMwOTA5MTcxODA0WhcNMjMwOTA3MTcx
- ODA0WjBLMQswCQYDVQQGEwJVUzELMAkGA1UECAwCV0ExEDAOBgNVBAoMB0NPUkUg
- Q0ExHTAbBgkqhkiG9w0BCQEWDnJvb3RAbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEB
- AQUAA4GNADCBiQKBgQDTDauRclDKEEONGNiSBZ3ZqhYr0SX4vlJI5Od6g5u0OyYS
- +kYj3wnLNLpv9l44nNSQ6kStZfa9hW+sn0yD1BCrCg7Nupkarve34sMAC8ECaRbH
- VePPTMNydxC+2mbOkbLMkuGo8HT+uQM4/EmXc7tAVRt9PkFjArWt9DOVdv17YQID
- AQABo1AwTjAdBgNVHQ4EFgQUmu+nNigGSgov+S6Zvm8G4YOcog4wHwYDVR0jBBgw
- FoAUmu+nNigGSgov+S6Zvm8G4YOcog4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B
- AQUFAAOBgQAtiIQgGZuXkC0Yhn3bbNBersJVYa/Khls76BXFMd7q036eOWEutKCT
- Q7+ilfi2E7Mvy/j7coxAlVDbA8z3uKXY+3eIxPX5ZYUpyAzpzsn6HU6yP5LctS5z
- UMPIPpCemjTv/e3edAsZc2qV3pA77tuwvhT9vz7Ge819PLpFPPFG1w==
- -----END CERTIFICATE-----
-
- }
- }
- custom-config {
- custom-config-id service:IPsec:test1.pem
- custom-command test1.pem
- config {
- Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 16098433458223693585 (0xdf691fefe5afbf11)
- Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=US, ST=WA, O=CORE CA/emailAddress=root@localhost
- Validity
- Not Before: Sep 9 17:44:47 2013 GMT
- Not After : Sep 7 17:44:47 2023 GMT
- Subject: C=US, ST=WA, O=core-dev, CN=test1
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- Public-Key: (1024 bit)
- Modulus:
- 00:b3:26:ed:b6:eb:26:ea:c0:5a:d1:09:6f:d4:5f:
- 8d:11:cc:3c:ff:d7:5e:37:e6:55:71:5c:eb:c9:e8:
- f8:8e:a3:85:99:2c:3e:a2:8e:b2:1c:2f:fe:99:c6:
- 0d:d3:ce:c0:ed:c1:e2:4d:bc:10:35:f6:61:02:b9:
- 8f:cc:c5:80:d1:7f:c8:2e:2d:9a:32:9f:8a:bb:32:
- ea:14:82:e0:6f:cb:3d:9d:d5:1c:f1:43:52:9f:49:
- 79:f1:94:03:48:2c:91:51:c7:8f:32:90:a7:c2:c0:
- 25:64:34:f1:c7:f2:ac:d5:96:87:a2:0a:fb:e5:b3:
- 0b:90:bf:6f:08:75:5d:54:cb
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Basic Constraints:
- CA:FALSE
- Netscape Comment:
- OpenSSL Generated Certificate
- X509v3 Subject Key Identifier:
- B3:EC:1A:56:77:F9:DC:0E:60:0F:B7:69:C9:DC:43:2D:09:39:A6:1C
- X509v3 Authority Key Identifier:
- keyid:9A:EF:A7:36:28:06:4A:0A:2F:F9:2E:99:BE:6F:06:E1:83:9C:A2:0E
-
- Signature Algorithm: sha1WithRSAEncryption
- c5:3f:65:1f:b6:a4:33:fd:c8:04:a1:da:07:f6:e0:3b:55:b9:
- 76:b7:aa:78:55:4a:59:ad:36:7f:cb:00:1c:32:cb:fe:40:72:
- eb:49:27:b4:9d:5d:05:6f:30:37:1d:49:35:5e:0b:6b:5d:c5:
- 07:3d:c8:63:1f:b6:46:6d:f9:c9:52:ce:1d:1f:d9:e8:02:46:
- 95:18:26:39:ec:17:fe:ae:07:cf:55:25:45:1f:8a:e4:bb:f2:
- 73:d2:e1:01:c3:8e:5f:eb:e4:7e:80:44:40:e6:a1:cd:85:9b:
- e8:fb:16:d0:7b:4f:ad:3b:4c:eb:bd:67:02:2c:08:2b:62:f1:
- c5:0a
- -----BEGIN CERTIFICATE-----
- MIICgTCCAeqgAwIBAgIJAN9pH+/lr78RMA0GCSqGSIb3DQEBBQUAMEsxCzAJBgNV
- BAYTAlVTMQswCQYDVQQIDAJXQTEQMA4GA1UECgwHQ09SRSBDQTEdMBsGCSqGSIb3
- DQEJARYOcm9vdEBsb2NhbGhvc3QwHhcNMTMwOTA5MTc0NDQ3WhcNMjMwOTA3MTc0
- NDQ3WjA9MQswCQYDVQQGEwJVUzELMAkGA1UECAwCV0ExETAPBgNVBAoMCGNvcmUt
- ZGV2MQ4wDAYDVQQDDAV0ZXN0MTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
- sybttusm6sBa0Qlv1F+NEcw8/9deN+ZVcVzryej4jqOFmSw+oo6yHC/+mcYN087A
- 7cHiTbwQNfZhArmPzMWA0X/ILi2aMp+KuzLqFILgb8s9ndUc8UNSn0l58ZQDSCyR
- UcePMpCnwsAlZDTxx/Ks1ZaHogr75bMLkL9vCHVdVMsCAwEAAaN7MHkwCQYDVR0T
- BAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNh
- dGUwHQYDVR0OBBYEFLPsGlZ3+dwOYA+3acncQy0JOaYcMB8GA1UdIwQYMBaAFJrv
- pzYoBkoKL/kumb5vBuGDnKIOMA0GCSqGSIb3DQEBBQUAA4GBAMU/ZR+2pDP9yASh
- 2gf24DtVuXa3qnhVSlmtNn/LABwyy/5AcutJJ7SdXQVvMDcdSTVeC2tdxQc9yGMf
- tkZt+clSzh0f2egCRpUYJjnsF/6uB89VJUUfiuS78nPS4QHDjl/r5H6AREDmoc2F
- m+j7FtB7T607TOu9ZwIsCCti8cUK
- -----END CERTIFICATE-----
-
- }
- }
- custom-config {
- custom-config-id service:IPsec:test1.key
- custom-command test1.key
- config {
- -----BEGIN PRIVATE KEY-----
- MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALMm7bbrJurAWtEJ
- b9RfjRHMPP/XXjfmVXFc68no+I6jhZksPqKOshwv/pnGDdPOwO3B4k28EDX2YQK5
- j8zFgNF/yC4tmjKfirsy6hSC4G/LPZ3VHPFDUp9JefGUA0gskVHHjzKQp8LAJWQ0
- 8cfyrNWWh6IK++WzC5C/bwh1XVTLAgMBAAECgYB1zJIgZe04DPVqYC8lURL8cfRm
- MeIlFZJ3MSdlo4fUmtddCYfB8dxRxok96cnrzRZ0/7jjblamdPQDC6rvdaqmfLFx
- nJ/RVhCj6HqDMrQnv/9tnl6UQmkaYSnYvTn2GgmpqvBf9RUQk4+kjwgRgdqKxaIz
- oH8j0ZxMh2DOZuzJMQJBAOJwEnbG085q2k1Qg8PQz0cpVG9QCE3sJUNs0hMPC7dk
- IzknFtidlpCf6NMboJ2Nt9dzmJmKLqWb3oauyQRQA6MCQQDKin0wElLV1268IbcF
- RXhkVlxcg5fDEazeNL9p1z5vmwaq0IcLtSPrIaect2hacCkfJoREhcA+f9YIpcod
- lby5AkEApyXla0ofpXqYxIOPkGc96qCmlDh2uNZ9N0VH2Qu9MVW47oJdSe8h6oYv
- /k2hhUvMjjzlQ0mOX28slyzEc+uAkwJAWlAsiE3zX+UjPIJwIMqcZ2lW3+3Rsyrj
- gWXV4HUZIxzmeS5ouWC5NnSYT7o8ru8KdxhurDtTwMqx/sMmf9CwCQJAIDbMwwIs
- XStw0y/M9+hdPUkccVoHyXKPTensyX/miAUwHZN/oadGUUOZO7XBKb1uNFv1uowU
- 29bGgXa+mvb6aA==
- -----END PRIVATE KEY-----
-
- }
- }
- custom-config {
- custom-config-id service:IPsec:ipsec.sh
- custom-command ipsec.sh
- config {
- #!/bin/sh
- # set up static tunnel mode security assocation for service (security.py)
- # -------- CUSTOMIZATION REQUIRED --------
- #
- # The IPsec service builds ESP tunnels between the specified peers using the
- # racoon IKEv2 keying daemon. You need to provide keys and the addresses of
- # peers, along with subnets to tunnel.
-
- # directory containing the certificate and key described below
- keydir=/tmp/certs
-
- # the name used for the "$certname.pem" x509 certificate and
- # "$certname.key" RSA private key, which can be generated using openssl
- certname=test1
-
- # list the public-facing IP addresses, starting with the localhost and followed
- # by each tunnel peer, separated with a single space
- tunnelhosts="192.168.0.1AND192.168.0.2 192.168.1.1AND192.168.1.2"
-
- # Define T where i is the index for each tunnel peer host from
- # the tunnel_hosts list above (0 is localhost).
- # T is a list of IPsec tunnels with peer i, with a local subnet address
- # followed by the remote subnet address:
- # T="AND AND"
- # For example, 192.168.0.0/24 is a local network (behind this node) to be
- # tunneled and 192.168.2.0/24 is a remote network (behind peer 1)
- T1="192.168.5.0/24AND192.168.8.0/24"
- T2="192.168.5.0/24AND192.168.4.0/24 192.168.6.0/24AND192.168.4.0/24"
-
- # -------- END CUSTOMIZATION --------
-
- echo "building config $PWD/ipsec.conf..."
- echo "building config $PWD/ipsec.conf..." > $PWD/ipsec.log
-
- checkip=0
- if [ "$(dpkg -l | grep " sipcalc ")" = "" ]; then
- echo "WARNING: ip validation disabled because package sipcalc not installed
- " >> $PWD/ipsec.log
- checkip=1
- fi
-
- echo "#!/usr/sbin/setkey -f
- # Flush the SAD and SPD
- flush;
- spdflush;
-
- # Security policies \
- " > $PWD/ipsec.conf
- i=0
- for hostpair in $tunnelhosts; do
- i=`expr $i + 1`
- # parse tunnel host IP
- thishost=${hostpair%%AND*}
- peerhost=${hostpair##*AND}
- if [ $checkip = "0" ] &&
- [ "$(sipcalc "$thishost" "$peerhost" | grep ERR)" != "" ]; then
- echo "ERROR: invalid host address $thishost or $peerhost \
- " >> $PWD/ipsec.log
- fi
- # parse each tunnel addresses
- tunnel_list_var_name=T$i
- eval tunnels="$"$tunnel_list_var_name""
- for ttunnel in $tunnels; do
- lclnet=${ttunnel%%AND*}
- rmtnet=${ttunnel##*AND}
- if [ $checkip = "0" ] &&
- [ "$(sipcalc "$lclnet" "$rmtnet"| grep ERR)" != "" ]; then
- echo "ERROR: invalid tunnel address $lclnet and $rmtnet \
- " >> $PWD/ipsec.log
- fi
- # add tunnel policies
- echo "
- spdadd $lclnet $rmtnet any -P out ipsec
- esp/tunnel/$thishost-$peerhost/require;
- spdadd $rmtnet $lclnet any -P in ipsec
- esp/tunnel/$peerhost-$thishost/require; \
- " >> $PWD/ipsec.conf
- done
- done
-
- echo "building config $PWD/racoon.conf..."
- if [ ! -e $keydir\/$certname.key ] || [ ! -e $keydir\/$certname.pem ]; then
- echo "ERROR: missing certification files under $keydir \
- $certname.key or $certname.pem " >> $PWD/ipsec.log
- fi
- echo "
- path certificate \"$keydir\";
- listen {
- adminsock disabled;
- }
- remote anonymous
- {
- exchange_mode main;
- certificate_type x509 \"$certname.pem\" \"$certname.key\";
- ca_type x509 \"ca-cert.pem\";
- my_identifier asn1dn;
- peers_identifier asn1dn;
-
- proposal {
- encryption_algorithm 3des ;
- hash_algorithm sha1;
- authentication_method rsasig ;
- dh_group modp768;
- }
- }
- sainfo anonymous
- {
- pfs_group modp768;
- lifetime time 1 hour ;
- encryption_algorithm 3des, blowfish 448, rijndael ;
- authentication_algorithm hmac_sha1, hmac_md5 ;
- compression_algorithm deflate ;
- }
- " > $PWD/racoon.conf
-
- # the setkey program is required from the ipsec-tools package
- echo "running setkey -f $PWD/ipsec.conf..."
- setkey -f $PWD/ipsec.conf
-
- echo "running racoon -d -f $PWD/racoon.conf..."
- racoon -d -f $PWD/racoon.conf -l racoon.log
-
- }
- }
- custom-config {
- custom-config-id service:IPsec
- custom-command IPsec
- config {
-
- ('ipsec.sh', 'test1.key', 'test1.pem', 'ca-cert.pem', 'copycerts.sh', )
- 60
- ('sh copycerts.sh', 'sh ipsec.sh', )
- ('killall racoon', )
-
-
- }
- }
- services {zebra OSPFv2 OSPFv3 IPForward IPsec}
- custom-image $CORE_DATA_DIR/icons/normal/router_red.gif
-}
-
-node n2 {
- type router
- model router
- network-config {
- hostname n2
- !
- interface eth3
- ip address 192.168.8.1/24
- ipv6 address 2001:8::1/64
- !
- interface eth2
- ip address 192.168.7.1/24
- ipv6 address 2001:7::1/64
- !
- interface eth1
- ip address 192.168.2.1/24
- ipv6 address 2001:2::1/64
- !
- interface eth0
- ip address 192.168.0.2/24
- ipv6 address 2001:0::2/64
- !
- }
- canvas c1
- iconcoords {455.0 173.0}
- labelcoords {455.0 201.0}
- interface-peer {eth0 n1}
- interface-peer {eth1 n4}
- interface-peer {eth2 n9}
- interface-peer {eth3 n10}
- custom-config {
- custom-config-id service:IPsec:ipsec.sh
- custom-command ipsec.sh
- config {
- #!/bin/sh
- # set up static tunnel mode security assocation for service (security.py)
- # -------- CUSTOMIZATION REQUIRED --------
- #
- # The IPsec service builds ESP tunnels between the specified peers using the
- # racoon IKEv2 keying daemon. You need to provide keys and the addresses of
- # peers, along with subnets to tunnel.
-
- # directory containing the certificate and key described below
- keydir=/tmp/certs
-
- # the name used for the "$certname.pem" x509 certificate and
- # "$certname.key" RSA private key, which can be generated using openssl
- certname=test1
-
- # list the public-facing IP addresses, starting with the localhost and followed
- # by each tunnel peer, separated with a single space
- tunnelhosts="192.168.0.2AND192.168.0.1"
-
- # Define T where i is the index for each tunnel peer host from
- # the tunnel_hosts list above (0 is localhost).
- # T is a list of IPsec tunnels with peer i, with a local subnet address
- # followed by the remote subnet address:
- # T="AND