[vortex] How to change the UDP data area in the 3c59x.c driver level

Marcus Ramos marcus@ansp.br
Tue, 13 Mar 2001 14:54:11 -0300


I am working on the development of an application that needs to
timestamp UDP packets right before they are put on the wire, that means,
on the driver level. I've modified the 3c59x.c source code at function
boomerang_xmit_start() in order to simulate the insertion of a timestamp
in the data area of the UDP packet. This means I am trying to change the
contents of (skb->data)+42 to (skb->data)+53, corresponding to the 12
bytes of data that follow the Ethernet/IP/UDP headers in the packet to
be transmitted.

However, doing so causes my application to behave completely strange, as
if I were not allowed to change the contents of the UDP data segment. Of
course I set (skb->data)+40 and (skb->data)+41 to zeroes, as to inform
that no checksum will be used (at the least for the time being). That
"should" prevent the transmission routines to misbehave because the
previously calculated UDP checksum wouldn't match anymore the new
contents of the UDP data area.

Writing zeroes to the UDP checksum area does not cause any problem.
Writing anything to the data area of the UDP segment causes big problem.
Will somebody have an idea of what might be happening ? I would be most
grateful for any hints or comments.

Thanks in advance,