[Click] Expoting variables from other elements
Pradeep Pradeep
pradeep_addada at yahoo.co.in
Thu Apr 17 20:09:31 EDT 2008
Hi all,
Is there any way that an element in the click configuration can export variables/parameters of other lements(in the configuration). If so, how can the FlowShaper element in the following configuration get the queue lengths of Queue elements OUT1 and OUT2? I am attaching the link to the paper in which authors (Eddie and Robert ) say that this export can be done.
pdos.csail.mit.edu/~rtm/papers/click.pdf
require(iamanet);
AddressInfo (
10_1_3_3_mac 00:04:23:B7:1E:1E,//eth2-r1
10_1_1_2_mac 00:04:23:B7:1E:1F,//eth3-r1
10_1_1_3_mac 00:04:23:B7:1F:F6,//eth2-r2
10_1_2_2_mac 00:04:23:B7:1F:F7,//eth3-r2
local_DOM1 10.1.3.254 10.1.3.0/24,
local_DOM1_bcast 10.1.3.255,
local_DOM1_default 10.1.3.0,
local_DOM2 10.1.1.1 10.1.1.0/24,
local_DOM2_bcast 10.1.1.255,
local_DOM2_default 10.1.1.0,
local_DOM3 10.1.2.254 10.1.2.0/24,
local_DOM3_bcast 10.1.2.255,
local_DOM3_default 10.1.2.0,
source 10.1.3.0/24,
sink 10.1.2.0/24,
source1 172.16.10.0/24,
sink1 172.16.20.0/24,
);
rt :: LinearIPLookup(
sink 2,
sink1 2,
source 1,
source1 1,
//source side
local_DOM1 0,
local_DOM1_bcast 0,
local_DOM1_default 0,
local_DOM2 0,
local_DOM2_bcast 0,
local_DOM2_default 0,
255.255.255.255/32 0.0.0.0 0,
0.0.0.0/0 0,
0.0.0.0/32 0);
elementclass CheckTimeExceeded {
input-> ttl:: DecIPTTL
ttl[0]->output
ttl[1]-> ICMPError(local_DOM1, timeexceeded)->output
}
ip :: Strip(14)
-> CheckIPHeader(INTERFACES local_DOM1/24 local_DOM2/24 )
-> IPC :: IPClassifier(src 10.1.3.0/24 and dst 10.1.2.0/24 and tcp,icmp, -);
IPC[0] ->fs1 :: FlowShaper(ok, MAX_SIZE 1455,MAX_RATE 2500)
-> rt;
IPC[1] -> rt;
IPC[2] -> rt;
arpt :: Tee(3);
c0 :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800, -);
FromDevice(eth2) -> c0;
out0 :: Queue(200)
-> todevice0 :: ToDevice(eth2);
c0[0] -> ar0 :: ARPResponder(local_DOM1 10_1_3_3_mac) -> out0;
arpq0 :: ARPQuerier(local_DOM1, 10_1_3_3_mac) -> out0;
c0[1] -> arpt;
arpt[0] -> [1]arpq0;
c0[2] -> Paint(1) -> ip;
c0[3] -> Discard;
// Input and output paths for ethernet interface 10_1_2_2 eth1
c1 :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800, -);
FromDevice(eth3) -> c1;
out1 :: Queue(200)
-> todevice1 :: ToDevice(eth3);
c1[0] -> ar1 :: ARPResponder(local_DOM2 10_1_1_2_mac) -> out1;
arpq1 :: ARPQuerier(local_DOM2, 10_1_1_2_mac) -> out1;
c1[1] -> arpt;
arpt[1] -> [1]arpq1;
c1[2] -> Paint(2) -> ip;
c1[3] -> Discard;
// Local delivery
arpt[2] -> Discard;
rt[0] -> EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) -> Discard;
rt[1] -> DropBroadcasts
-> cp0 :: PaintTee(1)
-> gio0 :: IPGWOptions(local_DOM1)
-> FixIPSrc(local_DOM1)
-> dt0 :: DecIPTTL
-> fr0 :: IPFragmenter(1500)
-> [0]arpq0;
dt0[1] -> ICMPError(local_DOM1, timeexceeded) -> rt;
fr0[1] -> ICMPError(local_DOM1, unreachable, needfrag) -> rt;
gio0[1] -> ICMPError(local_DOM1, parameterproblem) -> rt;
cp0[1] -> ICMPError(local_DOM1, redirect, host) -> Discard;
rt[2] -> DropBroadcasts
-> cp1 :: PaintTee(2)
-> gio1 :: IPGWOptions(local_DOM2)
-> FixIPSrc(local_DOM2)
-> dt1 :: DecIPTTL
-> fr1 :: IPFragmenter(1500)
-> EtherEncap(0x0800, 10_1_1_2_mac, 10_1_1_3_mac)
-> out1;
dt1[1] -> ICMPError(local_DOM2, timeexceeded) -> rt;
fr1[1] -> ICMPError(local_DOM2, unreachable, needfrag) -> rt;
gio1[1] -> ICMPError(local_DOM2, parameterproblem) -> rt;
cp1[1] -> ICMPError(local_DOM2, redirect, host) -> Discard;
rt[3] -> DropBroadcasts
-> cp6 :: PaintTee(1)
-> gio6 :: IPGWOptions(local_DOM2)
-> FixIPSrc(local_DOM2)
-> dt6 :: DecIPTTL
// -> IPPrint("To eth_DOM2")
-> fr6 :: IPFragmenter(1500)
-> [0]arpq1;
dt6[1] -> ICMPError(local_DOM2, timeexceeded) -> rt;
fr6[1] -> ICMPError(local_DOM2, unreachable, needfrag) -> rt;
gio6[1] -> ICMPError(local_DOM2, parameterproblem) -> rt;
cp6[1] -> ICMPError(local_DOM2, redirect, host) -> Discard;
Regards,
Pradeep.
---------------------------------
Meet people who discuss and share your passions. Join them now.
More information about the click
mailing list