Last active
October 21, 2015 07:55
-
-
Save radustoenescu/274efdfd565cd201b2e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Click can be found @ http://www.read.cs.ucla.edu/click/ | |
Click paper @ https://pdos.csail.mit.edu/papers/click:tocs00/paper.pdf | |
====================================================================== | |
sudo apt-get update | |
sudo apt-get install git build-essential | |
git clone https://github.com/kohler/click.git | |
cd clikc | |
./configure | |
# More info on building options can be found @ INSTALL | |
sudo make install | |
# Test click setup | |
click conf/test.click | |
======================================================================== | |
/* A click that binds to eth0 and prints every ip packet sent to 10.0.1.166. */ | |
c :: Classifier(12/0800, /* IP protocol */ | |
- /* everything else */); | |
FromDevice(eth0) -> c -> CheckIPHeader(14, CHECKSUM false) -> IPClassifier(ip dst 10.0.1.166) -> Print(ok) -> Discard; | |
/* Non IP packets are discarded. | |
c[1] -> Discard; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment