On Wed, 3 Jul 2002, Wei Koong CHAI wrote:

> My questions:
> 
> [1] In the struct ipq_packet_msg, the data_len field is referring to what? 
> Is it referring to the length of the whole IP packet (header + payload) or 
> just the header or the payload alone?

The whole IP packet, which is the packet message payload.

> And, is the payload[0] referring to 
> the first byte of the IP packet?

Yes.  Please refer to ipq_get_packet(3).

> 
> [2] I have already managed to randomly decide a bit to corrupt within a 
> packet (which is just inverting the bit) but i'm unsure on how to actually 
> access the packet (header + payload) and invert the bit.

An example of packet modification is at:
http://cvs.netfilter.org/cgi-bin/cvsweb/netfilter/OLD/tools/ipq_client.c

It won't compile anymore, but is trivial to fix.

> 
> [3] I have read somewhere that the kernel would silently / automatically 
> drop the packet if i change the packet without updating the checksum. What 
> i need to know is that, which kernel will drop the packet? My bridge or the 
> receiving workstation? I don't want my libipq program to drop it as i need 
> it to be as transparent as possible.

Generally, the receiving workstation.  I'm sure I've seen the sending 
kernel drop invalid packets, but can't see (with a brief look) where this 
would happen in the current kernel.


- James
-- 
James Morris
<[EMAIL PROTECTED]>



Reply via email to