   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.   ;  With tcpdump... can i write to ???pcap is to complicated and 90% of the functionnalities won't be used... and I want to make things my self... not use the stuff over others programmersfor the promiscuous mode, how can I make this ?? Before the socket, or after ?   