[Click] ip header checksum

Harald Schioeberg harald at net.t-labs.tu-berlin.de
Wed Aug 25 05:38:59 EDT 2010


On Wed, 2010-08-25 at 15:00 +0530, iaaaguru at tce.edu wrote: 
> now added MarkIPHeader element for ip header annotaion. still i have the
> same problem

You mark the Header at position 14 after you removed 14 bytes, but then
the IP header is at 0. 
Please do the tutorials to train standard IP packet handling...

Harald


> 
> FromDevice(eth1)
> ->Print(orgn)
> ->Strip(14)
> ->MarkIPHeader(14)
> ->StoreData(7,a)
> ->Print(mrkd)
> ->SetIPChecksum
> ->Print(unst)
> ->Unstrip(14)
> ->Print(finl)
> ->Discard;
> 
> > On Wed, 2010-08-25 at 11:13 +0530, iaaaguru at tce.edu wrote:
> >> prev post was on ip checksum element. it returns bad lengths. the
> >> following is the configuration. elements after checksum elemnt are not
> >> functioning. wats the error? help me
> >>
> >
> > There is no Element that sets the correct IP Header annotation, hence IP
> > specific Elements will not work. See CheckIPHeader.
> >
> > The tutorial at
> > http://read.cs.ucla.edu/click/tutorial1
> > and it's solutions give nice canonical examples of how to handle IP
> > packets.
> >
> > Harald
> >
> >
> >>
> >> //classifying the IP packet based on starting hex 45 00
> >> cl :: Classifier(14/45 , -);
> >> //capturing packets from eth1
> >> 	FromDevice(eth1)
> >> 	->[0]cl;
> >> 	cl[0]->
> >> //print org packets
> >> 	 Print(orig)
> >> //stripping ether header
> >> 	-> Strip(14)
> >> //printing altered packet
> >>         ->Print(strp)
> >> //altering contents
> >>         ->StoreData(4,A)
> >> //printf stripped packet
> >> 	->Print(stor)
> >> //seting chksum
> >> 	 ->SetIPChecksum()
> >> //ustriping packet
> >> 	 ->Unstrip(14)
> >> 	 ->Print(ustp)
> >> 	 -> Discard;
> >> cl[1]-> Discard();
> >>
> >>
> >> -----------------------------------------
> >> This email was sent using TCEMail Service.
> >> Thiagarajar College of Engineering
> >> Madurai-625 015, India
> >>
> >> _______________________________________________
> >> click mailing list
> >> click at amsterdam.lcs.mit.edu
> >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >
> >
> >
> 
> 
> 
> -----------------------------------------
> This email was sent using TCEMail Service.
> Thiagarajar College of Engineering
> Madurai-625 015, India
> 




More information about the click mailing list