Siddiqui
Siddiqui

Reputation: 7840

Packet sniffing in c under window OS

I want to sniff network packets without wincap library, kindly give me some hints or direction so that I can make it possible.

Upvotes: 1

Views: 547

Answers (2)

Carl Smotricz
Carl Smotricz

Reputation: 67760

You know, libpcap exists for a reason: It does something that's necessary.

You need to set up a system-level hook for TCP/IP events, and the way global hooks work means you need to do this from a DLL.

Having hooked those events, you have to figure out the contents of the packets you get.

Are you sure you want to re-invent this wheel?

I found some introductory info on hooking Windows events here.

Upvotes: 8

Quonux
Quonux

Reputation: 2991

You could start to do kernel level programming and catch there the packets. This is for sure complicated but you'll learn much.

Upvotes: 0

Related Questions