Skip to content

Instantly share code, notes, and snippets.

@radustoenescu
Last active October 21, 2015 07:55
Show Gist options
  • Save radustoenescu/274efdfd565cd201b2e2 to your computer and use it in GitHub Desktop.
Save radustoenescu/274efdfd565cd201b2e2 to your computer and use it in GitHub Desktop.
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