Advertisement

intercepting all broadcast packets

Started by August 08, 2006 07:28 AM
1 comment, last by hplus0603 18 years, 6 months ago
can i easily intercept all broadcast packets on all port using winsock? i dont really want to open a bucket load of winsock connections to cover all ports :-/ also im intrested in intercepting a bunch of tcp ports in the range 135-139 (which netbios uses), is this also possible ie. intercept these packets, but still alow them to go to my computer. What i want to do is too foward these packets to another machine over the internet as im setting up a VPN but the VPN software does not forward netbios or UDP broadcast across the network.
Provided the service provider has implemented it, you can open a socket with SOCK_RAW and examine the headers of all packets that you can find on that interface.
Advertisement
I suggest using libpcap, which does all this for you (it's rather complicated to do yourself). libpcap is used by the pretty good Ethereal network sniffer, too.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement