[Click] click Digest, Vol 93, Issue 16

Beyers Cronje bcronje at gmail.com
Thu Mar 17 21:17:27 EDT 2011


Hi,

Before using IPPrint or IPClassifier you need to use MarkIPHeader or
CheckIPHeader to set the IP header annotations.

Beyers

On Fri, Mar 18, 2011 at 3:09 AM, wubaochuan <wubaochuan at seu.edu.cn> wrote:

> Hi Harald,
>       Thank you for your response! According to manual page of
>       I have tried:
>       ip :: Strip(14)  -> IPPrint -> ipc :: IPClassifier(10.0.0.1/24, -);
>       ipc[0] -> sia :: SetIPAddress(10.0.0.1) -> rtsrc :: DirectIPLookup(
>                10.0.0.1/24    10.0.2.2    0,
>                0.0.0.0/0.0.0.0    0
>        );
>
>        But click core dump after several seconds it started.
>
>
>
> Yours
> Chuan
>
>
>
> click-request at pdos.csail.mit.edu wrote:
> >    2. Re: Help, how to route according to source IP address of an
> >       IP packet (Harald Schioeberg)
> > Message: 2
> > Date: Thu, 17 Mar 2011 10:20:49 +0100
> > From: Harald Schioeberg <harald at net.t-labs.tu-berlin.de>
> > Subject: Re: [Click] Help, how to route according to source IP address
> >       of an IP packet
> > To: click at pdos.csail.mit.edu
> > Message-ID: <4D81D271.1070302 at net.t-labs.tu-berlin.de>
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> >
> >
> > On 03/12/2011 03:55 PM, wubaochuan wrote:
> >
> >> hi everyone,
> >>         The IPv4 Routing elements can route IP packets according to the
> >> destination address of IP packets,
> >>
> >
> > looking at iproutetable.cc:153:
> >     int port = lookup_route(p->dst_ip_anno(), gw);
> >
> > it looks like the route-tables actually use the destination annotation...
> >
> >
> > How to route IP packets according to
> >
> >> source address of IP packets?
> >>
> >
> > and you can set the DstAnno using GetIPAddress, to grab the source IP
> > you would use offset 12,...
> >
> > that means
> >       GetIPAddress(12)->SomeIPRoutetable(...)
> >
> > should do the trick.
> >
> >
> >> I want to forward all IP packets from
> >> 10.2.2.0/24 to a machine.
> >>
> >
> > well, this simple case can be done just using a classifier, like:
> >
> > Classifier(12/0a020200%ffffff00, - )
> >
> > I tried none of these, but maybe they set you on the right track.
> >
> >       Harald
> >
> >
> >
> >>        Thank you.
> >> Yours
> >> Chuan
> >> _______________________________________________
> >> click mailing list
> >> click at amsterdam.lcs.mit.edu
> >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >>
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.10 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> >
> > iEYEARECAAYFAk2B0m4ACgkQy8wrZ9OvkU1+dwCeMe9zNrZpWnilblFWcC0W2Q88
> > tzwAoIyBmJ9sBTSahgDdag2tejo0IJfM
> > =lQAE
> > -----END PGP SIGNATURE-----
> >
> >
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list