> After eth_type_trans the skb->data pointer is at the first position
> of the data part of the frame. So you only have to look 14 octets
> before skb->data.
I assume that after eth_type_trans the skb->data pointer is at the first
position of the IP header. Then *(skb->data+9) should be the IP protocol (i.e.
17 for UDP), and *(skb->data+20) should be the start of the UDP header.
What is your remark concerning "int = 32Bit @ linux"? I thought that short/int
was platform dependant, and unsigned short/int on x86 should be only 16 bits.
It would have been probably safer to use u8, u16 or u32.
if ((*(skb->data + 9 ) == 17 ) && ( *((unsigned short *) (skb->data+20)+1) ==
0x391b ))
I will make changes accordingly (with +1 for the UDP destination port, as
above). Thanks, I hope this was all what caused my problems.
Guilhem.
__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/
|