#!/opt/psh/bin/psh
#ident @(#)tcpdump2snoop	1.1

set infile [lindex $argv 0]
set outfile [lindex $argv 1]
if {$infile == "" || $outfile == ""} {
	puts "usage: tcpdump2snoop input-file output-file"
	exit 1
}

popen file in $infile r
popen file out $outfile w

pinit file pkt

set i 0
while {[in.read pkt] != "eof"} {
	out.write pkt
	incr i
}

puts "$i packets converted"
pclose file out
pclose file in
