Re: what's the use of linux-header-3.x.x?
Header files contain declarations (types, macros, functions, etc.) that are defined in source files. Other source files that want to make use of those declarations import the header files. The linker brings it all together.
For example; if you have a module that provides a stack data structure, you might create a header file 'stack.h' that declares a function called 'pop'. The implementation of 'pop' goes in 'stack.c'. If you want to work with a stack in your main program, lets call it 'main.c', you '#include stack.h'. You can then use the 'pop' function because you have the declaration. The compiler compiles your main program as a standalone unit into an object (.o) file which has an unresolved reference to that 'pop' function.
When you link your program to create main, the linker resolves all the symbols from all the .o files and creates the executable.
The Linux kernel has lots of separate source files, so lots of header files.
I didn't have time to read this link thoroughly but it looks like it covers what you need to know, with examples:
Please create new threads for new questions.
Please wrap code in code tags using the '#' button or enter it in your post like this: [code]...[/code].