On Monday 2009-12-14 21:28, Tobias Koeck wrote: >>> I have two netfilter kernel modules (xt_RQS.c, xt_RQD.c, both include a >>> header >>> file with a data structure in it). >>> >>> Does both kernel modules use the same datastructures or do they use seperate >>> ones (in normal C programming I know that but I'm not sure about the kernel >>> scopes). >> >> You decide whether they do. This does not change just because you are in >> kernel space. > > Can you please give a short example how to to it? > > Let's say you've got one data structure (int a) in the header file. How can you > access it in both c-files? Do you have to export it? You can argue what a data structure is or what it is not; a header file should not include any definitions, only declarations. (And perhaps static-inlines, but that's probably too expert for you at this stage.) Various C-related forums or IRC channels can enlighten you towards the reasoning for that. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html