thecreator Posted December 8, 2008 Share Posted December 8, 2008 I have an app I would like to make that requires raw sockets in XP. I have downloaded many examples of using sockets and raw sockets from various programming sites. None of these examples work and I think it is because windows XP has what microsoft calls 'limited' raw socket capabilities. I hope that M$ took raw sockets out of XP by removing the code in winsock.dll (or whatever that dll is called, ws2_32?). If it is the case that only the dll is modified I was wondering if using the winsock dll from a windows server 2003 or 2008 box would work (note: raw sockets has 'full' support in windows server). I dont know exactly how the windows API and dll work so i dont know if this is actually possible. Any thoughts or comments? If you are running windows server please send a copy of you winsock dll :) Thanks Quote Link to comment Share on other sites More sharing options...
Sparda Posted December 8, 2008 Share Posted December 8, 2008 http://www.winpcap.org/ Quote Link to comment Share on other sites More sharing options...
thecreator Posted December 8, 2008 Author Share Posted December 8, 2008 I thought WinPcap involves a driver...i need all my code to be in "userland" (ill still check it out though, thanks) Quote Link to comment Share on other sites More sharing options...
dr0p Posted December 8, 2008 Share Posted December 8, 2008 I thought WinPcap involves a driver...i need all my code to be in "userland" (ill still check it out though, thanks) That's impossible, you need a driver to communicate with the hardware... Quote Link to comment Share on other sites More sharing options...
thecreator Posted December 8, 2008 Author Share Posted December 8, 2008 Thats why i said _MY_ code needs to only be userland. I want to use raw sockets in windows, which is only userland code. Quote Link to comment Share on other sites More sharing options...
aeturnus Posted December 9, 2008 Share Posted December 9, 2008 Thats why i said _MY_ code needs to only be userland. I want to use raw sockets in windows, which is only userland code. Sorry, but it's my understanding that to get your required functionality out of XP SP2 or greater, you'd need a driver to hook on the NDIS or TDI level ( I don't remember which for this case ). There's code examples on the web for this if you need it. Quote Link to comment Share on other sites More sharing options...
thecreator Posted December 9, 2008 Author Share Posted December 9, 2008 Ok, so I had a test app that I got from codeproject.com that uses raw sockets. Dosn't work in XP but works in my windows server 2003 VM. So I thought of copying the server 2003 dlls (mswsock.dll, ws2_32.dll, ws2help.dll and wshtcpip.dll) to my xp box. I did this but had no luck. I think I'm going to go with the driver idea. It would have been a lot easier with raw sockets than writing a NDIS driver (ive never used NDIS). Thanks for the suggestions :) Julzmb Quote Link to comment Share on other sites More sharing options...
Sparda Posted December 9, 2008 Share Posted December 9, 2008 You could include WinPcap as part of your stuff. Not sure what it's license is how ever. If it's under the GNU license you may have to have your stuff open source as well. Other wise you'll have to write your own. Quote Link to comment Share on other sites More sharing options...
thecreator Posted December 9, 2008 Author Share Posted December 9, 2008 that is what i will probably do now. Quote Link to comment Share on other sites More sharing options...
jollyrancher82 Posted December 9, 2008 Share Posted December 9, 2008 Uses it's own License (http://www.winpcap.org/misc/copyright.htm), not the GNU Public License. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.