<--previous | contents | next-->

pcap

The pcap module is an Object Oriented interface to the OpenBSD pcap library.

Example

The example program below does the following:

import openbsd.pcap def callback(packet, tstamp, length): print repr(packet), tstamp, length p = openbsd.pcap.Live("wi0") p.filter("host basho and tcp port 22") p.loop(10, callback)

<--previous | contents | next--> (12/21/04)
PyOpenbsd v0.1 Manual