Find the answer to your Linux question:
Results 1 to 2 of 2
I have two netfilter kernel modules (xt_RQS.c, xt_RQD.c) both include the same header file with a data structure in it. Does both kernel modules use the same data structures or ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    1

    linux kernel scope access question


    I have two netfilter kernel modules (xt_RQS.c, xt_RQD.c) both include the same header file with a data structure in it.

    Does both kernel modules use the same data structures or do they use separate ones (in normal C programming I know that but I'm not sure about the kernel scopes).

    If I want to use one data structure how can I do that (export? - concurrency issues left aside)?

    Greetings and thanks
    jb

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,752
    A structure declaration is just a definition, not an implementation. It is possible for multiple kernel modules to share the implementation of a structure (kernel global memory). If you implement a structure in your module, normally it is only local to your module. In any case, look at the documentation available for kernel module development in:

    The Linux Documentation Project
    The Linux Kernel Archives
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •