[ixp1200] Hellow..

nitin makhija makhija_nitin at rediffmail.com
Sun Aug 1 16:57:48 EDT 2004


  Hellow,

i'm just tring to understand how can i get information out of header of mpkt...so made few changes in eg. code of chapter 5 (which counts the mpkt's)...but not able to understand where m i going wrong...actually i'm not getting expected results..

changes which i made......

1... added a new structure in buffer.h file

typedef struct {
    unsigned int     e_dst_hi32;
     unsigned int      e_dst_lo16     : 16,
                         e_src_hi16     : 16;
     unsigned int     e_src_lo32;
               
                    
} ethernetHeader_t;


2... declared a pointer to this new type and it points to the buffer_handle (adress returned by a function where mpkt. is stored by RFIFO)

3... just checking whether lower 16 bits of dest mac is 0xffff or not...in a if-else block ,,,,,inside while function of main()

4....i have edited the stream, from ix simulator to have mac address as 0xffffffffffff


the if block which i added in the main in receive.c file ...

     if(  headerData.e_dst_lo16 == 0xFFFF )
               scratch_incr(cntr, no_signal);          
        else
               scratch_incr(cntr_blocked, no_signal);  

in this case cntr_blocked is incremented instead of cntr , which is expected.

 can u expain where m i going wrong...


regards,
Nitin Makhija 





More information about the ixp1200 mailing list