On Wed, 2010-08-25 at 15:00 +0530, iaaag...@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, iaaag...@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@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 > _______________________________________________ click mailing list click@amsterdam.lcs.mit.edu https://amsterdam.lcs.mit.edu/mailman/listinfo/click