<--previous | contents | next-->

Dumper

The Dumper class is used to write pcap dumps to file.

Interface

Dumper(feed, file)

Dumper is instantiated with the following arguments:

__call__(packet, tstamp, length)

A Dumper instance can be called like a function, with the following arguments:

Note that this is the same interface as that of the callback argument to the loop and dispatch methods on PCap feeds.

close()

Close the dump.

Example

The example program below does the following:

import openbsd.pcap p = openbsd.pcap.Live("wi0") d = openbsd.pcap.Dumper(p, "dump") p.loop(10, d)

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