[Click] help: about ToDevice()
静 李
lastlijing at yahoo.com.cn
Fri Nov 10 00:00:25 EST 2006
Hi
I have a question about element::ToDevice( )
My want to :
1. get real packets from net(eth0) ,
2. and pick out ip packets ,
3. last send the ip packets back to the net(eth0).
Here is my coniguration:
-----------
in1 :: FromDevice(eth0, PROMISC 0);
ip_class :: Classifier(12/0800, -); // ip pkts
in1 -> ip_class;
ip_class[1] -> Discard;
ip_class[0]-> Print( --eth0--,NBYTES 200)
-> ToDevice(eth0);
--------------
but the it does NOT work ,and it is the error message:
#./click ../conf/local/todevice.click
#agnostic 'Print at 4 :: Print' in mixed context: push
input 0, pull output 0
Router could not be initialized!
But if I change "ToDevice(eth0)" to "Discard", it
works.
and the result is:
--eth0--: 66 | 001109f5 3c130012 01b4c881 08004500
00345937 40003006 484adaf620cdac10 016f0050 81904b98
d7f37a7e 72288010 0a275d57 00000101 080a0917 e55b00c4
e4b1
...
I have no idea why this happens. Why I can't use
"ToDevice(eth0)" as in the configuration above ??
Thanks in advance.
___________________________________________________________
抢注雅虎免费邮箱-3.5G容量,20M附件!
http://cn.mail.yahoo.com
More information about the click
mailing list