Re: Linux sk_buff issues.

From: Paul Schulz (pschulz@foursticks.com.au)
Date: Tue Jul 31 2001 - 00:43:03 EST


Greetings,

In the 2.4.1 kernel..
While looking at the packet classifier code (net/sched/cls_u32.c) and other
ipv4 code that makes use of sk_buf, the following is observed:

-- There exist data structures in sk_buf for the mac layer (mac), net
        header (nh), and transport header (h).

-- These data structures contain explicit labels for the various header
        fields (depending on the protocol used) as well as a 'raw'
        field.

-- Most of the cls_u32 code and packet handling code uses the
        'raw' label in the data-structure.

Using kgdb, and tracing these datastructures, there are cases where the data
looks to be inconsistant. (for example, skb->nh.iph
points to one part of memory and skb->h.tcphdr points to a different part).
Also, the values seem to be different, eg., (struct udphdr *)((char
*)skb->nh.raw + 20)->source != skb->h.udp->source. I am assuming using
skb->nh.raw is the corrent version to use at this point. Is this correct and
are their any guidelines to be aware of?

Thanks,
Paul

--
                       Paul Schulz - Software Engineer
        Foursticks Pty Ltd - 2/259 Glen Osmond Road, Frewville, SA 5063
    Phone: +61 8 8338 5500   Fax: +61 8 8338 5511   Mobile: +61 401 981 301
       Email: pschulz@foursticks.com           Web: www.foursticks.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:49 EST