tcap: Tcl pcap interface
1. install
edit the makefile for your local paths, then run "make install" as root or via sudo
2. use:
tclsh package require tcap tcap help
3. more? see test.tcl for some info on how to use tcap
homepage: http://monkey.org/~jose/software/tcap/
a minimal sniffer in Tcl using tcap:
#!/usr/bin/env tclsh package require tcap tcap open fxp0 0 1500 set dl [tcap dloff] tcap filter "tcp" while {1} { set g [tcap get] if {[llength [split $g]] > 0} { puts [lrange $g $dl end] } }