*BSD News Article 40860


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!yarrina.connect.com.au!news.mira.net.au!news.netspace.net.au!serval.net.wsu.edu!netnews.nwnet.net!oracle.pnl.gov!osi-east2.es.net!lll-winken.llnl.gov!uwm.edu!spool.mu.edu!olivea!grapevine.lcs.mit.edu!ginger.lcs.mit.edu!wollman
From: wollman@ginger.lcs.mit.edu (Garrett A. Wollman)
Newsgroups: comp.os.386bsd.questions
Subject: Re: BSD 4.4 raw sockets
Date: 14 Jan 1995 21:47:21 GMT
Organization: MIT Laboratory for Computer Science
Lines: 20
Message-ID: <3f9gp9$nec@GRAPEVINE.LCS.MIT.EDU>
References: <3f8r6l$83f@ici-paris.ensta.fr>
NNTP-Posting-Host: ginger.lcs.mit.edu

In article <3f8r6l$83f@ici-paris.ensta.fr>,
Alessandro Cannarsi <cannarsi@ensta.fr> wrote:
>	I am trying to develop a network analyser under BSD4.4. Although, since
>raw sockets are not dealt with in the online documentation, I can't figure out
>how to open a socket able to peek all IP packets on the net (from any host to 
>any other host). The purpose of the program should be to detect connections on
>the local network and map possible anomalies.

The socket interface is not an appropriate mechanism for promiscuous
listening in general, or packet filtering in particular.  Use BPF.

`man 4 bpf'.

-GAWollman

-- 
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@lcs.mit.edu  | Shashish is the bonding of hearts in spite of distance.
Opinions not those of| It is a bond more powerful than absence.  We like people
MIT, LCS, ANA, or NSA| who like Shashish.  - Claude McKenzie + Florent Vollant