On Tue, Oct 16, 2001 at 09:23:58PM -0700, Jitendra Sankpal wrote:
> I have a question about libpcap.
> Can libpcap be used for packet filtering? If yes how?

"Packet filtering" in what sense?  In the sense that a firewall, for
example, filters packets?  If so, no, as it receives from the underlying
OS-dependent mechanism it uses a *copy* of an input packet - the
original packet passes through the networking stack of the machine on
which it's running, if appropriate - and has no mechanism for sending
that packet onward if it passes the filter.

> Where does libpcap get  packets from? Is it directly
> from network interface or after OS has done some
> processing on it( i.e. after kernel, or networking
> code of OS)? 

The latter.  It uses either some underlying mechanism in the OS (for
UNIX) or the WinPcap driver (for Windows, where WinPcap is the port of
libpcap to Windows).

> Can libpcap be used to block the packets coming in?
> (i.e. can libpcap be used for packet filtering
> firewall)

No.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to