[Click] illegal reuse

Sofia Rodriguez blink_sgirl_182 at hotmail.com
Sun Jul 10 08:12:41 EDT 2011


Hi!
I am trying to use a ToDevice writer twice in a click configuration file and it gives me the " illegal reuse of ‘td0 :: ToDevice’ pull input 0" error
but I really need to write from two different sources to eth0 and eth1. Is there a way to do so without getting an error??

this is the click file:

td0::ToDevice(eth0)
td1::ToDevice(eth1)
Flows :: TCPDemux
connection:: TCPConn
lovely :: TCPBuffer()
copy :: PullTee(3)

elementclass FromServer{

    FromDevice(eth0)
    ->Strip(14)
    ->CheckIPHeader(INTERFACES 192.168.1.2/24 192.168.2.2/24)
    ->GetIPAddress(16)
    ->bufin :: IPClassifier(dst 192.168.2.2/24,-);
    buf1 :: Queue(400) ->  output;
    buf2 :: Queue(400) -> Discard;
    bufin [0] ->buf1;
    bufin [1] -> buf2;

};

elementclass FromClient{

    FromDevice(eth1)
    ->Strip(14)
    ->CheckIPHeader(INTERFACES 192.168.2.2/24 192.168.1.2/24)
    ->GetIPAddress(16)
    ->bufin :: IPClassifier(dst 192.168.1.2/24,-);
    buf1 :: Queue(400) -> output;
    buf2 :: Queue(400) -> Discard;
    bufin [0] -> buf1;
    bufin [1] -> buf2;

};

elementclass ToServer{


    input
    ->EtherEncap (0x800, 70:71:BC:4B:9A:B3,70:71:BC:4B:9D:D0)
    ->Queue(4000) -> Print(ok) -> output;

};

elementclass ToClient{


    input
    ->EtherEncap(0x800, 00:03:47:E0:8C:23,70:71:BC:43:78:93)
    ->Queue(4000) -> Print(ok) -> output;
};




FromServer()  -> [1]connection

connection[1]-> copy;

copy[0] ->Unqueue()->[0]lovely;

copy[1] ->Spoofer(SRC 192.168.2.2, DST 192.168.1.2)->Print(Spoofed)->ToServer()->td0;
copy[2]-> ToClient()->td1;

connection[2] ->ToServer()->td0;

FromClient()->Unqueue ->Flows -> [0]connection[0]-> [1]lovely;

lovely[0] ->Unqueue()->ToClient()->td1;

 		 	   		  


More information about the click mailing list