2015-05-07 10:38:05 +02:00
|
|
|
# This is an example for a minimal loopback configuration.
|
2014-07-04 09:44:09 +00:00
|
|
|
#
|
2015-05-07 10:38:05 +02:00
|
|
|
# All messages will be sent back to the origin using UDP packets.
|
2015-05-07 10:06:08 +02:00
|
|
|
#
|
|
|
|
# You can use this configuration in conjunction with the 'send', 'receive' and 'random'
|
|
|
|
# utilities as shown below (run all three steps in parallel).
|
|
|
|
#
|
|
|
|
# 0. Overview:
|
|
|
|
#
|
|
|
|
# ./random --PIPE--> ./send --UDP--> ./server --UDP--> ./receive
|
|
|
|
#
|
|
|
|
# 1. Start server:
|
|
|
|
#
|
|
|
|
# $ ./server etc/loopback.conf
|
|
|
|
#
|
|
|
|
# 2. Send random data to server:
|
|
|
|
#
|
|
|
|
# $ ./random 4 10 | ./send etc/loopback.conf node1 -r
|
|
|
|
#
|
|
|
|
# 3. Receive data from server:
|
|
|
|
#
|
|
|
|
# $ ./receive etc/loopback.conf node2 -r
|
|
|
|
#
|
2015-05-07 10:38:05 +02:00
|
|
|
# Author: Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
|
|
|
# Copyright: 2015, Institute for Automation of Complex Power Systems, EONERC
|
2015-05-07 10:06:08 +02:00
|
|
|
##
|
|
|
|
|
|
|
|
stats = 1;
|
|
|
|
debug = 10;
|
2014-06-05 09:35:29 +00:00
|
|
|
|
|
|
|
nodes = {
|
2015-05-07 10:06:08 +02:00
|
|
|
node1 = {
|
2015-08-07 01:25:40 +02:00
|
|
|
type = "socket",
|
|
|
|
layer = "udp",
|
2015-05-07 10:06:08 +02:00
|
|
|
local = "*:12000", # Local ip:port, use '*' for random port
|
2015-08-07 01:25:40 +02:00
|
|
|
remote = "127.0.0.1:12001",
|
2015-08-09 23:58:50 +02:00
|
|
|
combine = 5,
|
|
|
|
netem = {
|
|
|
|
enabled = false,
|
|
|
|
delay = 1000000,
|
|
|
|
jitter = 300000,
|
|
|
|
distribution = "normal"
|
|
|
|
}
|
2015-05-07 10:06:08 +02:00
|
|
|
},
|
|
|
|
node2 = {
|
2015-08-07 01:25:40 +02:00
|
|
|
type = "socket",
|
|
|
|
layer = "udp",
|
2015-05-07 10:06:08 +02:00
|
|
|
local = "*:12002", # Local ip:port, use '*' for random port
|
|
|
|
remote = "127.0.0.1:12003"
|
|
|
|
combine = 30
|
2014-06-28 20:17:30 +00:00
|
|
|
}
|
2014-06-05 09:35:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
paths = (
|
|
|
|
{
|
2015-05-07 10:06:08 +02:00
|
|
|
in = "node1", # Name of the node we listen to (see above)
|
2015-08-09 23:58:50 +02:00
|
|
|
out = "node2", # And we loop back to the origin
|
|
|
|
hook = ["decimate", "print"]
|
2014-06-05 09:35:29 +00:00
|
|
|
}
|
|
|
|
);
|