Find the answer to your Linux question:
Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    genl_register_ops/genl_register_family_with_ops v/v Linux 4.10+


    In setting up a Generic Netlink family in the kernel module, it used to be that you would register your commands with genl_register_ops.

    At a certain point, this was replaced by genl_register_family_with_ops.

    It appears that in Linux 4.10 and up, the latter function is gone as well.
    My Internet search re what has replaced it has come up empty.

    Hoping someone here can help..... How do you register your family's commands nowadays???

    Thanks!

    EDIT: I think I see the answer in the code base. It appears that ops is now a field in struct genl_family. So, I'm guessing that after you define your genl_ops struct, you define your genl_family struct, and assign your genl_ops struct to element ops in the genl_family struct (and assign the number of ops to element n_ops).
    Last edited by yaronshr; 05-18-2017 at 03:08 PM.

Posting Permissions

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