LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-11-2005, 11:16 AM   #1
linux_lover2005
Member
 
Registered: Dec 2004
Posts: 44

Rep: Reputation: 15
Why skbuff.h different for 2.4 and 2.6 kernels?


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?
 
Old 03-20-2006, 04:54 AM   #2
venkatesh111
Member
 
Registered: Mar 2006
Posts: 34

Rep: Reputation: 15
hi if u have worked on skbuff then plz answer this for me

how do i start imlementing skbuff from scratch
can i run skbuff in yser space

thank u
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernels DeeMON Fedora 2 11-26-2004 09:52 PM
How to use skbuff to scan every byte of the payload of an UDP packet? sceadu Programming 0 11-03-2004 09:34 PM
different kernels master Slackware 8 09-27-2004 03:27 PM
RH 8 kernels and their relation to 'stock' kernels psweetma Linux - Distributions 1 03-29-2003 10:46 PM
kernels watashiwaotaku7 General 2 12-26-2002 08:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration