Simply #include the appropriate header file from the kernel source tree into your program, and use the sizeof operator against the structure typedef.
This is why kernel header files are made available. These will be the actual structure definitions used by the kernel on that machine as-built. Although userland doesn't have direct access to the structures themselves, you are free to know all about them.
Last edited by sundialsvcs; 10-21-2011 at 08:05 AM.
|