Results 1 to 1 of 1
Thread: Writting a network device driver
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2011
Writting a network device driver
I'm trying to write a network device driver that creates a device file (for example, /dev/output), and when it's acessed (by system call read), returns a list of process and it's TCP connections at the moment it is called.
My question is, which are the kernel data structures I have to access to obtain the following data: PID, local ip address, local port, destination ip address and destination port? I read somewhere that the sock struct has almost all data I need, but I read the file in the kernel I downloaded, and I didn't found something like that. I'm using Ubuntu with kernel 2.6.35. Could someone help me, please? Thanks!