[ixp1200] how to extract the src & dest address....

nitin makhija makhija_nitin at rediffmail.com
Sat Jul 31 10:32:33 EDT 2004


    
hellow,
Anyone cud. pls tell em how can i extract Dest. and src Ip and Port from a received pkt..

i'm trying to find out this frm eg. code of chapter 8 (Bridging eg. using hashing) in tht they have not even recived the mpackets frm RFIFO, neither the header have being read frm the sdram??? so how can they simply compare the dest. and src. Mac address for bridging.....

i've also tried to understand the layer 3 forw. eg: but not sucedde in tht too...
according to me following steps shd. be taken to compare any info frm the mpacket...
1. receive mpkt. from RFIFO into SDRAM.
2. then do sdram_read appropriate longwords, at the offset u require to read from say a 28 byte offset to read src. ip adress...
3. then perform the appropriate masking to get the required data ..

I'm tring to include a code just to extract the header info, in the code of chapter 3( simple count eg. to have a feel of it) but even not suceeded in it. 
i was tring out this....

where buf_handle is the starting adress where the mpkt is stored in the sdram, and iphead is the pointer to a structure which has 2
unsigned integer as members..(just to take out a 64 bit value at a particular offset from start address)......just to being wd....

 sdram_read(__declspec(sdram_read_reg)
 *iphead,volatile __declspec(sdram) * (buf_handle +
 2) ,1,queue_default,ctx_swap);

 but this code is also giving an error....

\Study\Project_IXP\test_nitin\Chapter05\receive.c(206):
 error :  expected an expression



Sorry if i'm sounding stupid.....not able to find a proper documentation anywhere...if any of u has a sloution to this pls.. reply .

By teh way vijay ive already subscribed to pricenton uni. mailing list...Thaxs for tht too ..

regards,
Nitin Makhija




More information about the ixp1200 mailing list