skbuff structure pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux