tclpcap is a Tcl extension that provides access to the Pcap [L1 ] packet capture library. This extension allows a programmer to capture and process packets from a Tcl script. Packets can be either captured from a network interface or read from a capture file from tcpdump. This extension allows dump files to be created so interesting tools to process capture files can be written purely with Tcl.

Note that this extension provides no decoding capabilities. It simply provides the raw data from the network or capture file.

At this time, this package has only been tested under Linux. It should work for any Unix system with only minor porting effort.

The tclpcap man page is available at tclpcap man page.

What: tclpcap extension
Description: Tcl extension providing access to the Pcap library
Updated: 6/2005
License: BSD
Contact: [email protected]

An updated version is in andrewsh's bitbucket here:

It's not really being developed anymore and has largely been forgotten about until now (Feb 2018), but it fixes a few bugs present in the original code.