How should one retrieve all opened socket file descriptors, and other information like socket family, protocol, binding address ?
I need to do this in kernel module, not with some user-land commands...
How should one retrieve all opened socket file descriptors, and other information like socket family, protocol, binding address ?
I need to do this in kernel module, not with some user-land commands...
You can use the command lsof
(need to be root).
For example : lsof -i
You can process the output with AWK or cut.
Hope this help.
Regards.