Good day. I would like to create two (almost identical) modules - each module uses a netlink socket and responds to an incoming message from a user space program.
During initialization of the first module, it successfully executes the following command:
netlink kernel create(&init_net, NETLINK_USER, &cfg)
However, if I run the second module with the same arguments, the same command will cause an error.
I thought this error occurred because the NETLINK_USER value of both modules was the same - 31 - which is why I could not create a second socket connection for the same netlink user. However, if I try the NETLINK_USER value of 32, a kernel error will occur. Any other value is an error.
Please tell me what I need to do to use two kernel modules at the same time?
linux-kernel kernel sockets netlink kernel-module
Jake badlands
source share