有用过Click Modular Router的兄弟帮下忙
关于click: http://pdos.csail.mit.edu/click/我写了一个简单的测试element(SimplePushElement)
源文件simplepushelement.cc和simplepushelement.hh放在/elements/local(./configure --enable-local)
然后进入click目录
make elemlist
make install
之后写了一个测试文件如下:
// test.click
// This configuration should print this line five times:
// ok: 40 | 45000028 00000000 401177c3 01000001 02000002 13691369
// Run it at user level with
// 'click test.click'
// Run it in the Linux kernel with
// 'click-install test.click'
// Messages are printed to the system log (run 'dmesg' to see them, or look
// in /var/log/messages), and to the file '/click/messages'.
InfiniteSource(DATA \, LIMIT 5, STOP true)
-> Strip(14)
-> Align(4, 0) // in case we're not on x86
-> CheckIPHeader(BADSRC 18.26.4.255 2.255.255.255 1.255.255.255)
->SimplePushElement
-> Print(ok)
-> Discard;
测试:click test.click
结果SimplePushElement不能被识别,各位用过Click的朋友帮下忙 我也想知道咯 谁可以给我一个学习click modular router的好资料呢
页:
[1]