Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Dec 2009
Open UDP socket from user space and send packets from kernel module
Then I want to send packets over that socket from kernel module using sock_sendmsg() function.
But in kernel module, I dont know how to get/map pointer to "struct socket *sock" from the socket descriptor which is returned by socket() function.
I think sysfd_lookup() will get pointer to associated "struct socket *sock" from the fd, but it will work ONLY if the kernel module runs on behalf of that process.
Since my kernel module will not run on behalf that process, how to get the "struct socket *sock"