netdev
[Top] [All Lists]

Re: 3c59x.c modified for time measurement / code included

To: Rene Pilz <rpilz@xxxxxxxxxxxx>
Subject: Re: 3c59x.c modified for time measurement / code included
From: Guilhem Tardy <guilhem_tardy@xxxxxxxxx>
Date: Wed, 19 Sep 2001 08:12:27 -0700 (PDT)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <200109191436.QAA20886@mx0.int.fh-sbg.ac.at>
Sender: owner-netdev@xxxxxxxxxxx
> 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/

<Prev in Thread] Current Thread [Next in Thread>