Chroma
Chroma

Reputation: 23

Receiving an entire UDP packet

I am programming a UDP proxy application for Windows in C++ that sends and receives UDP packets with Winsock. The problem is that I need to work with the ENTIRE packet, not just the data and UDP and/or IP header. I have tried raw sockets with IP_HDRINCL (might be misspelled), but it still chops off some information from the packet. Is there some sort of library or something, if not possible in winsock, that will let me accomplish this?

Upvotes: 1

Views: 2066

Answers (2)

Mohammad Nikravan
Mohammad Nikravan

Reputation: 1849

Here is some to filter packet in windows:

  1. WinDivert Free open source project work on Windows 7, 2008 or upper. network layer.
  2. WinpkFilter 3.0 Commercial, Windows XP and upper. datalink layer
  3. pcausa, Commercial. datalink layer
  4. Windows Filtering Platform Packet Modification Sample A sample to create callout driver that WinDivert use, you should now to implement kernel driver. network layer.

Upvotes: 0

David Knell
David Knell

Reputation: 764

For receiving packets, WinPCAP will let you do all of this and more, and there's sample code here which shows how to capture all of the packets arriving on an interface.

Upvotes: 3

Related Questions