Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
Please help me with network coding. I need to watch creation of new sockets from user level (ring3).
I don't know from what to begin. TDI to afd.sys? DeviceIoControl?
Posted
Updated 9-May-11 22:33pm
v2

1 solution

you mean you want to monitor the creation of sockets on a windows based pc, right? (in order to conduct reporting or similar functionality)

first DeviceIoControl is function used to send IRPs down driver stacks (in simple terms it is used to communicate with drivers from user mode)

second TDI is a network driver interface, I think you can use this to get a list of sockets but that is kernel mode programming and from the way you structured your question i doubt you will be able to develop a driver (at least not yet) besides that what you are looking for can be done in user mode by using the following functions:

GetExtendedUDPTable
http://msdn.microsoft.com/en-us/library/aa365930(v=vs.85).aspx[^]

GetExtendedTCPTable

http://msdn.microsoft.com/en-us/library/aa365928(v=vs.85).aspx[^]
 
Share this answer
 
v2
Comments
Kurt Degiorgio 12-May-11 11:22am    
reason for 1?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900