[Click] Checking SrcIP with another IP for Match?

Ashwin Chandra ashcs at ucla.edu
Thu Apr 28 02:44:11 EDT 2005


Hi all,
Im trying to check the SRC IP of an IP packet with another IP and if they match, I want to discard the packet. I am not familiar totally with Pattern reocgnition and how many bytes excatly to strip off to get the SrcIP, so I was seeing if anyone knew how to do this.  
 

elementclass PPPClient {
        // Classify incoming PPP packets (ppp-ip, ppp-ipcp, etc.)
        input[0] -> IPPrint("incoming ppp") -> ppp :: Classifier(2/0021, 2/8021, -);
        // Strip PPTP header from incoming IP packets and route them
        ppp[0] -> Strip(4) -> CheckIPHeader(INTERFACES server) -> IPPrint("IPheader checked") -> [1]output;


Thanks
Ash


More information about the click mailing list