Here is a link to a CodeProject article on raw sockets.