I want to write a port scanner in C# and I can\'t use SocketType.Raw as raw sockets were taken out from desktop versions of windows. I can\'t use SharpPcap either or other w
Take note on how nmap did it and that for now I believe your option would be to go to a lower level at the ethernet frame.
"Nmap only supports ethernet interfaces (including most 802.11 wireless cards and many VPN clients) for raw packet scans. Unless you use the -sT -Pn options, RAS connections (such as PPP dialups) and certain VPN clients are not supported. This support was dropped when Microsoft removed raw TCP/IP socket support in Windows XP SP2. Now Nmap must send lower-level ethernet frames instead."
So - that brings us to:
http://www.codeproject.com/KB/IP/sendrawpacket.aspx