home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.lbl.gov
/
2014.05.ftp.ee.lbl.gov.tar
/
ftp.ee.lbl.gov
/
acld-1.11.tar.gz
/
acld-1.11.tar
/
acld-1.11
/
debug.expect
< prev
next >
Wrap
Text File
|
2011-09-27
|
3KB
|
157 lines
# @(#) $Id: debug.expect 780 2011-09-27 23:19:17Z leres $ (LBL)
#
# Copyright (c) 2008, 2009, 2011
# The Regents of the University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that: (1) source code distributions
# retain the above copyright notice and this paragraph in its entirety, (2)
# distributions including binary code include the above copyright notice and
# this paragraph in its entirety in the documentation or other materials
# provided with the distribution, and (3) all advertising materials mentioning
# features or use of this software display the following acknowledgement:
# ``This product includes software developed by the University of California,
# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
# the University nor the names of its contributors may be used to endorse
# or promote products derived from this software without specific prior
# written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# debug.expect - acld script used for debugging
#
set timeout 10
match_max 2048
set cprompt "\[^#\r\n]*#"
set currentmode "logout"
set currentacl ""
set f "expect.log"
set logname "debug.log"
if [catch {log_file -a $logname} err] {
send_error "$prog: warning: $err\n"
}
# set lastseq 65535
# Cleanup if our child dies
# trap { wait } SIGCHLD
# Higher level is easier if the prompt doesn't change
proc prompt1 {} {
return "expect>"
}
# Required procedures
proc attr {acl attrlist} {
# ignore
puts "attr"
return
}
proc drop {addr acl seq} {
puts "drop"
return
}
proc dropudpport {port acl seq} {
puts "dropudpport"
return
}
proc droptcpport {port acl seq} {
puts "droptcpport"
return
}
proc ayt {} {
puts "ayt"
return
}
# Try the "show ip accounting" version first (to get counts)
proc listacl {acl interface} {
puts "listacl -"
puts "."
return
}
proc listroute {} {
puts "listroute -"
puts "."
return
}
proc login {addr cuser cpass1 cpass2 euser epass1 epass2} {
puts "login"
return
}
proc logout {} {
puts "logout"
return
}
proc nonullzero {addr} {
puts "nonullzero"
return
}
proc nullzero {addr} {
puts "nullzero"
return
}
proc permittcpdsthostport {addr port acl seq} {
puts "permittcpdsthostport"
return
}
proc restore {addr acl seq} {
puts "restore"
return
}
proc restoreudpport {port acl seq} {
puts "restoreudpport"
return
}
proc restoretcpport {port acl seq} {
puts "restoretcpport"
return
}
proc sync {} {
puts "sync"
return
}
proc unpermittcpdsthostport {addr port acl seq} {
aclcmd "unpermittcpdsthostport" $acl $seq "no" ""
return
}
# Local procedures
# These are required to be at the end
log_user 0
interpreter