Raw IP packets -- Send/Receive
Posted on 2002-06-12
I need to send and receive RAW IP packets on a Win2K/XP box. That is: I want a specific process in the system (which I write, of course) to have a different IP than that of the computer's. This process will be sending RAW IP packets, and will receive packets directed to "it's" IP address.
How do I go about this?
I thought about some fiddling with RAS, creating a "dial connection" to a PPP server which will give me my IP, but for that I need a programmable PPP client linked in my process. Does anyone know of such a thing?
I've also thought about adding another "virtual" interface onto my ethernet card, with a different IP, use it only from this process, and then opening a RAW-IP-mode winsock socket on that interface and IP. However, is this allowed? What about ARP on other machines in the network? How do I do this, anyhow? How do I *receive* packets, before windows "Eats" them?
I understand this is a hard one, and calls for real Gurus, so I've graded it accordingly...