netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why skbuff.h different for 2.4 and 2.6 kernels?
@ 2005-04-11 16:37 linux lover
  2005-04-11 21:01 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: linux lover @ 2005-04-11 16:37 UTC (permalink / raw)
  To: netdev

hello,
1) In 2.4 kernel series skbuff.h has following unions
for each TCP/IP layer.
       /*Transport Layer*/
      union
	{
		struct tcphdr	*th;
		struct udphdr	*uh;
		struct icmphdr	*icmph;
		struct igmphdr	*igmph;
		struct iphdr	*ipiph;
                struct spxhdr	*spxh;
		unsigned char	*raw;
	} h;

	/* Network layer header */
	union
	{
		struct iphdr	*iph;
		struct ipv6hdr	*ipv6h;
		struct arphdr	*arph;
		struct ipxhdr	*ipxh;
		unsigned char	*raw;
	} nh;

	/* Link layer header */
	union 
	{	
	  	struct ethhdr	*ethernet;
	  	unsigned char 	*raw;
	} mac;

AND In 2.6 kernel series skbuff.h has following unions
for each TCP/IP layer.
	union {
		struct tcphdr	*th;
		struct udphdr	*uh;
		struct icmphdr	*icmph;
		struct igmphdr	*igmph;
		struct iphdr	*ipiph;
		struct ipv6hdr	*ipv6h;
		unsigned char	*raw;
	} h;

	union {
		struct iphdr	*iph;
		struct ipv6hdr	*ipv6h;
		struct arphdr	*arph;
		unsigned char	*raw;
	} nh;

	union {
	  	unsigned char 	*raw;
	} mac;

 why mac union in 2.6 not have ethernet header? Also
spxhdr and ipxhdr structures are removed from nh and h
unions.

2) Why header structures for ipcomp,eh,esp(IPSEC) not
included in skbuff.h?
 Then how can skbuff adds/removes those headers in
skbuff? 

regards,
linux_lover

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why skbuff.h different for 2.4 and 2.6 kernels?
  2005-04-11 16:37 Why skbuff.h different for 2.4 and 2.6 kernels? linux lover
@ 2005-04-11 21:01 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2005-04-11 21:01 UTC (permalink / raw)
  To: linux lover; +Cc: netdev

On Apr 11, 2005 1:37 PM, linux lover <linux_lover2004@yahoo.com> wrote:
> hello,
> 1) In 2.4 kernel series skbuff.h has following unions
> for each TCP/IP layer.


>         union {
>                 unsigned char   *raw;
>         } mac;
> 
>  why mac union in 2.6 not have ethernet header? Also
> spxhdr and ipxhdr structures are removed from nh and h
> unions.

Work in progress, the ultimate goal is to get rid of all of these unions and
have just:

        void *transport_header;
        void *network_header;
        void *link_header;

So just set mac.raw directly and cast it to the desired type.

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why skbuff.h different for 2.4 and 2.6 kernels?
@ 2005-04-12  1:26 linux lover
  2005-04-12  1:56 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: linux lover @ 2005-04-12  1:26 UTC (permalink / raw)
  To: acme; +Cc: netdev

Hello,
        Thanks for reply. Can you please tell me about
my second question?
      2)But Why header structures for ipcomp, eh,
esp(IPSEC) not included in skbuff.h?
 
regards,
linux_lover.

--- Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
wrote:
> On Apr 11, 2005 1:37 PM, linux lover
> <linux_lover2004@yahoo.com> wrote:
> > hello,
> > 1) In 2.4 kernel series skbuff.h has following
> unions
> > for each TCP/IP layer.
> 
> 
> >         union {
> >                 unsigned char   *raw;
> >         } mac;
> > 
> >  why mac union in 2.6 not have ethernet header?
> Also
> > spxhdr and ipxhdr structures are removed from nh
> and h
> > unions.
> 
> Work in progress, the ultimate goal is to get rid of
> all of these unions and
> have just:
> 
>         void *transport_header;
>         void *network_header;
>         void *link_header;
> 
> So just set mac.raw directly and cast it to the
> desired type.
> 
> - Arnaldo
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why skbuff.h different for 2.4 and 2.6 kernels?
  2005-04-12  1:26 linux lover
@ 2005-04-12  1:56 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2005-04-12  1:56 UTC (permalink / raw)
  To: linux lover; +Cc: netdev

On Apr 11, 2005 10:26 PM, linux lover <linux_lover2004@yahoo.com> wrote:
> Hello,
>         Thanks for reply. Can you please tell me about
> my second question?
>       2)But Why header structures for ipcomp, eh,
> esp(IPSEC) not included in skbuff.h?

I thought I have answered this, the reason to have the layer pointers in skb
be void is that skb is core/generic infrastructure, it should not have any kind
of protocol specific structures/information in it.

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why skbuff.h different for 2.4 and 2.6 kernels?
@ 2005-04-12  2:13 linux lover
  0 siblings, 0 replies; 5+ messages in thread
From: linux lover @ 2005-04-12  2:13 UTC (permalink / raw)
  To: acme; +Cc: netdev


--- Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
wrote:
> On Apr 11, 2005 10:26 PM, linux lover

Hello,
            Sorry if my questions are stupid but again
have one question when skbuff.h is implemeted as
     void *transport_header;
        void *network_header;
        void *link_header;
          
            Then how say ESP packet can be constructed
in network stack. ESP has structure as 
       New IP header + ESP header + IP header +
TCP/UDP header + ESP trailer + ESP auth. header
           Does it then remains only with playing
skbuff by using skb_push and skb_pull in ESP packet
processing once skbuff.h will change?
Please kindly correct me to understand this.
regards,
linux_lover.

 <linux_lover2004@yahoo.com> wrote:
> > Hello,
> >         Thanks for reply. Can you please tell me
> about
> > my second question?
> >       2)But Why header structures for ipcomp, eh,
> > esp(IPSEC) not included in skbuff.h?
> 
> I thought I have answered this, the reason to have
> the layer pointers in skb
> be void is that skb is core/generic infrastructure,
> it should not have any kind
> of protocol specific structures/information in it.
> 
> - Arnaldo
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-04-12  2:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-11 16:37 Why skbuff.h different for 2.4 and 2.6 kernels? linux lover
2005-04-11 21:01 ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2005-04-12  1:26 linux lover
2005-04-12  1:56 ` Arnaldo Carvalho de Melo
2005-04-12  2:13 linux lover

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).