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

Beyers Cronje bcronje at gmail.com
Thu Oct 25 16:15:05 EDT 2007


Hi Daniel,

You would also need to use an element like MarkIPHeader of CheckIPHeader
before your IPClassifier. IP elements requires that the IP Header annotation
is set on each packet, which gets done by either of the two elements
mentioned above.

Beyers

On 10/25/07, Daniel McBrearty <danielmcbrearty at gmail.com> 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
>


More information about the click mailing list