How pointers work in this case?
From: kernel.lover (cranium.2003_at_gmail.com)
Date: 01/30/05
- Next message: Uday Mullangi: "prints..."
- Previous message: kernel.lover: "Packet forwarding queries"
- Next in thread: Noah Roberts: "Re: How pointers work in this case?"
- Reply: Noah Roberts: "Re: How pointers work in this case?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jan 2005 03:05:38 -0800
Hello,
By looking into skbuff.h it is clear that paket is stored in
skbuff structure which has also many structures defined for each layer
as union.
Can it be possible to retreive any structure by casting skb->data at
any stage once that struct is push to skbuff structure?
e.g. by looking in eth.c following statement tells it works but how???
struct ethhdr *eth = (struct ethhdr *)skb->data;
Also once a structure is assigned values/pushed it in skbuff structure
can it be possible to change its values at any later stage?
e.g. in above ethernet case does it possible to change eth->h_proto in
ethernet driver file(8390.c)
regards,
cranium
- Next message: Uday Mullangi: "prints..."
- Previous message: kernel.lover: "Packet forwarding queries"
- Next in thread: Noah Roberts: "Re: How pointers work in this case?"
- Reply: Noah Roberts: "Re: How pointers work in this case?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|