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

Seth Hall hall.692 at osu.edu
Thu Oct 25 14:45:56 EDT 2007


I believe that unstrip should do what you want if you want the  
original ethernet header put back.
    http://read.cs.ucla.edu/click/elements/unstrip

You can build your own ethernet header with etherencap.

  .Seth

On Oct 25, 2007, at 2:12 PM, Daniel McBrearty wrote:

> Thanks Roman. I was starting to suspect this. I guess the same applies
> to other modules that expect IP packets.
>
> Next question : when you are done processing the raw IP, how do you
> put an ethernet header back on, prior to the Queue() -> ToDevice()
> combination?
>
> cheers
>
> On 10/25/07, Roman Chertov <rchertov at purdue.edu> wrote:
>> 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
>>>
>>
>
>
> -- 
> Daniel McBrearty
> email : danielmcbrearty at gmail.com
> http://www.engoi.com
> http://danmcb.vox.com
> http://danmcb.blogger.com
> find me on linkedin and facebook
> BTW : 0873928131
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click

---
Seth Hall
Network Security - Office of the CIO
The Ohio State University
Phone: 614-292-9721





More information about the click mailing list