Good day. I would like to create two (almost same) modules - each module uses netlink socket and replies to the incoming message from userspace program.
During the initialization of the first module, it executes the following command successfully:
netlink kernel create(&init_net, NETLINK_USER, &cfg)
However, if I launch a second module, with the same arguments, the same command will cause an error.
I thought that this error happens because NETLINK_USER value of both modules was the same - 31 - that is why I could not have created the second socket connection for the same netlink user. However, if I try NETLINK_USER value as 32, there would be a kernel error. Any other value - error as well.
Please tell me, what I need to do, in order to use two kernel modules at the same time?