[Click] illegal reuse

Eddie Kohler kohler at cs.ucla.edu
Sun Jul 10 11:57:11 EDT 2011


You need to move the Queue elements out of the ToServer / ToClient compounds. 
  So your configuration should look like:

buf1 :: Queue(400) -> td1;

... -> ToClient() -> buf1;
... -> ToClient() -> buf1;

The Queue's push input port can be reused.

Eddie


On 07/10/2011 05:12 AM, Sofia Rodriguez wrote:
>
> 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;
>
>   		 	   		
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click



More information about the click mailing list