[Click] can someone please explain how click deals with IP headers?

Roman Chertov rchertov at purdue.edu
Thu Oct 25 12:13:38 EDT 2007


Daniel McBrearty wrote:
> Hi
> 
> Have been playing around with this great piece of software for a few
> days. Had some success with it, but one thing seems to cause some
> trouble.
> 
> I seem not to be understanding something basic about how many elements
> handle IP headers.
> 
> For instance, if I have a config like this :
> 
> ipc IPClassifier( ip proto udp, - );
> FromDevice( etho, PROMISC true ) -> ipc;
> ipc[0] -> Queue() -> ToDevice( eth1 );
> ipc[1] -> Discard();
> 
> Now, I run this in user mode, and send it a few hundred RTP packets.
> It core dumps. The core dump goes if I remove ipc.

It core dumps because it is trying to read IP headers from where 
Ethernet headers are.  You need to use a classifier first and then strip 
14 bytes before you can send packets to the IPClassifier.

Roman

> 
> Other problems I have had have been trying to use SetIPAddress(
> 1.2.3.4, dst ) in such a config, but the ip appears unchanged in
> wireshark.
> 
> Do these IP based elements expect the ethernet header to be stripped
> off, or explicitly told the position relative to the start of an
> ethernet header? I seem to remember seeing something like this when I
> started reading the docs ... but I can't find that now.
> 
> thanks
> 
> Daniel
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> 


More information about the click mailing list