I'm writing kernel module that receives messages from userspace via generic netlink. When I access genl_info->snd_pid, in kernel callback function, I get process ID.
According to libnl documentation:
libnl generates unique port numbers based on the process identifier and adds an offset to it allowing for multiple sockets to be used. The initial socket will still equal to the process identifier for backwards compatibility reasons.
My userspace application uses multiple threads and I need to differentiate them. Thanks for any help.