Skip to contentSkip to conversation

skbuff structure pointers

DISCUSSION cranium 2003 1 participant 1 message Jan 30, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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