[ixp1200] Altering a packet in memory

Øyvind Hvamstad oyvindh at ifi.uio.no
Mon Jun 21 06:34:21 EDT 2004


Hi, I have some doubts on how to alter a packet in memory.

What I basically want to do is UDP forwarding. I have to change the
destination ip and port. I will also have to change the mac addresses
and calculate some checksums.

I have been reading the L3Fwd code and also the microcode programmers
reference guide, but I still have some, potentially stupid, questions:

Say I want to alter the IP address and do something like this:
sdram[write, $$hdr0, ip_hdr_base, dst_ip_offset, 1] 

Will this write 64 bits from $$hdr0 to ip_hdr_base + dst_ip_offset in
sdram? Then, must I ensure that the 32 first bits of $$hdr0 is the new
IP and that the 32 next bits are the same as the original?

I just want to make sure I understand this correctly.

Thanks.

Info: ENP-2505, embedded linux, Intel SDK 2.01
-- 
Øyvind Hvamstad <oyvindh at ifi.uio.no>



More information about the ixp1200 mailing list