tclpcap 2.0.0

What is this?

tclpcap is a Tcl extension that provides access to the Pcap 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.

An html version of the man page can be found here.

tclpcap is licenced under the BSD license.


The tclpcap extension can be found here. This should be portable to any Unix platform. I've tested it on Linux. I believe it currently works on FreeBSD, but it has been a while since I have been able to test on that platform. A man page, a test suite, and some simple examples are included.


I welcome any feedback about tclpcap. Drop me an email at I also regularly read comp.lang.tcl and the wiki. Logo