Why skbuff.h different for 2.4 and 2.6 kernels?
Subsystems (2)
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
Quoted 5 lines · linux lover
hello,
1) In 2.4 kernel seriesskbuff.hhas following unions for each TCP/IP layer.
Quoted 7 lines
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