BSD sockets & device
Hi, I'm very desesperated. I've tried all the example I've found on Internet and no one work. I tried the make a sniffer to analyse the data for a homework at the university. I'm currently on FreeBSD, I tried Linux, and other things went wrong with it too... One article said to open the pseudo-file: "/dev/bpf0", but the file is already opened and I don't know how to close the other process which use this file. And if this process manages all my Internet connection, I don't want to close it. In other article, the authors said to open a raw socket, but when I try to listen on this socket, nothing append. PLEASE, someone, or sometwo, help me, I really need to this to finish my little project. P.S.: excuse my english
Why not just use Ethereal, or plain-old tcpdump (which can dump things other than TCP, too)?
If you want to sniff, you should set an interface into promiscuous mode, and then create a socket at a lower level address family (the specifics vary by OS, but can be found in your man pages). Or just use libpcap.
If you want to sniff, you should set an interface into promiscuous mode, and then create a socket at a lower level address family (the specifics vary by OS, but can be found in your man pages). Or just use libpcap.
enum Bool { True, False, FileNotFound };
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement