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 >
Text File  |  2011-09-27  |  3KB  |  157 lines

  1. # @(#) $Id: debug.expect 780 2011-09-27 23:19:17Z leres $ (LBL)
  2. #
  3. #  Copyright (c) 2008, 2009, 2011
  4. #    The Regents of the University of California.  All rights reserved.
  5. #
  6. #  Redistribution and use in source and binary forms, with or without
  7. #  modification, are permitted provided that: (1) source code distributions
  8. #  retain the above copyright notice and this paragraph in its entirety, (2)
  9. #  distributions including binary code include the above copyright notice and
  10. #  this paragraph in its entirety in the documentation or other materials
  11. #  provided with the distribution, and (3) all advertising materials mentioning
  12. #  features or use of this software display the following acknowledgement:
  13. #  ``This product includes software developed by the University of California,
  14. #  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
  15. #  the University nor the names of its contributors may be used to endorse
  16. #  or promote products derived from this software without specific prior
  17. #  written permission.
  18. #  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  19. #  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  20. #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. #
  22. # debug.expect - acld script used for debugging
  23. #
  24. set timeout 10
  25. match_max 2048
  26. set cprompt "\[^#\r\n]*#"
  27. set currentmode "logout"
  28. set currentacl ""
  29. set f "expect.log"
  30. set logname "debug.log"
  31. if [catch {log_file -a $logname} err] {
  32.     send_error "$prog: warning: $err\n"
  33. }
  34.  
  35. # set lastseq 65535
  36.  
  37. # Cleanup if our child dies
  38. # trap { wait } SIGCHLD
  39.  
  40. # Higher level is easier if the prompt doesn't change
  41. proc prompt1 {} {
  42.     return "expect>"
  43. }
  44.  
  45. # Required procedures
  46.  
  47. proc attr {acl attrlist} {
  48.  
  49.     # ignore
  50.     puts "attr"
  51.     return
  52. }
  53.  
  54. proc drop {addr acl seq} {
  55.  
  56.     puts "drop"
  57.     return
  58. }
  59.  
  60. proc dropudpport {port acl seq} {
  61.  
  62.     puts "dropudpport"
  63.     return
  64. }
  65.  
  66. proc droptcpport {port acl seq} {
  67.  
  68.     puts "droptcpport"
  69.     return
  70. }
  71.  
  72. proc ayt {} {
  73.  
  74.     puts "ayt"
  75.     return
  76. }
  77.  
  78. # Try the "show ip accounting" version first (to get counts)
  79. proc listacl {acl interface} {
  80.  
  81.     puts "listacl -"
  82.     puts "."
  83.     return
  84. }
  85.  
  86. proc listroute {} {
  87.  
  88.     puts "listroute -"
  89.     puts "."
  90.     return
  91. }
  92.  
  93. proc login {addr cuser cpass1 cpass2 euser epass1 epass2} {
  94.     puts "login"
  95.     return
  96. }
  97.  
  98. proc logout {} {
  99.  
  100.     puts "logout"
  101.     return
  102. }
  103.  
  104. proc nonullzero {addr} {
  105.  
  106.     puts "nonullzero"
  107.     return
  108. }
  109.  
  110. proc nullzero {addr} {
  111.  
  112.     puts "nullzero"
  113.     return
  114. }
  115.  
  116. proc permittcpdsthostport {addr port acl seq} {
  117.  
  118.     puts "permittcpdsthostport"
  119.     return
  120. }
  121.  
  122. proc restore {addr acl seq} {
  123.  
  124.     puts "restore"
  125.     return
  126. }
  127.  
  128. proc restoreudpport {port acl seq} {
  129.  
  130.     puts "restoreudpport"
  131.     return
  132. }
  133.  
  134. proc restoretcpport {port acl seq} {
  135.  
  136.     puts "restoretcpport"
  137.     return
  138. }
  139.  
  140. proc sync {} {
  141.  
  142.     puts "sync"
  143.     return
  144. }
  145.  
  146. proc unpermittcpdsthostport {addr port acl seq} {
  147.  
  148.     aclcmd "unpermittcpdsthostport" $acl $seq "no" ""
  149.     return
  150. }
  151.  
  152. # Local procedures
  153.  
  154. # These are required to be at the end
  155. log_user 0
  156. interpreter
  157.