-1

I really want to capture the packet on Windows 7

but i'm beginner of windows programming so I have no idea, how can I solve the

problem.

I know I can capture the packet by using DNIS but my computer is windows7 but

on the webpage there are only for windows 10 or windows 8.1

is there anyone let me know the information?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Leo.L
  • 1
  • Windows 8.1 is very close to Windows 7 in this aspect so the documentation should be sufficient. But in any case you probably should follow @GuyHarris suggestions in the answer below – SomeWittyUsername Jun 17 '16 at 17:11

1 Answers1

1

I know I can capture the packet by using DNIS

(Presumably "using NDIS".)

Yes, NDIS is the operating system mechanism that provides hooks for packet capture.

As you're asking on Stack Overflow, presumably you want to write a program to capture packets, rather than using an existing program.

You could write your own code to use NDIS (which works at least as far back as Windows NT 4.0, and probably earlier and, with different code, Windows 9x as well), but that's code that would run in the kernel, and that's a bit more difficult.

However, WinPcap and Npcap already have that kernel code, and a library that runs in user mode, providing the same API as libpcap on UN*X; the easiest way would probably be to install WinPcap or Npcap on your machine, along with the Software Development Kit for WinPcap or Npcap, and use that.

If you're programming in C or C++, you can use the API directly. In other languages, including .NET languages, there are wrappers for libpcap/WinPcap - see this list of wrappers, for example.